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

Side by Side Diff: tests/SHA1Test.cpp

Issue 138563004: Move macros from TestClassDef.h to Test.h (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: upload Created 6 years, 11 months 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/RuntimeConfigTest.cpp ('k') | tests/ScalarTest.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 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 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 "SkSHA1.h" 9 #include "SkSHA1.h"
11 10
12 static bool digests_equal(const SkSHA1::Digest& expectedDigest, const SkSHA1::Di gest& computedDigest) { 11 static bool digests_equal(const SkSHA1::Digest& expectedDigest, const SkSHA1::Di gest& computedDigest) {
13 for (size_t i = 0; i < SK_ARRAY_COUNT(expectedDigest.data); ++i) { 12 for (size_t i = 0; i < SK_ARRAY_COUNT(expectedDigest.data); ++i) {
14 if (expectedDigest.data[i] != computedDigest.data[i]) { 13 if (expectedDigest.data[i] != computedDigest.data[i]) {
15 return false; 14 return false;
16 } 15 }
17 } 16 }
18 return true; 17 return true;
19 } 18 }
(...skipping 25 matching lines...) Expand all
45 context.finish(digest); 44 context.finish(digest);
46 45
47 REPORTER_ASSERT(reporter, digests_equal(test.digest, digest)); 46 REPORTER_ASSERT(reporter, digests_equal(test.digest, digest));
48 } 47 }
49 48
50 DEF_TEST(SHA1, reporter) { 49 DEF_TEST(SHA1, reporter) {
51 for (size_t i = 0; i < SK_ARRAY_COUNT(sha1_tests); ++i) { 50 for (size_t i = 0; i < SK_ARRAY_COUNT(sha1_tests); ++i) {
52 sha1_test(sha1_tests[i], reporter); 51 sha1_test(sha1_tests[i], reporter);
53 } 52 }
54 } 53 }
OLDNEW
« no previous file with comments | « tests/RuntimeConfigTest.cpp ('k') | tests/ScalarTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698