From 059d3da58b64c555aae29b92150413b96fae0621 Mon Sep 17 00:00:00 2001 From: David Mak Date: Fri, 29 Sep 2023 15:06:56 +0800 Subject: [PATCH] standalone: Add float64 output tests --- nac3standalone/demo/src/demo_test.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/nac3standalone/demo/src/demo_test.py b/nac3standalone/demo/src/demo_test.py index 3a99887a..f75f8690 100644 --- a/nac3standalone/demo/src/demo_test.py +++ b/nac3standalone/demo/src/demo_test.py @@ -14,6 +14,10 @@ def output_uint32(x: uint32): def output_uint64(x: uint64): ... +@extern +def output_float64(x: float): + ... + @extern def output_int32_list(x: list[int32]): ... @@ -38,6 +42,15 @@ def test_output_uint32(): def test_output_uint64(): output_uint64(uint64(256)) +def test_output_float64(): + output_float64(0.0) + output_float64(1.0) + output_float64(-1.0) + output_float64(128.0) + output_float64(-128.0) + output_float64(16.25) + output_float64(-16.25) + def test_output_asciiart(): for i in range(17): output_asciiart(i) @@ -54,6 +67,7 @@ def run() -> int32: test_output_int64() test_output_uint32() test_output_uint64() + test_output_float64() test_output_asciiart() test_output_int32_list() test_output_str_family()