[commit: ghc] master: Pass -haddock to tests in should_compile_*flag*_nohaddock (c6007fe)

git at git.haskell.org git at git.haskell.org
Fri Feb 19 18:54:03 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/c6007fe696e05dd98268a3a814c1c1290573913c/ghc

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

commit c6007fe696e05dd98268a3a814c1c1290573913c
Author: Thomas Miedema <thomasmiedema at gmail.com>
Date:   Fri Feb 19 17:37:29 2016 +0100

    Pass -haddock to tests in should_compile_*flag*_nohaddock
    
    should_compile_flag_nohaddock and should_compile_noflag_nohaddock
    contain the exact same tests. By passing `-haddock` to the tests in
    should_compile_**flag**_nohaddock, at least they're now testing
    different things.
    
    Add documentation.


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

c6007fe696e05dd98268a3a814c1c1290573913c
 .../tests/haddock/should_compile_flag_haddock/all.T     | 13 +++++++++++++
 .../tests/haddock/should_compile_flag_nohaddock/all.T   | 17 +++++++++++++----
 .../tests/haddock/should_compile_noflag_haddock/all.T   | 13 +++++++++++++
 .../haddockSimplUtilsBug.stderr                         |  0
 .../tests/haddock/should_compile_noflag_nohaddock/all.T |  9 +++++++++
 5 files changed, 48 insertions(+), 4 deletions(-)

diff --git a/testsuite/tests/haddock/should_compile_flag_haddock/all.T b/testsuite/tests/haddock/should_compile_flag_haddock/all.T
index a0d1d7c..344210e 100644
--- a/testsuite/tests/haddock/should_compile_flag_haddock/all.T
+++ b/testsuite/tests/haddock/should_compile_flag_haddock/all.T
@@ -1,3 +1,12 @@
+# should_compile_flag_haddock.
+#
+# * flag: we *do* pass the -haddock flag
+#
+# * haddock: and tests *do* contain haddock annotations
+#
+# When adding a new test here, think about adding it to the
+# should_compile_noflag_haddock directory as well.
+
 test('haddockA001', normal, compile, ['-haddock -ddump-parsed'])
 test('haddockA002', normal, compile, ['-haddock -ddump-parsed'])
 test('haddockA003', normal, compile, ['-haddock -ddump-parsed'])
@@ -30,6 +39,10 @@ test('haddockA029', normal, compile, ['-haddock -ddump-parsed'])
 test('haddockA030', normal, compile, ['-haddock -ddump-parsed'])
 test('haddockA031', normal, compile, ['-haddock -ddump-parsed -XExistentialQuantification'])
 test('haddockA032', normal, compile, ['-haddock -ddump-parsed'])
+
+# The tests below this line are not duplicated in
+# should_compile_noflag_haddock.
+
 test('haddockA033', normal, compile, ['-haddock -ddump-parsed'])
 test('haddockA034', normal, compile, ['-haddock -ddump-parsed'])
 test('T10398', normal, compile, ['-haddock -ddump-parsed'])
diff --git a/testsuite/tests/haddock/should_compile_flag_nohaddock/all.T b/testsuite/tests/haddock/should_compile_flag_nohaddock/all.T
index 500a7e6..b4c4857 100644
--- a/testsuite/tests/haddock/should_compile_flag_nohaddock/all.T
+++ b/testsuite/tests/haddock/should_compile_flag_nohaddock/all.T
@@ -1,4 +1,13 @@
-test('haddockB001', normal, compile, [''])
-test('haddockB002', normal, compile, [''])
-test('haddockB003', normal, compile, [''])
-test('haddockB004', normal, compile, [''])
+# should_compile_flag_nohaddock
+#
+# * flag: we *do* pass the -haddock flag
+#
+# * nohaddock: but tests do *not* contain haddock annotations
+#
+# When adding a new test here, think about adding it to the
+# should_compile_noflag_nohaddock directory as well.
+
+test('haddockB001', normal, compile, ['-haddock'])
+test('haddockB002', normal, compile, ['-haddock'])
+test('haddockB003', normal, compile, ['-haddock'])
+test('haddockB004', normal, compile, ['-haddock'])
diff --git a/testsuite/tests/haddock/should_compile_noflag_haddock/all.T b/testsuite/tests/haddock/should_compile_noflag_haddock/all.T
index 77aed59..c0d62ae 100644
--- a/testsuite/tests/haddock/should_compile_noflag_haddock/all.T
+++ b/testsuite/tests/haddock/should_compile_noflag_haddock/all.T
@@ -1,3 +1,12 @@
+# should_compile_noflag_haddock
+#
+# * noflag: we do *not* pass the -haddock flag
+#
+# * haddock: but tests *do* contain haddock annotations
+#
+# When adding a new test here, think about adding it to the
+# should_compile_flag_haddock directory as well.
+
 test('haddockC001', normal, compile, [''])
 test('haddockC002', normal, compile, [''])
 test('haddockC003', normal, compile, [''])
@@ -30,4 +39,8 @@ test('haddockC029', normal, compile, [''])
 test('haddockC030', normal, compile, [''])
 test('haddockC031', normal, compile, ['-XExistentialQuantification'])
 test('haddockC032', normal, compile, [''])
+
+# The tests below this line are not duplicated in
+# should_compile_flag_haddock.
+
 test('haddockSimplUtilsBug', normal, compile, [''])
diff --git a/testsuite/tests/haddock/should_compile_noflag_haddock/haddockSimplUtilsBug.stderr b/testsuite/tests/haddock/should_compile_noflag_haddock/haddockSimplUtilsBug.stderr
deleted file mode 100644
index e69de29..0000000
diff --git a/testsuite/tests/haddock/should_compile_noflag_nohaddock/all.T b/testsuite/tests/haddock/should_compile_noflag_nohaddock/all.T
index 89c205b..1c68255 100644
--- a/testsuite/tests/haddock/should_compile_noflag_nohaddock/all.T
+++ b/testsuite/tests/haddock/should_compile_noflag_nohaddock/all.T
@@ -1,3 +1,12 @@
+# should_compile_noflag_nohaddock
+#
+# * noflag: we do *not* pass the -haddock flag
+#
+# * nohaddock: and tests do *not* contain haddock annotations
+#
+# When adding a new test here, think about adding it to the
+# should_compile_flag_nohaddock directory as well.
+
 test('haddockD001', normal, compile, [''])
 test('haddockD002', normal, compile, [''])
 test('haddockD003', normal, compile, [''])



More information about the ghc-commits mailing list