Skip to content

Commit

Permalink
Merge pull request #4328 from MartinNowak/rmCrappyTest
Browse files Browse the repository at this point in the history
remove crappy test
  • Loading branch information
yebblies committed Jan 24, 2015
2 parents ea1da14 + a5b356e commit 3968670
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions test/runnable/testarray.d
Expand Up @@ -3,6 +3,8 @@

import core.memory;

// see http://forum.dlang.org/thread/4BB6296E.6050506@digitalmars.com for more info

// failure case for bug fixed by druntime rev 282
// how it works:
// The erroneous code used the first element in the LRU cache to determine the
Expand Down Expand Up @@ -31,8 +33,6 @@ import core.memory;
// verify that they are wrong.
//
void main()
{
version(X86)
{
// fill up the cache to make it wrap, The block info cache has 8 elements,
// and the first element is not the first one filled, so we want to wrap to
Expand All @@ -58,13 +58,8 @@ version(X86)
y = new int[1];
y ~= 1;

// sanity check
assert((cast(void *)x.ptr - cast(void*)y.ptr) == 16, "Bug check code is wrong, please reorder allocations!");

// verify the noscan flag is 0 on the pointer-containing blocks
assert((GC.getAttr(x.ptr) & GC.BlkAttr.NO_SCAN) == 0);
x ~= "hello".dup; // this should leave the attributes alone
assert((GC.getAttr(x.ptr) & GC.BlkAttr.NO_SCAN) == 0); // fails on 2.042
}
}

0 comments on commit 3968670

Please sign in to comment.