summaryrefslogtreecommitdiff
path: root/testsuite/tests/numeric/should_run
diff options
context:
space:
mode:
authorAlex Bradley <a.s.bradley1996@gmail.com>2017-09-04 08:08:46 -0400
committerBen Gamari <ben@smart-cactus.org>2017-09-05 07:20:00 -0400
commit6458b8dcbd33b3c32f3c23f7e5b08fdc6e73ed46 (patch)
treed825addc92502ce60fdce043a068c5b0742767e9 /testsuite/tests/numeric/should_run
parentcd857dd415378ac4204a164407d350b0c3ede5ae (diff)
downloadhaskell-6458b8dcbd33b3c32f3c23f7e5b08fdc6e73ed46.tar.gz
base: Update acosh to handle -1::Complex
Summary: Fixes #8532 Reviewers: austin, hvr, bgamari Reviewed By: bgamari Subscribers: rwbarton, thomie GHC Trac Issues: #8532 Differential Revision: https://phabricator.haskell.org/D3916
Diffstat (limited to 'testsuite/tests/numeric/should_run')
-rw-r--r--testsuite/tests/numeric/should_run/all.T1
-rw-r--r--testsuite/tests/numeric/should_run/numrun016.hs8
-rw-r--r--testsuite/tests/numeric/should_run/numrun016.stdout2
3 files changed, 11 insertions, 0 deletions
diff --git a/testsuite/tests/numeric/should_run/all.T b/testsuite/tests/numeric/should_run/all.T
index 2d2353bd8a..fd9c05fbbb 100644
--- a/testsuite/tests/numeric/should_run/all.T
+++ b/testsuite/tests/numeric/should_run/all.T
@@ -34,6 +34,7 @@ test('numrun012', normal, compile_and_run, [''])
test('numrun013', normal, compile_and_run, [''])
test('numrun014', normal, compile_and_run, [''])
test('numrun015', normal, compile_and_run, [''])
+test('numrun016', normal, compile_and_run, [''])
test('arith016', normal, compile_and_run, [''])
test('arith017', normal, compile_and_run, [''])
test('arith018', normal, compile_and_run, [''])
diff --git a/testsuite/tests/numeric/should_run/numrun016.hs b/testsuite/tests/numeric/should_run/numrun016.hs
new file mode 100644
index 0000000000..c45e322030
--- /dev/null
+++ b/testsuite/tests/numeric/should_run/numrun016.hs
@@ -0,0 +1,8 @@
+-- test for trac #8532
+
+import Data.Complex
+
+main :: IO ()
+main = do
+ print $ acosh ((-1)::Complex Double)
+ print $ acosh ((-1)::Complex Float)
diff --git a/testsuite/tests/numeric/should_run/numrun016.stdout b/testsuite/tests/numeric/should_run/numrun016.stdout
new file mode 100644
index 0000000000..25676f77dc
--- /dev/null
+++ b/testsuite/tests/numeric/should_run/numrun016.stdout
@@ -0,0 +1,2 @@
+0.0 :+ 3.141592653589793
+0.0 :+ 3.1415927 \ No newline at end of file