mirror of
https://github.com/dlang/phobos.git
synced 2025-04-29 14:40:30 +03:00
Add asserts for the "compiles" tests
This commit is contained in:
parent
c17a621bf2
commit
75cbbef0ab
9 changed files with 52 additions and 17 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue