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

Commit

Permalink
rt.lifetime: Disable tests incompatible with debug=SENTINEL
Browse files Browse the repository at this point in the history
  • Loading branch information
CyberShadow committed Mar 24, 2015
1 parent 5280836 commit a405350
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/rt/lifetime.d
Expand Up @@ -2437,7 +2437,8 @@ unittest
auto info = GC.query(arr.ptr);
assert(info.attr & BlkAttr.NO_SCAN); // should be NO_SCAN
arr ~= 0; // ensure array is inserted into cache
assert(arr.ptr is info.base);
debug(SENTINEL) {} else
assert(arr.ptr is info.base);
GC.clrAttr(arr.ptr, BlkAttr.NO_SCAN); // remove the attribute
auto arr2 = arr[0..1];
assert(arr2.capacity == 0); // cannot append
Expand All @@ -2462,7 +2463,8 @@ unittest
info = GC.query(carr.ptr);
assert(info.attr & BlkAttr.NO_SCAN); // should be NO_SCAN
carr ~= 0; // ensure array is inserted into cache
assert(carr.ptr is info.base);
debug(SENTINEL) {} else
assert(carr.ptr is info.base);
GC.clrAttr(carr.ptr, BlkAttr.NO_SCAN); // remove the attribute
auto carr2 = carr[0..1];
assert(carr2.capacity == 0); // cannot append
Expand All @@ -2484,6 +2486,7 @@ unittest
}

// test struct finalizers
debug(SENTINEL) {} else
unittest
{
__gshared int dtorCount;
Expand Down Expand Up @@ -2588,6 +2591,7 @@ unittest
}

// test struct finalizers exception handling
debug(SENTINEL) {} else
unittest
{
if (!callStructDtorsDuringGC)
Expand Down

0 comments on commit a405350

Please sign in to comment.