diff options
author | Reid Barton <rwbarton@gmail.com> | 2015-06-16 16:39:15 -0500 |
---|---|---|
committer | Austin Seipp <austin@well-typed.com> | 2015-06-16 16:40:36 -0500 |
commit | b98ca17e12c7efdc906f4901f25e6263a5399be1 (patch) | |
tree | ac71b782444caff319578c0e4594c1d91422d900 /libraries/base/tests/enum02.hs | |
parent | 0760b84e62d216cbd0ba08a46331bed7c45c88bb (diff) | |
download | haskell-b98ca17e12c7efdc906f4901f25e6263a5399be1.tar.gz |
Make enum01/enum02/enum03 tests clang-compatible
... by entirely replacing the use of CPP by a custom preprocessor;
clang -E -traditional has no stringification mechanism at all.
Reviewed By: thomie, austin
Differential Revision: https://phabricator.haskell.org/D957
GHC Trac Issues: #9399
Diffstat (limited to 'libraries/base/tests/enum02.hs')
-rw-r--r-- | libraries/base/tests/enum02.hs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libraries/base/tests/enum02.hs b/libraries/base/tests/enum02.hs index 23de6ebdf9..f7e843c537 100644 --- a/libraries/base/tests/enum02.hs +++ b/libraries/base/tests/enum02.hs @@ -1,5 +1,9 @@ -- !!! Testing the Int Enum instances. -{-# LANGUAGE CPP #-} +{-# OPTIONS_GHC -F -pgmF ./enum_processor.py #-} +-- The processor is a non-CPP-based equivalent of +-- #define printTest(x) (do{ putStr ( " " ++ "x" ++ " = " ) ; print (x) }) +-- which is not portable to clang + module Main(main) where import Control.Exception @@ -15,7 +19,6 @@ main = do putStrLn "Testing Enum Int64:" testEnumInt64 -#define printTest(x) (do{ putStr ( " " ++ "x" ++ " = " ) ; print (x) }) testEnumInt8 :: IO () testEnumInt8 = do |