[commit: ghc] master: Add test to ensure that SPEC rules are named deterministically (0ce11ae)
git at git.haskell.org
git at git.haskell.org
Fri Mar 3 21:36:17 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/0ce11aedd404e2d1eabd362e5c3329960008de88/ghc
>---------------------------------------------------------------
commit 0ce11aedd404e2d1eabd362e5c3329960008de88
Author: Ben Gamari <bgamari.foss at gmail.com>
Date: Fri Mar 3 15:50:41 2017 -0500
Add test to ensure that SPEC rules are named deterministically
Test Plan: Validate
Reviewers: niteria, austin, dfeuer
Reviewed By: dfeuer
Subscribers: simonpj, thomie
Differential Revision: https://phabricator.haskell.org/D3220
>---------------------------------------------------------------
0ce11aedd404e2d1eabd362e5c3329960008de88
testsuite/tests/determinism/determ022/A.hs | 6 ++++++
testsuite/tests/determinism/{determ003 => determ022}/Makefile | 2 +-
testsuite/tests/determinism/determ022/all.T | 1 +
.../{determ002/determ002.stdout => determ022/determ022.stdout} | 0
4 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/testsuite/tests/determinism/determ022/A.hs b/testsuite/tests/determinism/determ022/A.hs
new file mode 100644
index 0000000..5b12e27
--- /dev/null
+++ b/testsuite/tests/determinism/determ022/A.hs
@@ -0,0 +1,6 @@
+-- | Test that SPEC rules are named deterministically.
+module A where
+
+test1 :: Num a => a -> a -> a
+test1 x y = x + 42 * y
+{-# SPECIALISE test1 :: Int -> Int -> Int #-}
diff --git a/testsuite/tests/determinism/determ003/Makefile b/testsuite/tests/determinism/determ022/Makefile
similarity index 96%
copy from testsuite/tests/determinism/determ003/Makefile
copy to testsuite/tests/determinism/determ022/Makefile
index faff63e..1bd543e 100644
--- a/testsuite/tests/determinism/determ003/Makefile
+++ b/testsuite/tests/determinism/determ022/Makefile
@@ -2,7 +2,7 @@ TOP=../../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
-determ003:
+determ022:
$(RM) A.hi A.o
'$(TEST_HC)' $(TEST_HC_OPTS) -O -dinitial-unique=0 -dunique-increment=1 A.hs
$(CP) A.hi A.normal.hi
diff --git a/testsuite/tests/determinism/determ022/all.T b/testsuite/tests/determinism/determ022/all.T
new file mode 100644
index 0000000..3ecdf3c
--- /dev/null
+++ b/testsuite/tests/determinism/determ022/all.T
@@ -0,0 +1 @@
+test('determ022', [extra_files(['A.hs'])], run_command, ['$MAKE -s --no-print-directory determ022'])
diff --git a/testsuite/tests/determinism/determ002/determ002.stdout b/testsuite/tests/determinism/determ022/determ022.stdout
similarity index 100%
copy from testsuite/tests/determinism/determ002/determ002.stdout
copy to testsuite/tests/determinism/determ022/determ022.stdout
More information about the ghc-commits
mailing list