summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2017-02-01 00:48:38 +0100
committerRichard Levitte <levitte@openssl.org>2017-02-01 02:03:29 +0100
commit383e9ade2b0e8333c8a5907fe4ca73d38f9ca465 (patch)
treee9c27cc1a864de808cc5188c84fd486319fb91fb /test
parent24dc7fe0c008f1261cd34522f7fa2c23a2dedbe9 (diff)
bntests.txt: add a couple of checks of possibly negative zero
Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/2335)
Diffstat (limited to 'test')
-rw-r--r--test/bntests.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/bntests.txt b/test/bntests.txt
index 9603f00a04..c1ffb2d13c 100644
--- a/test/bntests.txt
+++ b/test/bntests.txt
@@ -4643,6 +4643,10 @@ N = 64
#
# These test vectors satisfy A / 2^N = RShift, rounding towards zero.
+Rshift = 0
+A = -1
+N = 1
+
RShift = 6ce746ffa7979ce10b751cd2308402a95d00d596cd97b36380
A = d9ce8dff4f2f39c216ea39a461080552ba01ab2d9b2f66c701
N = 1
@@ -5967,6 +5971,11 @@ B = -542fb814f45924aa09a16f2a6
# These test vectors satisfy Quotient = A / B, rounded towards zero, and
# Remainder = A - B * Quotient.
+Quotient = 0
+Remainder = -1
+A = -1
+B = 2
+
Quotient = 1
Remainder = 0
A = 8cdaaa7c422f3c2bb0ace2da7d7ff151e5bdefb23e6426cf3e6b21491e6e80e977bfa6c65931a8dee31fc7992c0c801d5d7c