mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
.autotest
git-svn-id: svn://ultimatepp.org/upp/trunk@16007 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
42a6fa7062
commit
a788390fc7
1 changed files with 10 additions and 1 deletions
|
|
@ -9,7 +9,16 @@ void Test(Convert& cv, const char *s, Value res)
|
|||
if(IsError(res))
|
||||
ASSERT(IsError(v));
|
||||
else
|
||||
ASSERT(v == res);
|
||||
if(IsNumber(v)) {
|
||||
double x = res;
|
||||
double y = v;
|
||||
if(y == 0)
|
||||
ASSERT(x == 0);
|
||||
else
|
||||
ASSERT(abs((x - y) / x) < 0.00000000000001);
|
||||
}
|
||||
else
|
||||
ASSERT(res == v);
|
||||
}
|
||||
|
||||
CONSOLE_APP_MAIN
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue