Fix Integer approximation for 0.

Change-Id: Ib4bab6f4f776342bf6311d1e6f8b6d245d9a048a
This commit is contained in:
Felix Raimundo
2016-04-22 10:53:30 +02:00
parent 77f057de82
commit 6f5cc68b75
2 changed files with 12 additions and 0 deletions

View File

@@ -54,4 +54,7 @@ QUIZ_CASE(poincare_integer_approximate) {
Context context;
assert(Integer(1).approximate(context) == 1.0f);
assert(Integer("12345678").approximate(context) == 12345678.0f);
assert(Integer("0").approximate(context) == 0);
assert(Integer("-0").approximate(context) == -0);
assert(Integer(-1).approximate(context) == -1);
}