[m-rev.] for review: Delete unused test case hard_coded/minint_bug.m
Peter Wang
novalazy at gmail.com
Wed Sep 2 10:33:45 AEST 2015
This test case was disabled during a window of time when the behaviour of
string.base_string_to_int changed, such that it fails if the base is 10 and
the integer is int.min_int.
The original behaviour was restored in
commit 8d365b405660c1d40bcb66de955fe6d1d38df4af
and tested as part of general/base_string_to_int_test.m.
minint_bug.m was not re-enabled.
tests/hard_coded/Mmakefile:
tests/hard_coded/minint_bug.m:
Delete unused and redundant test case.
---
tests/hard_coded/Mmakefile | 5 -----
tests/hard_coded/minint_bug.m | 35 -----------------------------------
2 files changed, 40 deletions(-)
delete mode 100644 tests/hard_coded/minint_bug.m
diff --git a/tests/hard_coded/Mmakefile b/tests/hard_coded/Mmakefile
index 4a0a7e0..9e79ab8 100644
--- a/tests/hard_coded/Mmakefile
+++ b/tests/hard_coded/Mmakefile
@@ -609,11 +609,6 @@ CLOSURE_LAYOUT_PROGS = \
#
# XXX we fail some of the commented-out tests in write_binary
-# XXX minint_bug
-# Since r1.279 of library/string.m we no longer pass this test
-# since the smallest (decimal) integer literal string.int_to_string/2
-# recognises is int.min_int + 1.
-
# The following tests are passed only in some grades.
# The following tests do not work in the the .profdeep grades.
diff --git a/tests/hard_coded/minint_bug.m b/tests/hard_coded/minint_bug.m
deleted file mode 100644
index 22e8b4c..0000000
--- a/tests/hard_coded/minint_bug.m
+++ /dev/null
@@ -1,35 +0,0 @@
-%---------------------------------------------------------------------------%
-% vim: ts=4 sw=4 et ft=mercury
-%---------------------------------------------------------------------------%
-%
-% regression test: versions 0.7.3 and earlier failed this test.
-% Since r1.279 of library/string.m we no longer pass this test
-% (on 32-bit machines at least), see the comment in the Makefile
-% for details. (XXX This never worked as intended on 64-bit machines.)
-
-:- module minint_bug.
-
-:- interface.
-
-:- import_module io.
-
-:- pred main(io__state::di, io__state::uo) is det.
-
-:- implementation.
-
-:- import_module int.
-:- import_module list.
-:- import_module string.
-
-main -->
- { string__int_to_string(-2147483648, S) }, print(S), nl,
- print(-2147483648), nl,
- format("%d\n", [i(-2147483648)]).
-
-% We could test the following too, but the correct output is machine-dependent,
-% which makes it difficult to validate the results of the test.
-%
-% { int__min_int(MinInt) },
-% { string__int_to_string(MinInt, S2) }, print(S2), nl,
-% print(MinInt), nl,
-% format("%d\n", [i(MinInt)]), nl.
--
2.1.2
More information about the reviews
mailing list