mathlib: added todo testcases for ticket #2200

This commit is contained in:
Ettl Martin 2010-11-15 21:03:49 +01:00
parent 29bb553782
commit 88cc29ea0a
2 changed files with 17 additions and 9 deletions

View File

@ -59,15 +59,17 @@ private:
ASSERT_EQUALS("0" , MathLib::subtract("0", "0."));
// multiply
ASSERT_EQUALS("-0.003", MathLib::multiply("-1e-3", "3"));
ASSERT_EQUALS("-11.96", MathLib::multiply("-2.3", "5.2"));
ASSERT_EQUALS("3000" , MathLib::multiply("1E3", "3"));
ASSERT_EQUALS("3000" , MathLib::multiply("1E+3", "3"));
ASSERT_EQUALS("3000" , MathLib::multiply("1.0E3", "3"));
ASSERT_EQUALS("-3000" , MathLib::multiply("-1.0E3", "3"));
ASSERT_EQUALS("-3000" , MathLib::multiply("-1.0E+3", "3"));
ASSERT_EQUALS("0" , MathLib::multiply("-1.0E+3", "0"));
ASSERT_EQUALS("0" , MathLib::multiply("+1.0E+3", "0"));
ASSERT_EQUALS("-0.003" , MathLib::multiply("-1e-3", "3"));
ASSERT_EQUALS("-11.96" , MathLib::multiply("-2.3", "5.2"));
ASSERT_EQUALS("3000" , MathLib::multiply("1E3", "3"));
ASSERT_EQUALS("3000" , MathLib::multiply("1E+3", "3"));
ASSERT_EQUALS("3000" , MathLib::multiply("1.0E3", "3"));
ASSERT_EQUALS("-3000" , MathLib::multiply("-1.0E3", "3"));
ASSERT_EQUALS("-3000" , MathLib::multiply("-1.0E+3", "3"));
ASSERT_EQUALS("0" , MathLib::multiply("-1.0E+3", "0"));
ASSERT_EQUALS("0" , MathLib::multiply("+1.0E+3", "0"));
TODO_ASSERT_EQUALS("2147483648" , MathLib::multiply("2","1024*1024*1024"));
TODO_ASSERT_EQUALS("536870912" , MathLib::multiply("512","1024*1024"));
// divide
ASSERT_EQUALS("1" , MathLib::divide("1", "1"));

View File

@ -789,6 +789,12 @@ private:
ASSERT_EQUALS("", errout.str());
check("void foo()\n"
"{\n"
" std::cout << log(2.0) << std::endl;\n"
"}");
ASSERT_EQUALS("", errout.str());
// acos
check("void foo()\n"