From: Daniel Kirschten Date: Wed, 1 Apr 2020 17:10:03 +0000 (+0200) Subject: Added a GCD test case X-Git-Url: https://mograsim.net/gitweb/?a=commitdiff_plain;h=bf1054a0368b4f29f176cb23b8c2da672dc284e9;p=Mograsim.git Added a GCD test case --- 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); }