Make T10970a non-dependent on GCC version.
authorEdward Z. Yang <ezyang@cs.stanford.edu>
Tue, 27 Oct 2015 17:42:51 +0000 (10:42 -0700)
committerEdward Z. Yang <ezyang@cs.stanford.edu>
Tue, 27 Oct 2015 17:42:51 +0000 (10:42 -0700)
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
testsuite/tests/driver/T10970a.hs
testsuite/tests/driver/T10970a.stderr
testsuite/tests/driver/T10970a.stdout [new file with mode: 0644]
testsuite/tests/driver/all.T

index 9de4f80..8e7aa60 100644 (file)
@@ -1,6 +1,8 @@
 {-# LANGUAGE CPP #-}
 main = do
-    putStrLn VERSION_containers
-#if MIN_VERSION_base(3,0,0)
+#ifndef VERSION_containers
+    putStrLn "OK"
+#endif
+#ifndef MIN_VERSION_base
     putStrLn "OK"
 #endif
index 74c6821..e69de29 100644 (file)
@@ -1,6 +0,0 @@
-
-T10970a.hs:4:0: error:
-     error: missing binary operator before token "("
-     #if MIN_VERSION_base(3,0,0)
-     ^
-`gcc' failed in phase `C pre-processor'. (Exit code: 1)
diff --git a/testsuite/tests/driver/T10970a.stdout b/testsuite/tests/driver/T10970a.stdout
new file mode 100644 (file)
index 0000000..2c94e48
--- /dev/null
@@ -0,0 +1,2 @@
+OK
+OK
index f946055..7c74cb6 100644 (file)
@@ -458,4 +458,4 @@ test('T9360a', normal, run_command, ['{compiler} --interactive -e ""'])
 test('T9360b', normal, run_command, ['{compiler} -e "" --interactive'])
 
 test('T10970', normal, compile_and_run, ['-hide-all-packages -package base -package containers'])
-test('T10970a', normal, compile_fail, [''])
+test('T10970a', normal, compile_and_run, [''])