From e59ba19b9c4e410f06c1de3004ffef1e52956de4 Mon Sep 17 00:00:00 2001 From: fdai6499 Date: Fri, 10 Feb 2023 13:45:13 +0100 Subject: [PATCH] binary to int test --- src/test/java/MainFrameTest.java | 5 +---- src/test/java/src/TasksFrameTest.java | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/src/test/java/MainFrameTest.java b/src/test/java/MainFrameTest.java index bbfee1d..8a8fbcc 100644 --- a/src/test/java/MainFrameTest.java +++ b/src/test/java/MainFrameTest.java @@ -1,8 +1,5 @@ import org.junit.jupiter.api.*; -import src.GameField; -import src.Main; -import src.MainFrame; -import src.Model; +import src.*; import static org.junit.jupiter.api.Assertions.*; diff --git a/src/test/java/src/TasksFrameTest.java b/src/test/java/src/TasksFrameTest.java index 19358f6..f0dc17b 100644 --- a/src/test/java/src/TasksFrameTest.java +++ b/src/test/java/src/TasksFrameTest.java @@ -7,6 +7,29 @@ import static org.junit.jupiter.api.Assertions.*; class TasksFrameTest { + @Test + public void test_intToBinary() { + TasksFrame tasksFrame = new TasksFrame(); + String s = tasksFrame.calcBinaryToInt(1010); + assertEquals("10", s); + s = tasksFrame.calcBinaryToInt(10); + assertEquals("2", s); + s = tasksFrame.calcBinaryToInt(0); + assertEquals("0", s); + s = tasksFrame.calcBinaryToInt(1); + assertEquals("1", s); + } + +// @Test +// public void test_binaryToInt() { +// +// } +// +// @Test +// public void test_binaryToIntAndIntToBinary() { +// +// } + @Test void test_recursiveFib() { TasksFrame tasksFrame = new TasksFrame();