diff --git a/src/main/java/src/TasksFrame.java b/src/main/java/src/TasksFrame.java index 0ec3aa5..f3058a4 100644 --- a/src/main/java/src/TasksFrame.java +++ b/src/main/java/src/TasksFrame.java @@ -109,7 +109,7 @@ public class TasksFrame extends JFrame { } - private int ePhi(Integer n) { + public int ePhi(Integer n) { LinkedList menge = new LinkedList<>(); @@ -121,7 +121,7 @@ public class TasksFrame extends JFrame { return menge.size(); } - private int ggt(int a, int b) { + public int ggt(int a, int b) { int h; if (a == 0) return 0; diff --git a/src/test/java/src/TasksFrameTest.java b/src/test/java/src/TasksFrameTest.java index ebe61ca..96efb8a 100644 --- a/src/test/java/src/TasksFrameTest.java +++ b/src/test/java/src/TasksFrameTest.java @@ -46,6 +46,18 @@ class TasksFrameTest { assertEquals(3,p3); } + @Test + void test_ePhi(){ + TasksFrame tasksFrame = new TasksFrame(); + int i = tasksFrame.ePhi( 10); + assertEquals(4, i); + int a = tasksFrame.ePhi(25); + assertEquals(20, a); + int b = tasksFrame.ePhi(15); + assertEquals(8, b); + int c = tasksFrame.ePhi(35); + assertEquals(24, c); + } }