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

Side by Side Diff: tests/BitSetTest.cpp

Issue 100113004: Use DEFINE_TESTCLASS_SHORT macro in tests. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: rebase 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
« no previous file with comments | « tests/AtomicTest.cpp ('k') | tests/BitmapCopyTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1
2 /* 1 /*
3 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
4 * 3 *
5 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 5 * found in the LICENSE file.
7 */ 6 */
7
8 #include "Test.h" 8 #include "Test.h"
9 #include "TestClassDef.h"
9 #include "SkBitSet.h" 10 #include "SkBitSet.h"
10 11
11 static void TestBitSet(skiatest::Reporter* reporter) { 12 DEF_TEST(BitSet, reporter) {
12 SkBitSet set0(65536); 13 SkBitSet set0(65536);
13 REPORTER_ASSERT(reporter, set0.isBitSet(0) == false); 14 REPORTER_ASSERT(reporter, set0.isBitSet(0) == false);
14 REPORTER_ASSERT(reporter, set0.isBitSet(32767) == false); 15 REPORTER_ASSERT(reporter, set0.isBitSet(32767) == false);
15 REPORTER_ASSERT(reporter, set0.isBitSet(65535) == false); 16 REPORTER_ASSERT(reporter, set0.isBitSet(65535) == false);
16 17
17 SkBitSet set1(65536); 18 SkBitSet set1(65536);
18 REPORTER_ASSERT(reporter, set0 == set1); 19 REPORTER_ASSERT(reporter, set0 == set1);
19 20
20 set0.setBit(22, true); 21 set0.setBit(22, true);
21 REPORTER_ASSERT(reporter, set0.isBitSet(22) == true); 22 REPORTER_ASSERT(reporter, set0.isBitSet(22) == true);
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 set5.setBit(0, true); 68 set5.setBit(0, true);
68 REPORTER_ASSERT(reporter, set2 != set5); 69 REPORTER_ASSERT(reporter, set2 != set5);
69 REPORTER_ASSERT(reporter, set2 != set3); 70 REPORTER_ASSERT(reporter, set2 != set3);
70 set3.setBit(0, true); 71 set3.setBit(0, true);
71 REPORTER_ASSERT(reporter, set2 == set3); 72 REPORTER_ASSERT(reporter, set2 == set3);
72 set3.clearAll(); 73 set3.clearAll();
73 set3 = set2; 74 set3 = set2;
74 set2 = set2; 75 set2 = set2;
75 REPORTER_ASSERT(reporter, set2 == set3); 76 REPORTER_ASSERT(reporter, set2 == set3);
76 } 77 }
77
78 #include "TestClassDef.h"
79 DEFINE_TESTCLASS("BitSet", BitSetTest, TestBitSet)
OLDNEW
« no previous file with comments | « tests/AtomicTest.cpp ('k') | tests/BitmapCopyTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698