Skip to content

Commit

Permalink
Add unittest for issue 6381.
Browse files Browse the repository at this point in the history
To prevent regressions.
  • Loading branch information
H. S. Teoh committed Aug 29, 2013
1 parent 40c6760 commit 5a622e0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions std/math.d
Expand Up @@ -5816,3 +5816,10 @@ unittest
real r = tan(-2.0L);
assert(fabs(r - 2.18504f) < .00001);
}

pure @safe nothrow unittest
{
// issue 6381: floor/ceil should be usable in pure function.
auto x = floor(1.2);
auto y = ceil(1.2);
}

0 comments on commit 5a622e0

Please sign in to comment.