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

Unified Diff: tests/AtomicTest.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/AnnotationTest.cpp ('k') | tests/BitSetTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/AtomicTest.cpp
diff --git a/tests/AtomicTest.cpp b/tests/AtomicTest.cpp
index a9ab8d227972756c64b2cec726cba60f14a1ffb0..b7b13b3fab8e4cf5f19eea4af7ef332fd2042fe3 100644
--- a/tests/AtomicTest.cpp
+++ b/tests/AtomicTest.cpp
@@ -5,10 +5,11 @@
* found in the LICENSE file.
*/
+#include "Test.h"
+#include "TestClassDef.h"
#include "SkThread.h"
#include "SkThreadUtils.h"
#include "SkTypes.h"
-#include "Test.h"
struct AddInfo {
int32_t valueToAdd;
@@ -31,7 +32,7 @@ static void addABunchOfTimes(void* data) {
}
}
-static void test_atomicAddTests(skiatest::Reporter* reporter) {
+DEF_TEST(Atomic, reporter) {
int32_t total = base;
SkThread* threads[SK_ARRAY_COUNT(gAdds)];
for (size_t i = 0; i < SK_ARRAY_COUNT(gAdds); i++) {
@@ -55,6 +56,3 @@ static void test_atomicAddTests(skiatest::Reporter* reporter) {
const int32_t originalValue = valueToModify;
REPORTER_ASSERT(reporter, originalValue == sk_atomic_add(&valueToModify, 7));
}
-
-#include "TestClassDef.h"
-DEFINE_TESTCLASS("AtomicAdd", AtomicAddTestClass, test_atomicAddTests)
« no previous file with comments | « tests/AnnotationTest.cpp ('k') | tests/BitSetTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698