aboutsummaryrefslogtreecommitdiff
path: root/tests/parseInt
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2011-11-10 17:31:29 -0800
committerAlon Zakai <alonzakai@gmail.com>2011-11-10 17:31:29 -0800
commit0f6bc429372bf571e1b52a11dfedcd84ceba99cc (patch)
treeafb8d8db79fa4ded0d5d4e8944cf6078ad765d90 /tests/parseInt
parentfa1544b5cacf6720c25222e7f94bb102670f1837 (diff)
fix for test_parseInt
Diffstat (limited to 'tests/parseInt')
-rw-r--r--tests/parseInt/output_i64mode1.txt134
1 files changed, 134 insertions, 0 deletions
diff --git a/tests/parseInt/output_i64mode1.txt b/tests/parseInt/output_i64mode1.txt
new file mode 100644
index 00000000..649500b0
--- /dev/null
+++ b/tests/parseInt/output_i64mode1.txt
@@ -0,0 +1,134 @@
+strtol("-9223372036854775809") = -2147483648
+ERR 34
+strtoll("-9223372036854775809") = 9223372036854776000
+ERR 34
+strtoul("-9223372036854775809") = 4294967295
+ERR 34
+strtoull("-9223372036854775809") = 9223372036854774000
+
+strtol("-9223372036854775808") = -2147483648
+ERR 34
+strtoll("-9223372036854775808") = 9223372036854776000
+ERR 34
+strtoul("-9223372036854775808") = 4294967295
+ERR 34
+strtoull("-9223372036854775808") = 9223372036854774000
+
+strtol("-9223372036854775807") = -2147483648
+ERR 34
+strtoll("-9223372036854775807") = 9223372036854776000
+ERR 34
+strtoul("-9223372036854775807") = 4294967295
+ERR 34
+strtoull("-9223372036854775807") = 9223372036854774000
+
+strtol("-2147483649") = -2147483648
+ERR 34
+strtoll("-2147483649") = -2147483648
+strtoul("-2147483649") = 2147483647
+strtoull("-2147483649") = 18446744071562068000
+
+strtol("-2147483648") = -2147483648
+strtoll("-2147483648") = -2147483648
+strtoul("-2147483648") = 2147483648
+strtoull("-2147483648") = 18446744071562068000
+
+strtol("-2147483647") = -2147483647
+strtoll("-2147483647") = -2147483648
+strtoul("-2147483647") = 2147483649
+strtoull("-2147483647") = 18446744071562068000
+
+strtol("-5") = -5
+strtoll("-5") = 0
+strtoul("-5") = 4294967291
+strtoull("-5") = 18446744073709552000
+
+strtol("-1") = -1
+strtoll("-1") = 0
+strtoul("-1") = 4294967295
+strtoull("-1") = 18446744073709552000
+
+strtol("0") = 0
+strtoll("0") = 0
+strtoul("0") = 0
+strtoull("0") = 0
+
+strtol("1") = 1
+strtoll("1") = 1
+strtoul("1") = 1
+strtoull("1") = 1
+
+strtol("5") = 5
+strtoll("5") = 5
+strtoul("5") = 5
+strtoull("5") = 5
+
+strtol("2147483646") = 2147483646
+strtoll("2147483646") = 2147483646
+strtoul("2147483646") = 2147483646
+strtoull("2147483646") = 2147483646
+
+strtol("2147483647") = 2147483647
+strtoll("2147483647") = 2147483647
+strtoul("2147483647") = 2147483647
+strtoull("2147483647") = 2147483647
+
+strtol("2147483648") = 2147483647
+ERR 34
+strtoll("2147483648") = 2147483648
+strtoul("2147483648") = 2147483648
+strtoull("2147483648") = 2147483648
+
+strtol("4294967294") = 2147483647
+ERR 34
+strtoll("4294967294") = 4294967294
+strtoul("4294967294") = 4294967294
+strtoull("4294967294") = 4294967294
+
+strtol("4294967295") = 2147483647
+ERR 34
+strtoll("4294967295") = 4294967295
+strtoul("4294967295") = 4294967295
+strtoull("4294967295") = 4294967295
+
+strtol("4294967296") = 2147483647
+ERR 34
+strtoll("4294967296") = 4294967296
+strtoul("4294967296") = 4294967295
+ERR 34
+strtoull("4294967296") = 4294967296
+
+strtol("18446744073709551614") = 2147483647
+ERR 34
+strtoll("18446744073709551614") = 9223372036854776000
+ERR 34
+strtoul("18446744073709551614") = 4294967295
+ERR 34
+strtoull("18446744073709551614") = 18446744073709552000
+
+strtol("18446744073709551615") = 2147483647
+ERR 34
+strtoll("18446744073709551615") = 9223372036854776000
+ERR 34
+strtoul("18446744073709551615") = 4294967295
+ERR 34
+strtoull("18446744073709551615") = 18446744073709552000
+
+strtol("18446744073709551616") = 2147483647
+ERR 34
+strtoll("18446744073709551616") = 9223372036854776000
+ERR 34
+strtoul("18446744073709551616") = 4294967295
+ERR 34
+strtoull("18446744073709551616") = 18446744073709552000
+
+strtol("0x12", 0, 0) = 18
+strtol("0x12", 0, 10) = 0
+strtol("012", 0, 0) = 10
+strtol("012", 0, 10) = 12
+strtol("0y12", 0, 0) = 0
+strtol("hello", 0, 30) = 14167554
+strtol("hello", 0, 10) = 0
+strtol("not-a-number") = 0
+strtol(" 0x12end") = 302
+endptr - str = 7