Lines Matching full:mat

275         SkMatrix mat;  in test_matrix_min_max_scale()  local
276 mat.reset(); in test_matrix_min_max_scale()
279 mat.postConcat(mats[x]); in test_matrix_min_max_scale()
282 SkScalar minScale = mat.getMinScale(); in test_matrix_min_max_scale()
283 SkScalar maxScale = mat.getMaxScale(); in test_matrix_min_max_scale()
285 REPORTER_ASSERT(reporter, (maxScale < 0) == mat.hasPerspective()); in test_matrix_min_max_scale()
287 success = mat.getMinMaxScales(scales); in test_matrix_min_max_scale()
288 REPORTER_ASSERT(reporter, success == !mat.hasPerspective()); in test_matrix_min_max_scale()
291 if (mat.hasPerspective()) { in test_matrix_min_max_scale()
310 mat.mapVectors(vectors, std::size(vectors)); in test_matrix_min_max_scale()
328 SkMatrix mat; in test_matrix_preserve_shape() local
331 mat.setIdentity(); in test_matrix_preserve_shape()
332 REPORTER_ASSERT(reporter, mat.isSimilarity()); in test_matrix_preserve_shape()
333 REPORTER_ASSERT(reporter, mat.preservesRightAngles()); in test_matrix_preserve_shape()
336 mat.setTranslate(100, 100); in test_matrix_preserve_shape()
337 REPORTER_ASSERT(reporter, mat.isSimilarity()); in test_matrix_preserve_shape()
338 REPORTER_ASSERT(reporter, mat.preservesRightAngles()); in test_matrix_preserve_shape()
341 mat.setScale(15, 15); in test_matrix_preserve_shape()
342 REPORTER_ASSERT(reporter, mat.isSimilarity()); in test_matrix_preserve_shape()
343 REPORTER_ASSERT(reporter, mat.preservesRightAngles()); in test_matrix_preserve_shape()
346 mat.setScale(-15, 15); in test_matrix_preserve_shape()
347 REPORTER_ASSERT(reporter, mat.isSimilarity()); in test_matrix_preserve_shape()
348 REPORTER_ASSERT(reporter, mat.preservesRightAngles()); in test_matrix_preserve_shape()
351 mat.setScale(15, 20); in test_matrix_preserve_shape()
352 REPORTER_ASSERT(reporter, !mat.isSimilarity()); in test_matrix_preserve_shape()
353 REPORTER_ASSERT(reporter, mat.preservesRightAngles()); in test_matrix_preserve_shape()
356 mat.setScale(15, 15, 2, 2); in test_matrix_preserve_shape()
357 REPORTER_ASSERT(reporter, mat.isSimilarity()); in test_matrix_preserve_shape()
358 REPORTER_ASSERT(reporter, mat.preservesRightAngles()); in test_matrix_preserve_shape()
361 mat.setScale(15, 20, 2, 2); in test_matrix_preserve_shape()
362 REPORTER_ASSERT(reporter, !mat.isSimilarity()); in test_matrix_preserve_shape()
363 REPORTER_ASSERT(reporter, mat.preservesRightAngles()); in test_matrix_preserve_shape()
366 mat.setSkew(15, 15); in test_matrix_preserve_shape()
367 REPORTER_ASSERT(reporter, !mat.isSimilarity()); in test_matrix_preserve_shape()
368 REPORTER_ASSERT(reporter, !mat.preservesRightAngles()); in test_matrix_preserve_shape()
371 mat.setSkew(15, 20); in test_matrix_preserve_shape()
372 REPORTER_ASSERT(reporter, !mat.isSimilarity()); in test_matrix_preserve_shape()
373 REPORTER_ASSERT(reporter, !mat.preservesRightAngles()); in test_matrix_preserve_shape()
376 mat.setSkew(15, 15, 2, 2); in test_matrix_preserve_shape()
377 REPORTER_ASSERT(reporter, !mat.isSimilarity()); in test_matrix_preserve_shape()
378 REPORTER_ASSERT(reporter, !mat.preservesRightAngles()); in test_matrix_preserve_shape()
381 mat.setSkew(15, 20, 2, 2); in test_matrix_preserve_shape()
382 REPORTER_ASSERT(reporter, !mat.isSimilarity()); in test_matrix_preserve_shape()
383 REPORTER_ASSERT(reporter, !mat.preservesRightAngles()); in test_matrix_preserve_shape()
386 mat.reset().setPerspX(SK_Scalar1 / 2); in test_matrix_preserve_shape()
387 REPORTER_ASSERT(reporter, !mat.isSimilarity()); in test_matrix_preserve_shape()
388 REPORTER_ASSERT(reporter, !mat.preservesRightAngles()); in test_matrix_preserve_shape()
391 mat.reset().setPerspY(SK_Scalar1 / 2); in test_matrix_preserve_shape()
392 REPORTER_ASSERT(reporter, !mat.isSimilarity()); in test_matrix_preserve_shape()
393 REPORTER_ASSERT(reporter, !mat.preservesRightAngles()); in test_matrix_preserve_shape()
397 mat.setRotate(SkIntToScalar(angle)); in test_matrix_preserve_shape()
398 REPORTER_ASSERT(reporter, mat.isSimilarity()); in test_matrix_preserve_shape()
399 REPORTER_ASSERT(reporter, mat.preservesRightAngles()); in test_matrix_preserve_shape()
403 mat.reset(); in test_matrix_preserve_shape()
405 mat.postRotate(1); in test_matrix_preserve_shape()
407 REPORTER_ASSERT(reporter, mat.isSimilarity()); in test_matrix_preserve_shape()
408 REPORTER_ASSERT(reporter, mat.preservesRightAngles()); in test_matrix_preserve_shape()
411 mat.setRotate(30).postTranslate(10, 20); in test_matrix_preserve_shape()
412 REPORTER_ASSERT(reporter, mat.isSimilarity()); in test_matrix_preserve_shape()
413 REPORTER_ASSERT(reporter, mat.preservesRightAngles()); in test_matrix_preserve_shape()
416 mat.setRotate(30).postScale(2, 2); in test_matrix_preserve_shape()
417 REPORTER_ASSERT(reporter, mat.isSimilarity()); in test_matrix_preserve_shape()
418 REPORTER_ASSERT(reporter, mat.preservesRightAngles()); in test_matrix_preserve_shape()
421 mat.setRotate(30).postScale(3, 2); in test_matrix_preserve_shape()
422 REPORTER_ASSERT(reporter, !mat.isSimilarity()); in test_matrix_preserve_shape()
423 REPORTER_ASSERT(reporter, !mat.preservesRightAngles()); in test_matrix_preserve_shape()
426 mat.setScale(3, 2).postRotate(30); in test_matrix_preserve_shape()
427 REPORTER_ASSERT(reporter, !mat.isSimilarity()); in test_matrix_preserve_shape()
428 REPORTER_ASSERT(reporter, mat.preservesRightAngles()); in test_matrix_preserve_shape()
431 mat.setAll(0, 0, 0, 0, 0, 0, 0, 0, 0); in test_matrix_preserve_shape()
432 REPORTER_ASSERT(reporter, !mat.isSimilarity()); in test_matrix_preserve_shape()
433 REPORTER_ASSERT(reporter, !mat.preservesRightAngles()); in test_matrix_preserve_shape()
436 mat.setAll(0, 0, 0, 0, 0, 0, 0, 0, 1); in test_matrix_preserve_shape()
437 REPORTER_ASSERT(reporter, !mat.isSimilarity()); in test_matrix_preserve_shape()
438 REPORTER_ASSERT(reporter, !mat.preservesRightAngles()); in test_matrix_preserve_shape()
441 mat.setAll(0, 1, 0, in test_matrix_preserve_shape()
444 REPORTER_ASSERT(reporter, mat.isSimilarity()); in test_matrix_preserve_shape()
445 REPORTER_ASSERT(reporter, mat.preservesRightAngles()); in test_matrix_preserve_shape()
448 mat.setAll(0, 1, 0, in test_matrix_preserve_shape()
451 REPORTER_ASSERT(reporter, mat.isSimilarity()); in test_matrix_preserve_shape()
452 REPORTER_ASSERT(reporter, mat.preservesRightAngles()); in test_matrix_preserve_shape()
477 static bool check_matrix_recomposition(const SkMatrix& mat, in check_matrix_recomposition() argument
489 bool result = scalar_nearly_equal_relative(mat[SkMatrix::kMScaleX], in check_matrix_recomposition()
491 scalar_nearly_equal_relative(mat[SkMatrix::kMSkewX], in check_matrix_recomposition()
493 scalar_nearly_equal_relative(mat[SkMatrix::kMSkewY], in check_matrix_recomposition()
495 scalar_nearly_equal_relative(mat[SkMatrix::kMScaleY], in check_matrix_recomposition()
501 SkMatrix mat; in test_matrix_decomposition() local
510 mat.reset(); in test_matrix_decomposition()
511 REPORTER_ASSERT(reporter, SkDecomposeUpper2x2(mat, &rotation1, &scale, &rotation2)); in test_matrix_decomposition()
512 REPORTER_ASSERT(reporter, check_matrix_recomposition(mat, rotation1, scale, rotation2)); in test_matrix_decomposition()
514 REPORTER_ASSERT(reporter, SkDecomposeUpper2x2(mat, nullptr, nullptr, nullptr)); in test_matrix_decomposition()
517 mat.setRotate(kRotation0); in test_matrix_decomposition()
518 REPORTER_ASSERT(reporter, SkDecomposeUpper2x2(mat, &rotation1, &scale, &rotation2)); in test_matrix_decomposition()
519 REPORTER_ASSERT(reporter, check_matrix_recomposition(mat, rotation1, scale, rotation2)); in test_matrix_decomposition()
522 mat.setScale(kScale0, kScale0); in test_matrix_decomposition()
523 REPORTER_ASSERT(reporter, SkDecomposeUpper2x2(mat, &rotation1, &scale, &rotation2)); in test_matrix_decomposition()
524 REPORTER_ASSERT(reporter, check_matrix_recomposition(mat, rotation1, scale, rotation2)); in test_matrix_decomposition()
527 mat.setScale(kScale1, kScale0); in test_matrix_decomposition()
528 REPORTER_ASSERT(reporter, SkDecomposeUpper2x2(mat, &rotation1, &scale, &rotation2)); in test_matrix_decomposition()
529 REPORTER_ASSERT(reporter, check_matrix_recomposition(mat, rotation1, scale, rotation2)); in test_matrix_decomposition()
532 mat.setRotate(kRotation1).postScale(kScale0, kScale0); in test_matrix_decomposition()
533 REPORTER_ASSERT(reporter, SkDecomposeUpper2x2(mat, &rotation1, &scale, &rotation2)); in test_matrix_decomposition()
534 REPORTER_ASSERT(reporter, check_matrix_recomposition(mat, rotation1, scale, rotation2)); in test_matrix_decomposition()
537 mat.setScale(kScale0, kScale0).postRotate(kRotation1); in test_matrix_decomposition()
538 REPORTER_ASSERT(reporter, SkDecomposeUpper2x2(mat, &rotation1, &scale, &rotation2)); in test_matrix_decomposition()
539 REPORTER_ASSERT(reporter, check_matrix_recomposition(mat, rotation1, scale, rotation2)); in test_matrix_decomposition()
542 mat.setRotate(kRotation0).postScale(kScale1, -kScale1); in test_matrix_decomposition()
543 REPORTER_ASSERT(reporter, SkDecomposeUpper2x2(mat, &rotation1, &scale, &rotation2)); in test_matrix_decomposition()
544 REPORTER_ASSERT(reporter, check_matrix_recomposition(mat, rotation1, scale, rotation2)); in test_matrix_decomposition()
547 mat.setScale(kScale0, -kScale0).postRotate(kRotation1); in test_matrix_decomposition()
548 REPORTER_ASSERT(reporter, SkDecomposeUpper2x2(mat, &rotation1, &scale, &rotation2)); in test_matrix_decomposition()
549 REPORTER_ASSERT(reporter, check_matrix_recomposition(mat, rotation1, scale, rotation2)); in test_matrix_decomposition()
552 mat.setRotate(kRotation1).postScale(kScale1, kScale0); in test_matrix_decomposition()
553 REPORTER_ASSERT(reporter, SkDecomposeUpper2x2(mat, &rotation1, &scale, &rotation2)); in test_matrix_decomposition()
554 REPORTER_ASSERT(reporter, check_matrix_recomposition(mat, rotation1, scale, rotation2)); in test_matrix_decomposition()
557 mat.setRotate(90).postScale(kScale1, kScale0); in test_matrix_decomposition()
558 REPORTER_ASSERT(reporter, SkDecomposeUpper2x2(mat, &rotation1, &scale, &rotation2)); in test_matrix_decomposition()
559 REPORTER_ASSERT(reporter, check_matrix_recomposition(mat, rotation1, scale, rotation2)); in test_matrix_decomposition()
562 mat.setScale(kScale1, kScale0).postRotate(kRotation0); in test_matrix_decomposition()
563 REPORTER_ASSERT(reporter, SkDecomposeUpper2x2(mat, &rotation1, &scale, &rotation2)); in test_matrix_decomposition()
564 REPORTER_ASSERT(reporter, check_matrix_recomposition(mat, rotation1, scale, rotation2)); in test_matrix_decomposition()
567 mat.setScale(kScale1, kScale0).postRotate(90); in test_matrix_decomposition()
568 REPORTER_ASSERT(reporter, SkDecomposeUpper2x2(mat, &rotation1, &scale, &rotation2)); in test_matrix_decomposition()
569 REPORTER_ASSERT(reporter, check_matrix_recomposition(mat, rotation1, scale, rotation2)); in test_matrix_decomposition()
572 mat.setRotate(kRotation1).postScale(kScale0, kScale0).postRotate(kRotation0); in test_matrix_decomposition()
573 REPORTER_ASSERT(reporter, SkDecomposeUpper2x2(mat, &rotation1, &scale, &rotation2)); in test_matrix_decomposition()
574 REPORTER_ASSERT(reporter, check_matrix_recomposition(mat, rotation1, scale, rotation2)); in test_matrix_decomposition()
577 mat.setRotate(kRotation0).postScale(kScale1, kScale0).postRotate(kRotation1); in test_matrix_decomposition()
578 REPORTER_ASSERT(reporter, SkDecomposeUpper2x2(mat, &rotation1, &scale, &rotation2)); in test_matrix_decomposition()
579 REPORTER_ASSERT(reporter, check_matrix_recomposition(mat, rotation1, scale, rotation2)); in test_matrix_decomposition()
582 mat.setRotate(kRotation0).postScale(-kScale1, kScale0).postRotate(kRotation1); in test_matrix_decomposition()
583 REPORTER_ASSERT(reporter, SkDecomposeUpper2x2(mat, &rotation1, &scale, &rotation2)); in test_matrix_decomposition()
584 REPORTER_ASSERT(reporter, check_matrix_recomposition(mat, rotation1, scale, rotation2)); in test_matrix_decomposition()
593 mat.setRotate(rot0).postScale(sx, sy).postRotate(rot1); in test_matrix_decomposition()
595 if (SkDecomposeUpper2x2(mat, &rotation1, &scale, &rotation2)) { in test_matrix_decomposition()
596 REPORTER_ASSERT(reporter, check_matrix_recomposition(mat, rotation1, scale, rotation2)); in test_matrix_decomposition()
599 SkScalar perpdot = mat[SkMatrix::kMScaleX]*mat[SkMatrix::kMScaleY] - in test_matrix_decomposition()
600 mat[SkMatrix::kMSkewX]*mat[SkMatrix::kMSkewY]; in test_matrix_decomposition()
606 mat.postTranslate(-1000.f, 1000.f); in test_matrix_decomposition()
607 REPORTER_ASSERT(reporter, SkDecomposeUpper2x2(mat, &rotation1, &scale, &rotation2)); in test_matrix_decomposition()
608 REPORTER_ASSERT(reporter, check_matrix_recomposition(mat, rotation1, scale, rotation2)); in test_matrix_decomposition()
611 mat[SkMatrix::kMPersp0] = 12.f; in test_matrix_decomposition()
612 mat[SkMatrix::kMPersp1] = 4.f; in test_matrix_decomposition()
613 mat[SkMatrix::kMPersp2] = 1872.f; in test_matrix_decomposition()
614 REPORTER_ASSERT(reporter, SkDecomposeUpper2x2(mat, &rotation1, &scale, &rotation2)); in test_matrix_decomposition()
615 REPORTER_ASSERT(reporter, check_matrix_recomposition(mat, rotation1, scale, rotation2)); in test_matrix_decomposition()
619 mat.reset(); in test_matrix_decomposition()
620 mat[SkMatrix::kMScaleX] = 0.f; in test_matrix_decomposition()
621 REPORTER_ASSERT(reporter, !SkDecomposeUpper2x2(mat, &rotation1, &scale, &rotation2)); in test_matrix_decomposition()
622 mat.reset(); in test_matrix_decomposition()
623 mat[SkMatrix::kMScaleY] = 0.f; in test_matrix_decomposition()
624 REPORTER_ASSERT(reporter, !SkDecomposeUpper2x2(mat, &rotation1, &scale, &rotation2)); in test_matrix_decomposition()
625 mat.reset(); in test_matrix_decomposition()
627 mat[SkMatrix::kMScaleX] = 1.f; in test_matrix_decomposition()
628 mat[SkMatrix::kMSkewX] = 2.f; in test_matrix_decomposition()
629 mat[SkMatrix::kMSkewY] = 4.f; in test_matrix_decomposition()
630 mat[SkMatrix::kMScaleY] = 8.f; in test_matrix_decomposition()
631 REPORTER_ASSERT(reporter, !SkDecomposeUpper2x2(mat, &rotation1, &scale, &rotation2)); in test_matrix_decomposition()
665 SkMatrix mat; in test_matrix_homogeneous() local
697 mat.reset(); in test_matrix_homogeneous()
699 mat.mapHomogeneousPoints(dst, randTriples, kTripleCount); in test_matrix_homogeneous()
706 mat.setAll(0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f); in test_matrix_homogeneous()
708 mat.mapHomogeneousPoints(dst, randTriples, kTripleCount); in test_matrix_homogeneous()
730 mat.setScale(kScale0, kScale0); in test_matrix_homogeneous()
735 mat.mapHomogeneousPoints(&dst, &src, 1); in test_matrix_homogeneous()
736 mat.mapPoints(&pnt, &pnt, 1); in test_matrix_homogeneous()
744 mat.setRotate(kRotation0); in test_matrix_homogeneous()
749 mat.mapHomogeneousPoints(&dst, &src, 1); in test_matrix_homogeneous()
750 mat.mapPoints(&pnt, &pnt, 1); in test_matrix_homogeneous()
758 mat.setRotate(kRotation1); in test_matrix_homogeneous()
759 mat.postScale(kScale0, kScale0); in test_matrix_homogeneous()
760 mat.postRotate(kRotation0); in test_matrix_homogeneous()
765 mat.mapHomogeneousPoints(&dst, &src, 1); in test_matrix_homogeneous()
766 mat.mapPoints(&pnt, &pnt, 1); in test_matrix_homogeneous()
857 SkMatrix mat, inverse, iden1, iden2; in DEF_TEST() local
859 mat.reset(); in DEF_TEST()
860 mat.setTranslate(1, 1); in DEF_TEST()
861 REPORTER_ASSERT(reporter, mat.invert(&inverse)); in DEF_TEST()
862 iden1.setConcat(mat, inverse); in DEF_TEST()
865 mat.setScale(2, 4); in DEF_TEST()
866 REPORTER_ASSERT(reporter, mat.invert(&inverse)); in DEF_TEST()
867 iden1.setConcat(mat, inverse); in DEF_TEST()
869 test_flatten(reporter, mat); in DEF_TEST()
871 mat.setScale(SK_Scalar1/2, 2); in DEF_TEST()
872 REPORTER_ASSERT(reporter, mat.invert(&inverse)); in DEF_TEST()
873 iden1.setConcat(mat, inverse); in DEF_TEST()
875 test_flatten(reporter, mat); in DEF_TEST()
877 mat.setScale(3, 5, 20, 0).postRotate(25); in DEF_TEST()
878 REPORTER_ASSERT(reporter, mat.invert(nullptr)); in DEF_TEST()
879 REPORTER_ASSERT(reporter, mat.invert(&inverse)); in DEF_TEST()
880 iden1.setConcat(mat, inverse); in DEF_TEST()
882 iden2.setConcat(inverse, mat); in DEF_TEST()
884 test_flatten(reporter, mat); in DEF_TEST()
887 mat.setScale(0, 1); in DEF_TEST()
888 REPORTER_ASSERT(reporter, !mat.invert(nullptr)); in DEF_TEST()
889 REPORTER_ASSERT(reporter, !mat.invert(&inverse)); in DEF_TEST()
890 mat.setScale(1, 0); in DEF_TEST()
891 REPORTER_ASSERT(reporter, !mat.invert(nullptr)); in DEF_TEST()
892 REPORTER_ASSERT(reporter, !mat.invert(&inverse)); in DEF_TEST()
895 mat.setAll(0.0f, 1.0f, 2.0f, in DEF_TEST()
898 REPORTER_ASSERT(reporter, !mat.invert(nullptr)); in DEF_TEST()
899 REPORTER_ASSERT(reporter, !mat.invert(&inverse)); in DEF_TEST()
903 mat.setAll(std::numeric_limits<float>::denorm_min(), 0.f, 0.f, in DEF_TEST()
906 REPORTER_ASSERT(reporter, mat.isScaleTranslate()); in DEF_TEST()
907 REPORTER_ASSERT(reporter, !mat.invert(nullptr)); in DEF_TEST()
908 REPORTER_ASSERT(reporter, !mat.invert(&inverse)); in DEF_TEST()
912 mat.setAll(2.f, 0.f, std::numeric_limits<float>::quiet_NaN(), in DEF_TEST()
915 REPORTER_ASSERT(reporter, mat.isScaleTranslate()); in DEF_TEST()
916 REPORTER_ASSERT(reporter, !mat.invert(nullptr)); in DEF_TEST()
917 REPORTER_ASSERT(reporter, !mat.invert(&inverse)); in DEF_TEST()
919 mat.setAll(1.f, 0.f, std::numeric_limits<float>::quiet_NaN(), in DEF_TEST()
922 REPORTER_ASSERT(reporter, mat.isTranslate()); in DEF_TEST()
923 REPORTER_ASSERT(reporter, !mat.invert(nullptr)); in DEF_TEST()
924 REPORTER_ASSERT(reporter, !mat.invert(&inverse)); in DEF_TEST()
928 mat.setAll(std::numeric_limits<float>::min(), 0.f, std::numeric_limits<float>::max(), in DEF_TEST()
931 REPORTER_ASSERT(reporter, mat.isScaleTranslate()); in DEF_TEST()
932 REPORTER_ASSERT(reporter, mat.isFinite()); in DEF_TEST()
933 REPORTER_ASSERT(reporter, !mat.invert(nullptr)); in DEF_TEST()
934 REPORTER_ASSERT(reporter, !mat.invert(&inverse)); in DEF_TEST()
974 mat.reset(); in DEF_TEST()
975 mat.set(SkMatrix::kMScaleX, 1) in DEF_TEST()
982 REPORTER_ASSERT(reporter, mat.asAffine(affine)); in DEF_TEST()
984 #define affineEqual(e) affine[SkMatrix::kA##e] == mat.get(SkMatrix::kM##e) in DEF_TEST()
993 mat.set(SkMatrix::kMPersp1, SK_Scalar1 / 2); in DEF_TEST()
994 REPORTER_ASSERT(reporter, !mat.asAffine(affine)); in DEF_TEST()
998 mat.reset(); in DEF_TEST()
1000 mat.set(SkMatrix::kMSkewX, -zero); in DEF_TEST()
1001 REPORTER_ASSERT(reporter, are_equal(reporter, mat, mat2)); in DEF_TEST()
1004 mat.reset(); in DEF_TEST()
1005 mat.set(SkMatrix::kMSkewX, SK_ScalarNaN); in DEF_TEST()
1007 REPORTER_ASSERT(reporter, !are_equal(reporter, mat, mat2)); in DEF_TEST()
1018 mat.setScaleTranslate(2, 3, 1, 4); in DEF_TEST()
1020 REPORTER_ASSERT(reporter, mat == mat2); in DEF_TEST()
1040 SkMatrix mat; in DEF_TEST() local
1041 mat.setScale(2, 3).postTranslate(1, 4); in DEF_TEST()
1051 mat.mapPoints((SkPoint*)&dst[0].fLeft, (SkPoint*)&src.fLeft, 2); in DEF_TEST()
1053 mat.mapRect(&dst[1], src); in DEF_TEST()
1054 mat.mapRectScaleTranslate(&dst[2], src); in DEF_TEST()
1055 dst[3] = mat.mapRect(src); in DEF_TEST()