summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--testsuite/tests/lib/integer/Makefile2
-rw-r--r--testsuite/tests/lib/integer/integerConstantFolding.hs8
-rw-r--r--testsuite/tests/lib/integer/integerConstantFolding.stdout2
3 files changed, 12 insertions, 0 deletions
diff --git a/testsuite/tests/lib/integer/Makefile b/testsuite/tests/lib/integer/Makefile
index 0d289817a3..612f3f09d4 100644
--- a/testsuite/tests/lib/integer/Makefile
+++ b/testsuite/tests/lib/integer/Makefile
@@ -28,5 +28,7 @@ integerConstantFolding:
$(call CHECK,\<196\>,divModInteger)
$(call CHECK,\<1600976\>,shiftLInteger)
$(call CHECK,\<6253\>,shiftRInteger)
+ $(call CHECK,\<641\>,quotInteger)
+ $(call CHECK,\<68\>,remInteger)
./integerConstantFolding
diff --git a/testsuite/tests/lib/integer/integerConstantFolding.hs b/testsuite/tests/lib/integer/integerConstantFolding.hs
index a5603bd04b..bea5149779 100644
--- a/testsuite/tests/lib/integer/integerConstantFolding.hs
+++ b/testsuite/tests/lib/integer/integerConstantFolding.hs
@@ -44,6 +44,8 @@ main = do p "plusInteger" plusInteger
p "divModInteger" divModInteger
p "shiftLInteger" shiftLInteger
p "shiftRInteger" shiftRInteger
+ p "quotInteger" quotInteger
+ p "remInteger" remInteger
where p :: Show a => String -> a -> IO ()
p str x = putStrLn (str ++ ": " ++ show x)
@@ -151,3 +153,9 @@ shiftLInteger = 100061 `shiftL` 4
shiftRInteger :: Integer
shiftRInteger = 100062 `shiftR` 4
+quotInteger :: Integer
+quotInteger = 100063 `quot` 156
+
+remInteger :: Integer
+remInteger = 100064 `rem` 156
+
diff --git a/testsuite/tests/lib/integer/integerConstantFolding.stdout b/testsuite/tests/lib/integer/integerConstantFolding.stdout
index dba50138f0..471eb755cf 100644
--- a/testsuite/tests/lib/integer/integerConstantFolding.stdout
+++ b/testsuite/tests/lib/integer/integerConstantFolding.stdout
@@ -38,3 +38,5 @@ quotRemInteger: (813,60)
divModInteger: (219,196)
shiftLInteger: 1600976
shiftRInteger: 6253
+quotInteger: 641
+remInteger: 68