| 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;
|
|
|