Add asserts for the "compiles" tests

This commit is contained in:
Dragos Carp 2015-11-16 03:04:07 +01:00
parent c17a621bf2
commit 75cbbef0ab
9 changed files with 52 additions and 17 deletions

View file

@ -765,14 +765,14 @@ unittest
// Issue #10130 - map of iota with const step.
const step = 2;
map!(i => i)(iota(0, 10, step));
assert(map!(i => i)(iota(0, 10, step)).walkLength == 5);
// Need these to all by const to repro the float case, due to the
// CommonType template used in the float specialization of iota.
const floatBegin = 0.0;
const floatEnd = 1.0;
const floatStep = 0.02;
map!(i => i)(iota(floatBegin, floatEnd, floatStep));
assert(map!(i => i)(iota(floatBegin, floatEnd, floatStep)).walkLength == 50);
}
@safe unittest