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@7235 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
0593cf8952
commit
ff622d35b6
1 changed files with 29 additions and 2 deletions
|
|
@ -8,7 +8,6 @@ void Test(Value v, bool exc)
|
|||
try {
|
||||
LOG(v << " -> " << typeid(T).name());
|
||||
T x = v;
|
||||
ASSERT(x == v);
|
||||
ASSERT(!exc);
|
||||
}
|
||||
catch(ValueTypeError e) {
|
||||
|
|
@ -26,9 +25,37 @@ CONSOLE_APP_MAIN
|
|||
Test<int>(123.0, false);
|
||||
Test<int>(true, false);
|
||||
Test<int>((int64)1, false);
|
||||
|
||||
Test<int>("ahoj", true);
|
||||
Test<int>(WString("ahoj"), true);
|
||||
Test<int>(GetSysDate(), true);
|
||||
Test<int>(GetSysTime(), true);
|
||||
|
||||
Test<String>(123, true);
|
||||
Test<String>(123.0, true);
|
||||
Test<String>(true, true);
|
||||
Test<String>((int64)1, true);
|
||||
Test<String>("ahoj", false);
|
||||
Test<String>(WString("ahoj"), false);
|
||||
Test<String>(GetSysDate(), true);
|
||||
Test<String>(GetSysTime(), true);
|
||||
|
||||
Test<WString>(123, true);
|
||||
Test<WString>(123.0, true);
|
||||
Test<WString>(true, true);
|
||||
Test<WString>((int64)1, true);
|
||||
Test<WString>("ahoj", false);
|
||||
Test<WString>(WString("ahoj"), false);
|
||||
Test<WString>(GetSysDate(), true);
|
||||
Test<WString>(GetSysTime(), true);
|
||||
|
||||
Test<Date>(123, true);
|
||||
Test<Date>(123.0, true);
|
||||
Test<Date>(true, true);
|
||||
Test<Date>((int64)1, true);
|
||||
Test<Date>("ahoj", true);
|
||||
Test<Date>(WString("ahoj"), true);
|
||||
Test<Date>(GetSysDate(), false);
|
||||
Test<Date>(GetSysTime(), false);
|
||||
|
||||
Test<Color>(Color(1, 2, 3), false);
|
||||
Test<String>(Color(1, 2, 3), true);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue