mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-21 14:55:57 -06:00
.autotest
git-svn-id: svn://ultimatepp.org/upp/trunk@9409 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
ba5305ae72
commit
72a2b7816f
2 changed files with 9 additions and 3 deletions
|
|
@ -1,3 +1,5 @@
|
|||
description "#WAIT: 20\377";
|
||||
|
||||
uses
|
||||
Core;
|
||||
|
||||
|
|
|
|||
|
|
@ -13,12 +13,16 @@ CONSOLE_APP_MAIN
|
|||
LOG(i);
|
||||
String a('x', Random(10));
|
||||
String b('x', Random(10));
|
||||
a << AsString(Random());
|
||||
b << AsString(Random());
|
||||
a << FormatIntBase(Random(), 2) << FormatIntBase(Random(), 2) << FormatIntBase(Random(), 2);
|
||||
b << FormatIntBase(Random(), 2) << FormatIntBase(Random(), 2) << FormatIntBase(Random(), 2);
|
||||
|
||||
int n = min(a.GetLength(), b.GetLength());
|
||||
|
||||
ASSERT(sgn(fast_memcmp((byte *)~a, (byte *)~b, n)) == sgn(memcmp((byte *)~a, (byte *)~b, n)));
|
||||
ASSERT(sgn(fast_memcmp(~a, ~b, n)) == sgn(memcmp(~a, ~b, n)));
|
||||
|
||||
ASSERT(sgn(a.Compare(b)) == sgn(strcmp(~a, ~b)));
|
||||
|
||||
ASSERT(sgn(a.Compare(a)) == 0);
|
||||
}
|
||||
|
||||
LOG("------------ OK");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue