mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
Bug 1207696 Part 2b - Don't record activity in atomics unit tests, r=waldo.
--HG-- extra : rebase_source : 8fb15b2d0d73adf63ed3251f55c0cbbbcf0c9c18
This commit is contained in:
parent
47ccde0dda
commit
be2b98186b
@ -14,6 +14,7 @@ using mozilla::MemoryOrdering;
|
||||
using mozilla::Relaxed;
|
||||
using mozilla::ReleaseAcquire;
|
||||
using mozilla::SequentiallyConsistent;
|
||||
using mozilla::recordreplay::Behavior;
|
||||
|
||||
#define A(a,b) MOZ_RELEASE_ASSERT(a,b)
|
||||
|
||||
@ -21,7 +22,7 @@ template <typename T, MemoryOrdering Order>
|
||||
static void
|
||||
TestTypeWithOrdering()
|
||||
{
|
||||
Atomic<T, Order> atomic(5);
|
||||
Atomic<T, Order, Behavior::DontPreserve> atomic(5);
|
||||
A(atomic == 5, "Atomic variable did not initialize");
|
||||
|
||||
// Test atomic increment
|
||||
@ -87,7 +88,7 @@ static void
|
||||
TestPointerWithOrdering()
|
||||
{
|
||||
T array1[10];
|
||||
Atomic<T*, Order> atomic(array1);
|
||||
Atomic<T*, Order, Behavior::DontPreserve> atomic(array1);
|
||||
A(atomic == array1, "Atomic variable did not initialize");
|
||||
|
||||
// Test atomic increment
|
||||
@ -142,7 +143,7 @@ template<MemoryOrdering Order>
|
||||
static void
|
||||
TestEnumWithOrdering()
|
||||
{
|
||||
Atomic<EnumType, Order> atomic(EnumType_2);
|
||||
Atomic<EnumType, Order, Behavior::DontPreserve> atomic(EnumType_2);
|
||||
A(atomic == EnumType_2, "Atomic variable did not initialize");
|
||||
|
||||
// Test assignment
|
||||
@ -180,7 +181,7 @@ template<MemoryOrdering Order>
|
||||
static void
|
||||
TestEnumClassWithOrdering()
|
||||
{
|
||||
Atomic<EnumClass, Order> atomic(EnumClass::Value2);
|
||||
Atomic<EnumClass, Order, Behavior::DontPreserve> atomic(EnumClass::Value2);
|
||||
A(atomic == EnumClass::Value2, "Atomic variable did not initialize");
|
||||
|
||||
// Test assignment
|
||||
@ -210,7 +211,7 @@ template <MemoryOrdering Order>
|
||||
static void
|
||||
TestBoolWithOrdering()
|
||||
{
|
||||
Atomic<bool, Order> atomic(false);
|
||||
Atomic<bool, Order, Behavior::DontPreserve> atomic(false);
|
||||
A(atomic == false, "Atomic variable did not initialize");
|
||||
|
||||
// Test assignment
|
||||
|
Loading…
Reference in New Issue
Block a user