/mordor/tests/atomic.cpp
C++ | 14 lines | 10 code | 3 blank | 1 comment | 0 complexity | da76ec4651b28cd414c567c86da784ac MD5 | raw file
1// Copyright (c) 2010 - Mozy, Inc. 2 3#include "mordor/atomic.h" 4#include "mordor/test/test.h" 5 6using namespace Mordor; 7 8MORDOR_UNITTEST(Atomic, compareAndSwapNoSignExtension) 9{ 10 intptr_t storage = 0xb2d015c0; 11 MORDOR_TEST_ASSERT_EQUAL( 12 atomicCompareAndSwap(storage, (intptr_t)0xb2d015c1, (intptr_t)0xb2d015c0), 13 (intptr_t)0xb2d015c0); 14}