ubuntu-buildroot/output/build/host-gcc-initial-11.4.0/gcc/testsuite/gdc.test/runnable/testbitarray.d

18 lines
309 B
D

// RUNNABLE_PHOBOS_TEST
// PERMUTE_ARGS:
import std.bitmanip;
void main() {
BitArray a;
a.length = 5;
foreach (ref bool b; a) {
assert (b == 0);
b = 1;
}
foreach (bool b; a)
assert (b == 1); // FAILS, they're all 0
}