From bf1054a0368b4f29f176cb23b8c2da672dc284e9 Mon Sep 17 00:00:00 2001 From: Daniel Kirschten Date: Wed, 1 Apr 2020 19:10:03 +0200 Subject: [PATCH] Added a GCD test case --- .../src/net/mograsim/logic/model/am2900/TestGCD.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/net.mograsim.logic.model.am2900.tests/src/net/mograsim/logic/model/am2900/TestGCD.java b/tests/net.mograsim.logic.model.am2900.tests/src/net/mograsim/logic/model/am2900/TestGCD.java index 080e6f33..f4335d2c 100644 --- a/tests/net.mograsim.logic.model.am2900.tests/src/net/mograsim/logic/model/am2900/TestGCD.java +++ b/tests/net.mograsim.logic.model.am2900.tests/src/net/mograsim/logic/model/am2900/TestGCD.java @@ -114,6 +114,7 @@ public class TestGCD checkGCD(48820, 8480); checkGCD(21420, 11288); checkGCD(15862, 21219); + checkGCD(15525, 57040); } @ParameterizedTest @@ -133,7 +134,7 @@ public class TestGCD private void checkGCD(int euclidA, int euclidB) throws InterruptedException { int exp = gcd(euclidA, euclidB); - System.out.println("Checking gcd(" + euclidA + ", " + euclidB + ") + (expected " + exp + ")"); + System.out.println("Checking gcd(" + euclidA + ", " + euclidB + "); expected " + exp); int act = executeGCD(euclidA, euclidB); assertEquals(exp, act); } -- 2.17.1