From 6c8f49206d7d71154266aa37b0ad5b0e709dfeb5 Mon Sep 17 00:00:00 2001 From: Calvin Rose Date: Sat, 29 Dec 2018 01:31:01 -0500 Subject: [PATCH] Add some more number tests. Crossing fingers hoping windows will work. --- ctest/number_test.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/ctest/number_test.c b/ctest/number_test.c index 11f67fd3..8cfed19b 100644 --- a/ctest/number_test.c +++ b/ctest/number_test.c @@ -25,6 +25,11 @@ #include #include +/* Check a subset of numbers against system implementation. + * Note that this depends on the system implementation being correct, + * which may not be the case for old or non complient systems. Also, + * we cannot check against bases other 10. */ + /* Compare valid c numbers to system implementation. */ static void test_valid_str(const char *str) { int err = 0; @@ -50,6 +55,12 @@ int main() { test_valid_str("1.123123e-10"); test_valid_str("-1.23e2"); test_valid_str("-4.5e15"); + test_valid_str("-4.5e151"); + test_valid_str("-4.5e200"); + test_valid_str("-4.5e123"); + test_valid_str("123123123123123123132123"); + test_valid_str("0000000011111111111111111111111111"); + test_valid_str(".112312333333323123123123123123123"); janet_deinit();