Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(450)

Side by Side Diff: tests/MathTest.cpp

Issue 100113004: Use DEFINE_TESTCLASS_SHORT macro in tests. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 #include "Test.h" 8 #include "Test.h"
9 #include "SkFloatBits.h" 9 #include "SkFloatBits.h"
10 #include "SkFloatingPoint.h" 10 #include "SkFloatingPoint.h"
(...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after
640 if (false) test_floor(reporter); 640 if (false) test_floor(reporter);
641 641
642 // disable for now 642 // disable for now
643 if (false) test_blend31(); // avoid bit rot, suppress warning 643 if (false) test_blend31(); // avoid bit rot, suppress warning
644 644
645 test_muldivround(reporter); 645 test_muldivround(reporter);
646 test_clz(reporter); 646 test_clz(reporter);
647 } 647 }
648 648
649 #include "TestClassDef.h" 649 #include "TestClassDef.h"
650 DEFINE_TESTCLASS("Math", MathTestClass, TestMath) 650 DEFINE_TESTCLASS_SHORT(TestMath)
651 651
652 /////////////////////////////////////////////////////////////////////////////// 652 ///////////////////////////////////////////////////////////////////////////////
653 653
654 #include "SkEndian.h" 654 #include "SkEndian.h"
655 655
656 template <typename T> struct PairRec { 656 template <typename T> struct PairRec {
657 T fYin; 657 T fYin;
658 T fYang; 658 T fYang;
659 }; 659 };
660 660
(...skipping 22 matching lines...) Expand all
683 REPORTER_ASSERT(reporter, g16[i].fYang == SkEndianSwap16(g16[i].fYin)); 683 REPORTER_ASSERT(reporter, g16[i].fYang == SkEndianSwap16(g16[i].fYin));
684 } 684 }
685 for (size_t i = 0; i < SK_ARRAY_COUNT(g32); ++i) { 685 for (size_t i = 0; i < SK_ARRAY_COUNT(g32); ++i) {
686 REPORTER_ASSERT(reporter, g32[i].fYang == SkEndianSwap32(g32[i].fYin)); 686 REPORTER_ASSERT(reporter, g32[i].fYang == SkEndianSwap32(g32[i].fYin));
687 } 687 }
688 for (size_t i = 0; i < SK_ARRAY_COUNT(g64); ++i) { 688 for (size_t i = 0; i < SK_ARRAY_COUNT(g64); ++i) {
689 REPORTER_ASSERT(reporter, g64[i].fYang == SkEndianSwap64(g64[i].fYin)); 689 REPORTER_ASSERT(reporter, g64[i].fYang == SkEndianSwap64(g64[i].fYin));
690 } 690 }
691 } 691 }
692 692
693 DEFINE_TESTCLASS("Endian", EndianTestClass, TestEndian) 693 DEFINE_TESTCLASS_SHORT(TestEndian)
694 694
695 template <typename T> 695 template <typename T>
696 static void test_divmod(skiatest::Reporter* r) { 696 static void test_divmod(skiatest::Reporter* r) {
697 const struct { 697 const struct {
698 T numer; 698 T numer;
699 T denom; 699 T denom;
700 } kEdgeCases[] = { 700 } kEdgeCases[] = {
701 {(T)17, (T)17}, 701 {(T)17, (T)17},
702 {(T)17, (T)4}, 702 {(T)17, (T)4},
703 {(T)0, (T)17}, 703 {(T)0, (T)17},
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
755 test_divmod<int16_t>(r); 755 test_divmod<int16_t>(r);
756 } 756 }
757 757
758 DEF_TEST(divmod_s32, r) { 758 DEF_TEST(divmod_s32, r) {
759 test_divmod<int32_t>(r); 759 test_divmod<int32_t>(r);
760 } 760 }
761 761
762 DEF_TEST(divmod_s64, r) { 762 DEF_TEST(divmod_s64, r) {
763 test_divmod<int64_t>(r); 763 test_divmod<int64_t>(r);
764 } 764 }
OLDNEW
« tests/AnnotationTest.cpp ('K') | « tests/MD5Test.cpp ('k') | tests/Matrix44Test.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698