test: nasm-t -- Add bcd test

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
This commit is contained in:
Cyrill Gorcunov 2018-11-04 14:26:48 +03:00
parent f72e459c73
commit 071e53603f
4 changed files with 38 additions and 0 deletions

23
travis/test/bcd.asm Normal file
View File

@ -0,0 +1,23 @@
;Testname=optimized; Arguments=-Ox -fbin -obcd.bin; Files=stdout stderr bcd.bin
dt 765432109876543210p
dt -765432109876543210p
dt +765432109876543210p
dt 123p
dt -456p
dt +789p
dt 98765432109876543210p
dt 123.0
dt 0x123p+44
dt 789p
dt 0p765432109876543210
dt -0p765432109876543210
dt +0p765432109876543210
dt 0p123
dt -0p456
dt +0p789
dt 0p98765432109876543210
dt 123.0
dt 0x123p+44
dt 0p789

BIN
travis/test/bcd.bin.t Normal file

Binary file not shown.

13
travis/test/bcd.json Normal file
View File

@ -0,0 +1,13 @@
[
{
"description": "Test BCD numbers",
"id": "bcd",
"format": "bin",
"source": "bcd.asm",
"option": "-Ox",
"target": [
{ "output": "bcd.bin" },
{ "stderr": "bcd.stderr" }
]
}
]

2
travis/test/bcd.stderr Normal file
View File

@ -0,0 +1,2 @@
./travis/test/bcd.asm:9: warning: packed BCD truncated to 18 digits
./travis/test/bcd.asm:20: warning: packed BCD truncated to 18 digits