diff options
author | rmistry@google.com <rmistry@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-08-23 18:14:13 +0000 |
---|---|---|
committer | rmistry@google.com <rmistry@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-08-23 18:14:13 +0000 |
commit | d6176b0dcacb124539e0cfd051e6d93a9782f020 (patch) | |
tree | 9e6f4b465e54c9b26e1ba70cd8890b55abb08464 /tests/MemsetTest.cpp | |
parent | fbfcd5602128ec010c82cb733c9cdc0a3254f9f3 (diff) |
Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/)
This CL is part II of IV (I broke down the 1280 files into 4 CLs).
Review URL: https://codereview.appspot.com/6474054
git-svn-id: http://skia.googlecode.com/svn/trunk@5263 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tests/MemsetTest.cpp')
-rw-r--r-- | tests/MemsetTest.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/MemsetTest.cpp b/tests/MemsetTest.cpp index 7e80b57ddc..ad1a21c77c 100644 --- a/tests/MemsetTest.cpp +++ b/tests/MemsetTest.cpp @@ -12,7 +12,7 @@ static void test_chunkalloc(skiatest::Reporter* reporter) { size_t min = 256; SkChunkAlloc alloc(min); - + REPORTER_ASSERT(reporter, 0 == alloc.totalCapacity()); REPORTER_ASSERT(reporter, 0 == alloc.blockCount()); REPORTER_ASSERT(reporter, !alloc.contains(NULL)); @@ -27,7 +27,7 @@ static void test_chunkalloc(skiatest::Reporter* reporter) { REPORTER_ASSERT(reporter, alloc.totalCapacity() >= size); REPORTER_ASSERT(reporter, alloc.blockCount() > 0); REPORTER_ASSERT(reporter, alloc.contains(ptr)); - + alloc.reset(); REPORTER_ASSERT(reporter, !alloc.contains(ptr)); } @@ -71,14 +71,14 @@ static bool compare32(const uint32_t base[], uint32_t value, int count) { static void test_16(skiatest::Reporter* reporter) { uint16_t buffer[TOTAL]; - + for (int count = 0; count < MAX_COUNT; ++count) { for (int alignment = 0; alignment < MAX_ALIGNMENT; ++alignment) { set_zero(buffer, sizeof(buffer)); - + uint16_t* base = &buffer[PAD + alignment]; sk_memset16(base, VALUE16, count); - + compare16(buffer, 0, PAD + alignment); compare16(base, VALUE16, count); compare16(base + count, 0, TOTAL - count - PAD - alignment); @@ -88,14 +88,14 @@ static void test_16(skiatest::Reporter* reporter) { static void test_32(skiatest::Reporter* reporter) { uint32_t buffer[TOTAL]; - + for (int count = 0; count < MAX_COUNT; ++count) { for (int alignment = 0; alignment < MAX_ALIGNMENT; ++alignment) { set_zero(buffer, sizeof(buffer)); - + uint32_t* base = &buffer[PAD + alignment]; sk_memset32(base, VALUE32, count); - + compare32(buffer, 0, PAD + alignment); compare32(base, VALUE32, count); compare32(base + count, 0, TOTAL - count - PAD - alignment); @@ -111,7 +111,7 @@ static void test_32(skiatest::Reporter* reporter) { static void TestMemset(skiatest::Reporter* reporter) { test_16(reporter); test_32(reporter); - + test_chunkalloc(reporter); }; |