mirror of
https://github.com/deepseek-ai/3FS
synced 2025-06-26 18:16:45 +00:00
Initial commit
This commit is contained in:
22
tests/common/utils/TestAtomicValue.cc
Normal file
22
tests/common/utils/TestAtomicValue.cc
Normal file
@@ -0,0 +1,22 @@
|
||||
#include <folly/experimental/coro/GtestHelpers.h>
|
||||
|
||||
#include "common/utils/AtomicValue.h"
|
||||
|
||||
namespace hf3fs::test {
|
||||
namespace {
|
||||
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
TEST(TestAtomicValue, Normal) {
|
||||
AtomicValue<uint64_t> a;
|
||||
ASSERT_EQ(a, 0);
|
||||
|
||||
a = 1;
|
||||
ASSERT_EQ(a, 1);
|
||||
|
||||
AtomicValue<uint64_t> b = a;
|
||||
ASSERT_EQ(b, 1);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
} // namespace hf3fs::test
|
||||
Reference in New Issue
Block a user