/external/chromium_org/third_party/skia/tests/ |
Reader32Test.cpp | 11 static void assert_eof(skiatest::Reporter* reporter, const SkReader32& reader) { 12 REPORTER_ASSERT(reporter, reader.eof()); 13 REPORTER_ASSERT(reporter, reader.size() == reader.offset()); 14 REPORTER_ASSERT(reporter, (const char*)reader.peek() == 18 static void assert_start(skiatest::Reporter* reporter, const SkReader32& reader) { 19 REPORTER_ASSERT(reporter, 0 == reader.offset()); 20 REPORTER_ASSERT(reporter, reader.size() == reader.available()); 21 REPORTER_ASSERT(reporter, reader.isAvailable(reader.size())) [all...] |
TSetTest.cpp | 14 static void TestTSet_basic(skiatest::Reporter* reporter) { 16 REPORTER_ASSERT(reporter, set0.isEmpty()); 17 REPORTER_ASSERT(reporter, !set0.contains(-1)); 18 REPORTER_ASSERT(reporter, !set0.contains(0)); 19 REPORTER_ASSERT(reporter, !set0.contains(1)); 20 REPORTER_ASSERT(reporter, set0.count() == 0); 22 REPORTER_ASSERT(reporter, set0.add(0)); 23 REPORTER_ASSERT(reporter, !set0.isEmpty()); 24 REPORTER_ASSERT(reporter, !set0.contains(-1)) [all...] |
BitSetTest.cpp | 11 DEF_TEST(BitSet, reporter) { 13 REPORTER_ASSERT(reporter, set0.isBitSet(0) == false); 14 REPORTER_ASSERT(reporter, set0.isBitSet(32767) == false); 15 REPORTER_ASSERT(reporter, set0.isBitSet(65535) == false); 18 REPORTER_ASSERT(reporter, set0 == set1); 21 REPORTER_ASSERT(reporter, set0.isBitSet(22) == true); 23 REPORTER_ASSERT(reporter, set0.isBitSet(24) == true); 25 REPORTER_ASSERT(reporter, set0.isBitSet(35) == true); 27 REPORTER_ASSERT(reporter, set0.isBitSet(22) == false); 28 REPORTER_ASSERT(reporter, set0.isBitSet(24) == true) [all...] |
TArrayTest.cpp | 14 static void TestTSet_basic(skiatest::Reporter* reporter) { 18 REPORTER_ASSERT(reporter, a.empty()); 19 REPORTER_ASSERT(reporter, a.count() == 0); 23 REPORTER_ASSERT(reporter, !a.empty()); 24 REPORTER_ASSERT(reporter, a.count() == 1); 28 REPORTER_ASSERT(reporter, a.empty()); 29 REPORTER_ASSERT(reporter, a.count() == 0); 33 REPORTER_ASSERT(reporter, a.push_back() = 1); 35 REPORTER_ASSERT(reporter, !a.empty()) [all...] |
TestSize.cpp | 11 static void TestISize(skiatest::Reporter* reporter) { 15 REPORTER_ASSERT(reporter, a.isEmpty()); 17 REPORTER_ASSERT(reporter, a.isEmpty()); 19 REPORTER_ASSERT(reporter, a.isEmpty()); 21 REPORTER_ASSERT(reporter, a == b); 24 REPORTER_ASSERT(reporter, !a.isEmpty()); 26 REPORTER_ASSERT(reporter, !b.isEmpty()); 27 REPORTER_ASSERT(reporter, a == b); 28 REPORTER_ASSERT(reporter, !(a != b)) [all...] |
RefDictTest.cpp | 18 DEF_TEST(RefDict, reporter) { 22 REPORTER_ASSERT(reporter, NULL == dict.find(NULL)); 23 REPORTER_ASSERT(reporter, NULL == dict.find("foo")); 24 REPORTER_ASSERT(reporter, NULL == dict.find("bar")); 27 REPORTER_ASSERT(reporter, &data0 == dict.find("foo")); 28 REPORTER_ASSERT(reporter, 2 == data0.getRefCnt()); 31 REPORTER_ASSERT(reporter, &data0 == dict.find("foo")); 32 REPORTER_ASSERT(reporter, 2 == data0.getRefCnt()); 35 REPORTER_ASSERT(reporter, &data1 == dict.find("foo")); 36 REPORTER_ASSERT(reporter, 1 == data0.getRefCnt()) [all...] |
DiscardableMemoryPoolTest.cpp | 11 DEF_TEST(DiscardableMemoryPool, reporter) { 15 REPORTER_ASSERT(reporter, 0 == pool->getRAMUsed()); 18 REPORTER_ASSERT(reporter, dm1->data() != NULL); 19 REPORTER_ASSERT(reporter, 100 == pool->getRAMUsed()); 21 REPORTER_ASSERT(reporter, 0 == pool->getRAMUsed()); 22 REPORTER_ASSERT(reporter, !dm1->lock()); 26 REPORTER_ASSERT(reporter, 200 == pool->getRAMUsed()); 29 REPORTER_ASSERT(reporter, 200 == pool->getRAMUsed()); 30 REPORTER_ASSERT(reporter, dm2->lock()); 33 REPORTER_ASSERT(reporter, !dm2->lock()) [all...] |
MetaDataTest.cpp | 11 static void test_ptrs(skiatest::Reporter* reporter) { 13 REPORTER_ASSERT(reporter, 1 == ref.getRefCnt()); 20 REPORTER_ASSERT(reporter, md0.findRefCnt(name)); 21 REPORTER_ASSERT(reporter, md0.hasRefCnt(name, &ref)); 22 REPORTER_ASSERT(reporter, 2 == ref.getRefCnt()); 25 REPORTER_ASSERT(reporter, md1.findRefCnt(name)); 26 REPORTER_ASSERT(reporter, md1.hasRefCnt(name, &ref)); 27 REPORTER_ASSERT(reporter, 3 == ref.getRefCnt()); 29 REPORTER_ASSERT(reporter, md0.removeRefCnt(name)) [all...] |
XfermodeTest.cpp | 14 static void test_asMode(skiatest::Reporter* reporter) { 19 REPORTER_ASSERT(reporter, reportedMode != mode); 22 REPORTER_ASSERT(reporter, SkXfermode::AsMode(xfer, &reportedMode)); 23 REPORTER_ASSERT(reporter, reportedMode == mode); 28 REPORTER_ASSERT(reporter, xfer->asMode(&reportedMode)); 29 REPORTER_ASSERT(reporter, reportedMode == mode); 32 REPORTER_ASSERT(reporter, SkXfermode::kSrcOver_Mode == mode); 37 static void test_IsMode(skiatest::Reporter* reporter) { [all...] |
DataRefTest.cpp | 16 static void test_is_equal(skiatest::Reporter* reporter, 18 REPORTER_ASSERT(reporter, a->count() == b->count()); 23 REPORTER_ASSERT(reporter, sizea == sizeb); 24 REPORTER_ASSERT(reporter, !memcmp(mema, memb, sizea)); 28 static void test_datatable_is_empty(skiatest::Reporter* reporter, 30 REPORTER_ASSERT(reporter, table->isEmpty()); 31 REPORTER_ASSERT(reporter, 0 == table->count()); 34 static void test_emptytable(skiatest::Reporter* reporter) [all...] |
UtilsTest.cpp | 28 static void test_autounref(skiatest::Reporter* reporter) { 30 REPORTER_ASSERT(reporter, 1 == obj.getRefCnt()); 33 REPORTER_ASSERT(reporter, &obj == tmp.get()); 34 REPORTER_ASSERT(reporter, 1 == obj.getRefCnt()); 36 REPORTER_ASSERT(reporter, &obj == tmp.detach()); 37 REPORTER_ASSERT(reporter, 1 == obj.getRefCnt()); 38 REPORTER_ASSERT(reporter, NULL == tmp.detach()); 39 REPORTER_ASSERT(reporter, NULL == tmp.get()); 42 REPORTER_ASSERT(reporter, 2 == obj.getRefCnt()) [all...] |
GpuRectanizerTest.cpp | 21 static void test_rectanizer_basic(skiatest::Reporter* reporter, GrRectanizer* rectanizer) { 22 REPORTER_ASSERT(reporter, kWidth == rectanizer->width()); 23 REPORTER_ASSERT(reporter, kHeight == rectanizer->height()); 27 REPORTER_ASSERT(reporter, rectanizer->addRect(50, 50, &loc)); 28 REPORTER_ASSERT(reporter, rectanizer->percentFull() > 0.0f); 30 REPORTER_ASSERT(reporter, rectanizer->percentFull() == 0.0f); 33 static void test_rectanizer_inserts(skiatest::Reporter*, 47 static void test_skyline(skiatest::Reporter* reporter, const SkTDArray<SkISize>& rects) [all...] |
/external/skia/tests/ |
Reader32Test.cpp | 11 static void assert_eof(skiatest::Reporter* reporter, const SkReader32& reader) { 12 REPORTER_ASSERT(reporter, reader.eof()); 13 REPORTER_ASSERT(reporter, reader.size() == reader.offset()); 14 REPORTER_ASSERT(reporter, (const char*)reader.peek() == 18 static void assert_start(skiatest::Reporter* reporter, const SkReader32& reader) { 19 REPORTER_ASSERT(reporter, 0 == reader.offset()); 20 REPORTER_ASSERT(reporter, reader.size() == reader.available()); 21 REPORTER_ASSERT(reporter, reader.isAvailable(reader.size())) [all...] |
TSetTest.cpp | 14 static void TestTSet_basic(skiatest::Reporter* reporter) { 16 REPORTER_ASSERT(reporter, set0.isEmpty()); 17 REPORTER_ASSERT(reporter, !set0.contains(-1)); 18 REPORTER_ASSERT(reporter, !set0.contains(0)); 19 REPORTER_ASSERT(reporter, !set0.contains(1)); 20 REPORTER_ASSERT(reporter, set0.count() == 0); 22 REPORTER_ASSERT(reporter, set0.add(0)); 23 REPORTER_ASSERT(reporter, !set0.isEmpty()); 24 REPORTER_ASSERT(reporter, !set0.contains(-1)) [all...] |
BitSetTest.cpp | 11 DEF_TEST(BitSet, reporter) { 13 REPORTER_ASSERT(reporter, set0.isBitSet(0) == false); 14 REPORTER_ASSERT(reporter, set0.isBitSet(32767) == false); 15 REPORTER_ASSERT(reporter, set0.isBitSet(65535) == false); 18 REPORTER_ASSERT(reporter, set0 == set1); 21 REPORTER_ASSERT(reporter, set0.isBitSet(22) == true); 23 REPORTER_ASSERT(reporter, set0.isBitSet(24) == true); 25 REPORTER_ASSERT(reporter, set0.isBitSet(35) == true); 27 REPORTER_ASSERT(reporter, set0.isBitSet(22) == false); 28 REPORTER_ASSERT(reporter, set0.isBitSet(24) == true) [all...] |
TArrayTest.cpp | 14 static void TestTSet_basic(skiatest::Reporter* reporter) { 18 REPORTER_ASSERT(reporter, a.empty()); 19 REPORTER_ASSERT(reporter, a.count() == 0); 23 REPORTER_ASSERT(reporter, !a.empty()); 24 REPORTER_ASSERT(reporter, a.count() == 1); 28 REPORTER_ASSERT(reporter, a.empty()); 29 REPORTER_ASSERT(reporter, a.count() == 0); 33 REPORTER_ASSERT(reporter, a.push_back() = 1); 35 REPORTER_ASSERT(reporter, !a.empty()) [all...] |
TestSize.cpp | 11 static void TestISize(skiatest::Reporter* reporter) { 15 REPORTER_ASSERT(reporter, a.isEmpty()); 17 REPORTER_ASSERT(reporter, a.isEmpty()); 19 REPORTER_ASSERT(reporter, a.isEmpty()); 21 REPORTER_ASSERT(reporter, a == b); 24 REPORTER_ASSERT(reporter, !a.isEmpty()); 26 REPORTER_ASSERT(reporter, !b.isEmpty()); 27 REPORTER_ASSERT(reporter, a == b); 28 REPORTER_ASSERT(reporter, !(a != b)) [all...] |
RefDictTest.cpp | 18 DEF_TEST(RefDict, reporter) { 22 REPORTER_ASSERT(reporter, NULL == dict.find(NULL)); 23 REPORTER_ASSERT(reporter, NULL == dict.find("foo")); 24 REPORTER_ASSERT(reporter, NULL == dict.find("bar")); 27 REPORTER_ASSERT(reporter, &data0 == dict.find("foo")); 28 REPORTER_ASSERT(reporter, 2 == data0.getRefCnt()); 31 REPORTER_ASSERT(reporter, &data0 == dict.find("foo")); 32 REPORTER_ASSERT(reporter, 2 == data0.getRefCnt()); 35 REPORTER_ASSERT(reporter, &data1 == dict.find("foo")); 36 REPORTER_ASSERT(reporter, 1 == data0.getRefCnt()) [all...] |
DiscardableMemoryPoolTest.cpp | 11 DEF_TEST(DiscardableMemoryPool, reporter) { 15 REPORTER_ASSERT(reporter, 0 == pool->getRAMUsed()); 18 REPORTER_ASSERT(reporter, dm1->data() != NULL); 19 REPORTER_ASSERT(reporter, 100 == pool->getRAMUsed()); 21 REPORTER_ASSERT(reporter, 0 == pool->getRAMUsed()); 22 REPORTER_ASSERT(reporter, !dm1->lock()); 26 REPORTER_ASSERT(reporter, 200 == pool->getRAMUsed()); 29 REPORTER_ASSERT(reporter, 200 == pool->getRAMUsed()); 30 REPORTER_ASSERT(reporter, dm2->lock()); 33 REPORTER_ASSERT(reporter, !dm2->lock()) [all...] |
MetaDataTest.cpp | 11 static void test_ptrs(skiatest::Reporter* reporter) { 13 REPORTER_ASSERT(reporter, 1 == ref.getRefCnt()); 20 REPORTER_ASSERT(reporter, md0.findRefCnt(name)); 21 REPORTER_ASSERT(reporter, md0.hasRefCnt(name, &ref)); 22 REPORTER_ASSERT(reporter, 2 == ref.getRefCnt()); 25 REPORTER_ASSERT(reporter, md1.findRefCnt(name)); 26 REPORTER_ASSERT(reporter, md1.hasRefCnt(name, &ref)); 27 REPORTER_ASSERT(reporter, 3 == ref.getRefCnt()); 29 REPORTER_ASSERT(reporter, md0.removeRefCnt(name)) [all...] |
XfermodeTest.cpp | 14 static void test_asMode(skiatest::Reporter* reporter) { 19 REPORTER_ASSERT(reporter, reportedMode != mode); 22 REPORTER_ASSERT(reporter, SkXfermode::AsMode(xfer, &reportedMode)); 23 REPORTER_ASSERT(reporter, reportedMode == mode); 28 REPORTER_ASSERT(reporter, xfer->asMode(&reportedMode)); 29 REPORTER_ASSERT(reporter, reportedMode == mode); 32 REPORTER_ASSERT(reporter, SkXfermode::kSrcOver_Mode == mode); 37 static void test_IsMode(skiatest::Reporter* reporter) { [all...] |
DataRefTest.cpp | 16 static void test_is_equal(skiatest::Reporter* reporter, 18 REPORTER_ASSERT(reporter, a->count() == b->count()); 23 REPORTER_ASSERT(reporter, sizea == sizeb); 24 REPORTER_ASSERT(reporter, !memcmp(mema, memb, sizea)); 28 static void test_datatable_is_empty(skiatest::Reporter* reporter, 30 REPORTER_ASSERT(reporter, table->isEmpty()); 31 REPORTER_ASSERT(reporter, 0 == table->count()); 34 static void test_emptytable(skiatest::Reporter* reporter) [all...] |
UtilsTest.cpp | 28 static void test_autounref(skiatest::Reporter* reporter) { 30 REPORTER_ASSERT(reporter, 1 == obj.getRefCnt()); 33 REPORTER_ASSERT(reporter, &obj == tmp.get()); 34 REPORTER_ASSERT(reporter, 1 == obj.getRefCnt()); 36 REPORTER_ASSERT(reporter, &obj == tmp.detach()); 37 REPORTER_ASSERT(reporter, 1 == obj.getRefCnt()); 38 REPORTER_ASSERT(reporter, NULL == tmp.detach()); 39 REPORTER_ASSERT(reporter, NULL == tmp.get()); 42 REPORTER_ASSERT(reporter, 2 == obj.getRefCnt()) [all...] |
GpuRectanizerTest.cpp | 21 static void test_rectanizer_basic(skiatest::Reporter* reporter, GrRectanizer* rectanizer) { 22 REPORTER_ASSERT(reporter, kWidth == rectanizer->width()); 23 REPORTER_ASSERT(reporter, kHeight == rectanizer->height()); 27 REPORTER_ASSERT(reporter, rectanizer->addRect(50, 50, &loc)); 28 REPORTER_ASSERT(reporter, rectanizer->percentFull() > 0.0f); 30 REPORTER_ASSERT(reporter, rectanizer->percentFull() == 0.0f); 33 static void test_rectanizer_inserts(skiatest::Reporter*, 47 static void test_skyline(skiatest::Reporter* reporter, const SkTDArray<SkISize>& rects) [all...] |
/external/chromium_org/third_party/skia/forth/ |
ForthTests.cpp | 11 class Reporter { 15 Reporter() : fFailureCount(0) {} 20 typedef void (*ForthWordTestProc)(ForthWord*, ForthEngine*, Reporter*); 22 #define FORTH_ASSERT(reporter, expression) \ 25 reporter->reportFailure(#expression, __FILE__, __LINE__); \ 29 static void drop_test0(ForthWord* word, ForthEngine* fe, Reporter* reporter) { 32 FORTH_ASSERT(reporter, 0 == fe->depth()); 35 static void drop_test1(ForthWord* word, ForthEngine* fe, Reporter* reporter) { 384 Reporter reporter; local [all...] |