diff options
Diffstat (limited to 'libphobos/testsuite/libphobos.gc/nocollect.d')
-rw-r--r-- | libphobos/testsuite/libphobos.gc/nocollect.d | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libphobos/testsuite/libphobos.gc/nocollect.d b/libphobos/testsuite/libphobos.gc/nocollect.d new file mode 100644 index 00000000000..5df1483a284 --- /dev/null +++ b/libphobos/testsuite/libphobos.gc/nocollect.d @@ -0,0 +1,15 @@ +// https://issues.dlang.org/show_bug.cgi?id=20567 + +import core.memory; + +void main() +{ + auto stats = GC.profileStats(); + assert(stats.numCollections == 0); + + char[] sbuf = new char[256]; // small pool + char[] lbuf = new char[2049]; // large pool + + stats = GC.profileStats(); + assert(stats.numCollections == 0); +}
\ No newline at end of file |