Browse Source

int to binary test

main
fdai6499 2 years ago
committed by fdai6040
parent
commit
c8314a1694
  1. 16
      src/test/java/src/TasksFrameTest.java

16
src/test/java/src/TasksFrameTest.java

@ -20,10 +20,18 @@ class TasksFrameTest {
assertEquals("1", s); 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 // @Test
// public void test_binaryToIntAndIntToBinary() { // public void test_binaryToIntAndIntToBinary() {

Loading…
Cancel
Save