diff options
author | gumi <git@gumi.ca> | 2020-03-28 19:28:59 -0400 |
---|---|---|
committer | gumi <git@gumi.ca> | 2020-05-07 16:05:25 -0400 |
commit | 48849a0e2ae0ee6a77d0e413fbed6a73a64211e7 (patch) | |
tree | 7508718720d8bb84874d27247cea937abfac8d93 /npc | |
parent | 554101ef7ff2e4d8e9991b0ef72b38adcbbabec9 (diff) | |
download | hercules-48849a0e2ae0ee6a77d0e413fbed6a73a64211e7.tar.gz hercules-48849a0e2ae0ee6a77d0e413fbed6a73a64211e7.tar.bz2 hercules-48849a0e2ae0ee6a77d0e413fbed6a73a64211e7.tar.xz hercules-48849a0e2ae0ee6a77d0e413fbed6a73a64211e7.zip |
add unit tests for octal and binary literals
Diffstat (limited to 'npc')
-rw-r--r-- | npc/dev/test.txt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/npc/dev/test.txt b/npc/dev/test.txt index a9e78489a..f7f28d622 100644 --- a/npc/dev/test.txt +++ b/npc/dev/test.txt @@ -122,6 +122,13 @@ function script HerculesSelfTestHelper { .once = 1; .errors = 0; + // number literals + callsub(OnCheck, "decimal number literal", 255, 255); + callsub(OnCheck, "hexadecimal number literal", 0xFF, 255); + callsub(OnCheck, "octal number literal", 0o377, 255); + callsub(OnCheck, "binary number literal", 0b11111111, 255); + callsub(OnCheck, "binary literal bitwise OR", 0b11110000 | 0xF, 255); + // Callsub (basic) callsub(OnCheck, "Callsub", 1, 1); callsub(OnCheck, "Callsub (getarg default values)", 1); |