From d97461240433625fcb8e9fcd8fd3958c88887cb2 Mon Sep 17 00:00:00 2001 From: Michael Hamburg Date: Mon, 22 Jun 2015 16:28:13 -0700 Subject: [PATCH] restore test which got clobbered somehow --- test/test_decaf.cxx | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/test/test_decaf.cxx b/test/test_decaf.cxx index 1f90c6e..8779b24 100644 --- a/test/test_decaf.cxx +++ b/test/test_decaf.cxx @@ -72,8 +72,8 @@ static bool arith_check( const Scalar &x, const Scalar &y, const Scalar &z, - const Scalar &r, const Scalar &l, + const Scalar &r, const char *name ) { if (l == r) return true; @@ -82,8 +82,8 @@ static bool arith_check( print("x", x); print("y", y); print("z", z); - print("lhs", r); - print("rhs", l); + print("lhs", l); + print("rhs", r); return false; } @@ -112,8 +112,8 @@ static bool point_check( print("p", p); print("q", q); print("r", R); - print("lhs", l); - print("rhs", r); + print("lhs", r); + print("rhs", l); return false; } @@ -163,7 +163,7 @@ static void test_elligator() { bool succ = p.invert_elligator(b1,i&7); Point q; unsigned char hint = q.set_to_hash(b1); - + if (succ != ((i&7) != 4) || (q != p) || (succ && (hint != (i&7)))) { test.fail(); printf("Elligator test: t=%d, h=%d->%d, q%sp, %s %02x%02x\n", @@ -172,7 +172,7 @@ static void test_elligator() { } } - for (int i=0; i