Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit fa08dcd

Browse files
authored
Merge pull request #1860 from ibuclaw/64bitcas
atomicOp!(double) unittests depend on has64BitCAS merged-on-behalf-of: Iain Buclaw <ibuclaw@gdcproject.org>
2 parents d19ba06 + 3496ab0 commit fa08dcd

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/core/atomic.d

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1357,10 +1357,10 @@ version( unittest )
13571357
testCAS!(shared Klass)( new shared(Klass) );
13581358

13591359
testType!(float)(1.0f);
1360-
testType!(double)(1.0);
13611360

13621361
static if( has64BitCAS )
13631362
{
1363+
testType!(double)(1.0);
13641364
testType!(long)();
13651365
testType!(ulong)();
13661366
}
@@ -1377,9 +1377,12 @@ version( unittest )
13771377
atomicOp!"+="( f, 1 );
13781378
assert( f == 1 );
13791379

1380-
shared double d = 0;
1381-
atomicOp!"+="( d, 1 );
1382-
assert( d == 1 );
1380+
static if( has64BitCAS )
1381+
{
1382+
shared double d = 0;
1383+
atomicOp!"+="( d, 1 );
1384+
assert( d == 1 );
1385+
}
13831386
}
13841387

13851388
pure nothrow unittest

0 commit comments

Comments
 (0)