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

Unified Diff: runtime/vm/atomic_test.cc

Issue 1658983004: Change signature of atomic increment/decrement functions to return void. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/atomic_macos.h ('k') | runtime/vm/atomic_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/atomic_test.cc
diff --git a/runtime/vm/atomic_test.cc b/runtime/vm/atomic_test.cc
index db9be229f76252105474269783cd0aa7ca824b12..6973d8b42a03c14a8ead95c8ca2e7e1935166d9e 100644
--- a/runtime/vm/atomic_test.cc
+++ b/runtime/vm/atomic_test.cc
@@ -26,18 +26,16 @@ UNIT_TEST_CASE(FetchAndDecrement) {
}
-UNIT_TEST_CASE(FetchAndIncrementBy) {
+UNIT_TEST_CASE(IncrementBy) {
intptr_t v = 42;
- EXPECT_EQ(static_cast<uintptr_t>(42),
- AtomicOperations::FetchAndIncrementBy(&v, 100));
+ AtomicOperations::IncrementBy(&v, 100);
EXPECT_EQ(static_cast<intptr_t>(142), v);
}
-UNIT_TEST_CASE(FetchAndDecrementBy) {
+UNIT_TEST_CASE(DecrementBy) {
intptr_t v = 42;
- EXPECT_EQ(static_cast<uintptr_t>(42),
- AtomicOperations::FetchAndDecrementBy(&v, 41));
+ AtomicOperations::DecrementBy(&v, 41);
EXPECT_EQ(static_cast<intptr_t>(1), v);
}
« no previous file with comments | « runtime/vm/atomic_macos.h ('k') | runtime/vm/atomic_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698