diff options
author | Ian Lynagh <ian@well-typed.com> | 2012-08-21 15:16:48 +0100 |
---|---|---|
committer | Ian Lynagh <ian@well-typed.com> | 2012-08-21 15:16:48 +0100 |
commit | f00609d085bedae36175b65341bac84a1111a628 (patch) | |
tree | ccecc8b7dcc3b636dae2e7e640f9ca0726f8287d | |
parent | ac4bf2c6ef71e35b602ff3bb90b5584aa77eecdc (diff) | |
download | haskell-f00609d085bedae36175b65341bac84a1111a628.tar.gz |
Add a test for #7163
-rw-r--r-- | testsuite/tests/codeGen/should_run/T7163.hs | 10 | ||||
-rw-r--r-- | testsuite/tests/codeGen/should_run/T7163.stdout | 1 | ||||
-rw-r--r-- | testsuite/tests/codeGen/should_run/all.T | 1 |
3 files changed, 12 insertions, 0 deletions
diff --git a/testsuite/tests/codeGen/should_run/T7163.hs b/testsuite/tests/codeGen/should_run/T7163.hs new file mode 100644 index 0000000000..60c2abc4dc --- /dev/null +++ b/testsuite/tests/codeGen/should_run/T7163.hs @@ -0,0 +1,10 @@ + +module Main where + +main :: IO () +main = putStrLn $ printFloat 100 + +printFloat :: Float -> String +printFloat x = f (show (round (x * 10))) + where f "0" = "0" + f _ = show (round x) diff --git a/testsuite/tests/codeGen/should_run/T7163.stdout b/testsuite/tests/codeGen/should_run/T7163.stdout new file mode 100644 index 0000000000..29d6383b52 --- /dev/null +++ b/testsuite/tests/codeGen/should_run/T7163.stdout @@ -0,0 +1 @@ +100 diff --git a/testsuite/tests/codeGen/should_run/all.T b/testsuite/tests/codeGen/should_run/all.T index c03ea502d1..cef39946ef 100644 --- a/testsuite/tests/codeGen/should_run/all.T +++ b/testsuite/tests/codeGen/should_run/all.T @@ -93,3 +93,4 @@ test('setByteArray', normal, compile_and_run, ['']) test('6146', normal, compile_and_run, ['']) test('T5900', normal, compile_and_run, ['']) +test('T7163', normal, compile_and_run, ['']) |