diff options
author | Haru <haru@dotalux.com> | 2020-06-01 04:08:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-01 04:08:28 +0200 |
commit | 36aff97b92f9f42f9bc59911b7d06110a8e9aed5 (patch) | |
tree | 69d20dc9137da111ecda664a896bbf0abbead02e /npc | |
parent | b9f7d1439c84b64facaf7d2875adc29110c65cf4 (diff) | |
parent | c66d467fb5816734851b7de6b20537ce7a08c861 (diff) | |
download | hercules-36aff97b92f9f42f9bc59911b7d06110a8e9aed5.tar.gz hercules-36aff97b92f9f42f9bc59911b7d06110a8e9aed5.tar.bz2 hercules-36aff97b92f9f42f9bc59911b7d06110a8e9aed5.tar.xz hercules-36aff97b92f9f42f9bc59911b7d06110a8e9aed5.zip |
Merge pull request #2671 from Helianthella/binliteral
add support for binary and octal number literals
Diffstat (limited to 'npc')
-rw-r--r-- | npc/dev/test.txt | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/npc/dev/test.txt b/npc/dev/test.txt index c8c842055..291671913 100644 --- a/npc/dev/test.txt +++ b/npc/dev/test.txt @@ -156,6 +156,15 @@ 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(OnCheck, "decimal literal with separator", 2_5_5, 255); + callsub(OnCheck, "binary literal with separator", 0b_1111_1111, 255); + // Callsub (basic) callsub(OnCheck, "Callsub", 1, 1); callsub(OnCheck, "Callsub (getarg default values)", 1); |