Skip to content
Permalink
Browse files

Add test case for exponential float literals.

  • Loading branch information...
Prof9 committed Sep 21, 2019
1 parent 0292c93 commit 17d28c83fc7ac167f89b98f79fbd43120e51f537
Showing with 47 additions and 0 deletions.
  1. +29 −0 Tests/Core/Exponential/Exponential.asm
  2. +18 −0 Tests/Core/Exponential/expected.txt
@@ -0,0 +1,29 @@
.gba
.create "output.bin",0

.definelabel label,1234
.definelabel e,5678

// Should be parsed as exponentials
.notice 314e2
.notice 314e+2
.notice 314e-2
.notice 314E2
.notice 314E+2
.notice 314E-2

// Should NOT be parsed as exponentials
.notice 0xE2
.notice 0xE+2
.notice 0xE-2
.notice 0xE+label
.notice 0xE-label
.notice 0xE
.notice 0Eh
.notice 0Eh+label
.notice 0Eh-label
.notice e
.notice e+2
.notice e-2

.close
@@ -0,0 +1,18 @@
Exponential.asm(8) notice: 31400.000000000000
Exponential.asm(9) notice: 31400.000000000000
Exponential.asm(10) notice: 3.1400000000000001
Exponential.asm(11) notice: 31400.000000000000
Exponential.asm(12) notice: 31400.000000000000
Exponential.asm(13) notice: 3.1400000000000001
Exponential.asm(16) notice: 226
Exponential.asm(17) notice: 16
Exponential.asm(18) notice: 12
Exponential.asm(19) notice: 1248
Exponential.asm(20) notice: -1220
Exponential.asm(21) notice: 14
Exponential.asm(22) notice: 14
Exponential.asm(23) notice: 1248
Exponential.asm(24) notice: -1220
Exponential.asm(25) notice: 5678
Exponential.asm(26) notice: 5680
Exponential.asm(27) notice: 5676

0 comments on commit 17d28c8

Please sign in to comment.
You can’t perform that action at this time.