Index: tests/AtomicTest.cpp |
diff --git a/tests/AtomicTest.cpp b/tests/AtomicTest.cpp |
index 7eb7a7103b78ccbfeb8859328fc4aad6ab4cf0e4..e9db3f093dd2271155887909113b8a8a60a4ee47 100644 |
--- a/tests/AtomicTest.cpp |
+++ b/tests/AtomicTest.cpp |
@@ -54,4 +54,13 @@ DEF_TEST(Atomic, reporter) { |
int32_t valueToModify = 3; |
const int32_t originalValue = valueToModify; |
REPORTER_ASSERT(reporter, originalValue == sk_atomic_add(&valueToModify, 7)); |
+ |
+ { |
+ SkAtomic<int> v {0}; |
+ REPORTER_ASSERT(reporter, 0 == v.load()); |
+ v = 10; |
+ REPORTER_ASSERT(reporter, 10 == v.load()); |
+ int q = v; |
+ REPORTER_ASSERT(reporter, 10 == q); |
+ } |
} |