From c8314a1694892077a1b3bd7b7f276f052db4bfe8 Mon Sep 17 00:00:00 2001 From: fdai6499 Date: Fri, 10 Feb 2023 13:47:00 +0100 Subject: [PATCH] int to binary test --- src/test/java/src/TasksFrameTest.java | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/test/java/src/TasksFrameTest.java b/src/test/java/src/TasksFrameTest.java index 351f9e8..a6b7fbb 100644 --- a/src/test/java/src/TasksFrameTest.java +++ b/src/test/java/src/TasksFrameTest.java @@ -20,10 +20,18 @@ class TasksFrameTest { assertEquals("1", s); } -// @Test -// public void test_binaryToInt() { -// -// } + @Test + public void test_binaryToInt() { + TasksFrame tasksFrame = new TasksFrame(); + String s = tasksFrame.calcItoB(10); + assertEquals("1010", s); + s = tasksFrame.calcBinaryToInt(1); + assertEquals("1", s); + s = tasksFrame.calcBinaryToInt(0); + assertEquals("0", s); + s = tasksFrame.calcBinaryToInt(1); + assertEquals("1", s); + } // // @Test // public void test_binaryToIntAndIntToBinary() {