OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
3 * | 3 * |
4 * 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 |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "Test.h" | 8 #include "Test.h" |
9 #include "TestClassDef.h" | |
10 #include "SkBitSet.h" | 9 #include "SkBitSet.h" |
11 | 10 |
12 DEF_TEST(BitSet, reporter) { | 11 DEF_TEST(BitSet, reporter) { |
13 SkBitSet set0(65536); | 12 SkBitSet set0(65536); |
14 REPORTER_ASSERT(reporter, set0.isBitSet(0) == false); | 13 REPORTER_ASSERT(reporter, set0.isBitSet(0) == false); |
15 REPORTER_ASSERT(reporter, set0.isBitSet(32767) == false); | 14 REPORTER_ASSERT(reporter, set0.isBitSet(32767) == false); |
16 REPORTER_ASSERT(reporter, set0.isBitSet(65535) == false); | 15 REPORTER_ASSERT(reporter, set0.isBitSet(65535) == false); |
17 | 16 |
18 SkBitSet set1(65536); | 17 SkBitSet set1(65536); |
19 REPORTER_ASSERT(reporter, set0 == set1); | 18 REPORTER_ASSERT(reporter, set0 == set1); |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 set5.setBit(0, true); | 67 set5.setBit(0, true); |
69 REPORTER_ASSERT(reporter, set2 != set5); | 68 REPORTER_ASSERT(reporter, set2 != set5); |
70 REPORTER_ASSERT(reporter, set2 != set3); | 69 REPORTER_ASSERT(reporter, set2 != set3); |
71 set3.setBit(0, true); | 70 set3.setBit(0, true); |
72 REPORTER_ASSERT(reporter, set2 == set3); | 71 REPORTER_ASSERT(reporter, set2 == set3); |
73 set3.clearAll(); | 72 set3.clearAll(); |
74 set3 = set2; | 73 set3 = set2; |
75 set2 = set2; | 74 set2 = set2; |
76 REPORTER_ASSERT(reporter, set2 == set3); | 75 REPORTER_ASSERT(reporter, set2 == set3); |
77 } | 76 } |
OLD | NEW |