From e656c5fa2d7160f217785cffe0e2f49f69443bc3 Mon Sep 17 00:00:00 2001 From: Aaron Jacobs Date: Tue, 24 May 2011 03:19:50 +0000 Subject: [PATCH] Added some test cases that catch a parsing bug. --- test/data/test_real_08.expected | 1 + test/data/test_real_08.json | 4 ++++ test/data/test_real_09.expected | 1 + test/data/test_real_09.json | 4 ++++ test/data/test_real_10.expected | 1 + test/data/test_real_10.json | 4 ++++ test/data/test_real_11.expected | 1 + test/data/test_real_11.json | 4 ++++ 8 files changed, 20 insertions(+) create mode 100644 test/data/test_real_08.expected create mode 100644 test/data/test_real_08.json create mode 100644 test/data/test_real_09.expected create mode 100644 test/data/test_real_09.json create mode 100644 test/data/test_real_10.expected create mode 100644 test/data/test_real_10.json create mode 100644 test/data/test_real_11.expected create mode 100644 test/data/test_real_11.json diff --git a/test/data/test_real_08.expected b/test/data/test_real_08.expected new file mode 100644 index 0000000..9a5f062 --- /dev/null +++ b/test/data/test_real_08.expected @@ -0,0 +1 @@ +.=4300000001 diff --git a/test/data/test_real_08.json b/test/data/test_real_08.json new file mode 100644 index 0000000..cca950d --- /dev/null +++ b/test/data/test_real_08.json @@ -0,0 +1,4 @@ +// Out of 32-bit integer range, switch to double in 32-bit mode. Length the +// same as UINT_MAX in base 10 and digit less than UINT_MAX's last digit in +// order to catch a bug in the parsing code. +4300000001 diff --git a/test/data/test_real_09.expected b/test/data/test_real_09.expected new file mode 100644 index 0000000..ee2e5ef --- /dev/null +++ b/test/data/test_real_09.expected @@ -0,0 +1 @@ +.=19000000000000000001 diff --git a/test/data/test_real_09.json b/test/data/test_real_09.json new file mode 100644 index 0000000..e65d50c --- /dev/null +++ b/test/data/test_real_09.json @@ -0,0 +1,4 @@ +// Out of 64-bit integer range, switch to double in all modes. Length the same +// as ULONG_MAX in base 10 and digit less than ULONG_MAX's last digit in order +// to catch a bug in the parsing code. +19000000000000000001 diff --git a/test/data/test_real_10.expected b/test/data/test_real_10.expected new file mode 100644 index 0000000..01126bf --- /dev/null +++ b/test/data/test_real_10.expected @@ -0,0 +1 @@ +.=-2200000001 diff --git a/test/data/test_real_10.json b/test/data/test_real_10.json new file mode 100644 index 0000000..a6a8bce --- /dev/null +++ b/test/data/test_real_10.json @@ -0,0 +1,4 @@ +// Out of 32-bit signed integer range, switch to double in all modes. Length +// the same as INT_MIN in base 10 and digit less than INT_MIN's last digit in +// order to catch a bug in the parsing code. +-2200000001 diff --git a/test/data/test_real_11.expected b/test/data/test_real_11.expected new file mode 100644 index 0000000..83d3cc3 --- /dev/null +++ b/test/data/test_real_11.expected @@ -0,0 +1 @@ +.=-9300000000000000001 diff --git a/test/data/test_real_11.json b/test/data/test_real_11.json new file mode 100644 index 0000000..63cdb36 --- /dev/null +++ b/test/data/test_real_11.json @@ -0,0 +1,4 @@ +// Out of 64-bit signed integer range, switch to double in all modes. Length +// the same as LONG_MIN in base 10 and digit less than LONG_MIN's last digit in +// order to catch a bug in the parsing code. +-9300000000000000001