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

Unified Diff: tests/AtomicTest.cpp

Issue 1423013004: For BUILD.public, let SkPreConfig.h set SK_RELEASE based on NDEBUG. (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: tests/AtomicTest.cpp
diff --git a/tests/AtomicTest.cpp b/tests/AtomicTest.cpp
index 530fba79d55129d6f599b67156b9bf59549a100c..782f85707460ef20ca317fcaa0894c4454fce799 100644
--- a/tests/AtomicTest.cpp
+++ b/tests/AtomicTest.cpp
@@ -15,7 +15,7 @@ struct AddInfo {
int timesToAdd;
};
-static int32_t base = 0;
+static int32_t val = 0;
static AddInfo gAdds[] = {
{ 3, 100 },
@@ -26,12 +26,12 @@ static AddInfo gAdds[] = {
static void addABunchOfTimes(void* data) {
AddInfo* addInfo = static_cast<AddInfo*>(data);
for (int i = 0; i < addInfo->timesToAdd; i++) {
- sk_atomic_add(&base, addInfo->valueToAdd);
+ sk_atomic_add(&val, addInfo->valueToAdd);
}
}
DEF_TEST(Atomic, reporter) {
- int32_t total = base;
+ int32_t total = val;
SkThread* threads[SK_ARRAY_COUNT(gAdds)];
for (size_t i = 0; i < SK_ARRAY_COUNT(gAdds); i++) {
total += gAdds[i].valueToAdd * gAdds[i].timesToAdd;
@@ -47,7 +47,7 @@ DEF_TEST(Atomic, reporter) {
threads[i]->join();
delete threads[i];
}
- REPORTER_ASSERT(reporter, total == base);
+ REPORTER_ASSERT(reporter, total == val);
// Ensure that the returned value from sk_atomic_add is correct.
int32_t valueToModify = 3;
const int32_t originalValue = valueToModify;

Powered by Google App Engine
This is Rietveld 408576698