[commit: testsuite] ghc-7.4: Generalise the integerToInt_smallInteger test (now fromToInteger) (60d342a)

Ian Lynagh igloo at earth.li
Thu Jan 26 15:44:10 CET 2012


Repository : ssh://darcs.haskell.org//srv/darcs/testsuite

On branch  : ghc-7.4

http://hackage.haskell.org/trac/ghc/changeset/60d342ac310ca4b020f000565cf6586efb58916e

>---------------------------------------------------------------

commit 60d342ac310ca4b020f000565cf6586efb58916e
Author: Ian Lynagh <igloo at earth.li>
Date:   Thu Jan 26 13:57:44 2012 +0000

    Generalise the integerToInt_smallInteger test (now fromToInteger)

>---------------------------------------------------------------

 tests/lib/integer/Makefile                         |   14 ++++++++------
 tests/lib/integer/all.T                            |    6 +++---
 ...tegerToInt_smallInteger.hs => fromToInteger.hs} |    3 +++
 3 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/tests/lib/integer/Makefile b/tests/lib/integer/Makefile
index 71a34a3..227362d 100644
--- a/tests/lib/integer/Makefile
+++ b/tests/lib/integer/Makefile
@@ -36,10 +36,12 @@ integerConstantFolding:
 	$(call CHECK,\<400280.0\>,encodeIntegerFloat)
 	./integerConstantFolding
 
-.PHONY: integerToInt_smallInteger
-integerToInt_smallInteger:
-	'$(TEST_HC)' -Wall -v0 -O -c integerToInt_smallInteger.hs -fforce-recomp -ddump-simpl > integerToInt_smallInteger.simpl
-# Rules should eliminate both functions
-	-grep integerToInt integerToInt_smallInteger.simpl
-	-grep smallInteger integerToInt_smallInteger.simpl
+.PHONY: fromToInteger
+fromToInteger:
+	'$(TEST_HC)' -Wall -v0 -O -c fromToInteger.hs -fforce-recomp -ddump-simpl > fromToInteger.simpl
+# Rules should eliminate all functions
+	-grep integerToInt fromToInteger.simpl
+	-grep smallInteger fromToInteger.simpl
+	-grep integerToWord fromToInteger.simpl
+	-grep wordToInteger fromToInteger.simpl
 
diff --git a/tests/lib/integer/all.T b/tests/lib/integer/all.T
index 54782c0..8b27753 100644
--- a/tests/lib/integer/all.T
+++ b/tests/lib/integer/all.T
@@ -4,8 +4,8 @@ test('integerConstantFolding',
      extra_clean(['integerConstantFolding.simpl']),
      run_command,
      ['$MAKE -s --no-print-directory integerConstantFolding'])
-test('integerToInt_smallInteger',
-     extra_clean(['integerToInt_smallInteger.simpl']),
+test('fromToInteger',
+     extra_clean(['fromToInteger.simpl']),
      run_command,
-     ['$MAKE -s --no-print-directory integerToInt_smallInteger'])
+     ['$MAKE -s --no-print-directory fromToInteger'])
 
diff --git a/tests/lib/integer/integerToInt_smallInteger.hs b/tests/lib/integer/fromToInteger.hs
similarity index 70%
rename from tests/lib/integer/integerToInt_smallInteger.hs
rename to tests/lib/integer/fromToInteger.hs
index e084e05..c361538 100644
--- a/tests/lib/integer/integerToInt_smallInteger.hs
+++ b/tests/lib/integer/fromToInteger.hs
@@ -9,3 +9,6 @@ import GHC.Integer
 v :: Int
 v = I# (integerToInt (smallInteger 3#))
 
+w :: Word
+w = W# (integerToWord (wordToInteger 3##))
+





More information about the Cvs-ghc mailing list