/mordor/tests/atomic.cpp
C++ | 14 lines | 10 code | 3 blank | 1 comment | 0 complexity | da76ec4651b28cd414c567c86da784ac MD5 | raw file
Possible License(s): BSD-3-Clause
- // Copyright (c) 2010 - Mozy, Inc.
- #include "mordor/atomic.h"
- #include "mordor/test/test.h"
- using namespace Mordor;
- MORDOR_UNITTEST(Atomic, compareAndSwapNoSignExtension)
- {
- intptr_t storage = 0xb2d015c0;
- MORDOR_TEST_ASSERT_EQUAL(
- atomicCompareAndSwap(storage, (intptr_t)0xb2d015c1, (intptr_t)0xb2d015c0),
- (intptr_t)0xb2d015c0);
- }