mirror of
https://github.com/gbdev/rgbds.git
synced 2026-10-05 19:56:18 +00:00
Make STRCMP and STRICMP tests more precise
This commit is contained in:
1 parent
6edf41e83f
commit
ed02991af9
1 file changed
+13
-4
@@ -6,10 +6,19 @@ assert "a" === "b" == 0
|
||||
assert 1 == "a" !== "b"
|
||||
assert 1 + 2 * 3 ** "x" !== "y" == 7
|
||||
|
||||
assert !STRCMP("Hello", "Hello")
|
||||
assert !STRCMP("", "")
|
||||
assert STRCMP("hello", "HELLO") == 1
|
||||
assert STRCMP("HELLO", "hello") == -1
|
||||
assert STRCMP("hell", "hello") == -1
|
||||
assert STRCMP("hello", "hell") == 1
|
||||
assert STRCMP("hello", "goodbye") == 1
|
||||
|
||||
assert !STRICMP("hello", "hello")
|
||||
assert !STRICMP("hello", "HELLO")
|
||||
assert !STRICMP("HeLlO", "hElLo")
|
||||
assert STRICMP("HELLO", "goodBYE") > 0
|
||||
assert STRICMP("hello", "GOODbye") > 0
|
||||
assert STRICMP("", "hello") < 0
|
||||
assert STRICMP("hello", "") > 0
|
||||
assert !STRICMP("", "")
|
||||
assert STRICMP("HELLO", "goodBYE") == 1
|
||||
assert STRICMP("hello", "GOODbye") == 1
|
||||
assert STRICMP("", "hello") == -1
|
||||
assert STRICMP("hello", "") == 1
|
||||
Reference in new issue
Block a user