From 48ecb2f29e6a871e8171db377e9f469b573ab04d Mon Sep 17 00:00:00 2001 From: Danny Milosavljevic Date: Wed, 10 Jun 2020 17:04:55 +0200 Subject: [PATCH] test: Test signed division. * lib/tests/scaffold/36-compare-arithmetic.c (main): Test signed division. --- lib/tests/scaffold/36-compare-arithmetic.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/tests/scaffold/36-compare-arithmetic.c b/lib/tests/scaffold/36-compare-arithmetic.c index c54ff695..a138aef9 100644 --- a/lib/tests/scaffold/36-compare-arithmetic.c +++ b/lib/tests/scaffold/36-compare-arithmetic.c @@ -44,5 +44,17 @@ main () if (8 / 4 != 2) return 1; + oputs ("t: 8 / -4\n"); + if (8 / -4 != -2) + return 1; + + oputs ("t: -8 / -4\n"); + if (-8 / -4 != 2) + return 1; + + oputs ("t: -8 / 4\n"); + if (-8 / 4 != -2) + return 1; + return 0; }