303132333435363738
if(rat != null) tree.insert(rat); } System.out.println(tree.inord_transverse()); } }
3637383940414243444546
tree.create_empty(); tree.insert(2.345); String expected = "2.345"; String actual = tree.inord_transverse(); assertEquals(expected, actual); } @Test
5051525354555657585960
tree.insert(2.345); tree.insert(4.5622); String expected = "2.345 - 4.5622"; String actual = tree.inord_transverse(); assertEquals(expected, actual); } @Test
6566676869707172737475
tree.insert(2.345); tree.insert(4.5622); tree.insert(1.456); String expected = "1.456 - 2.345 - 4.5622"; String actual = tree.inord_transverse(); assertEquals(expected, actual); } @Test
8182838485868788899091
tree.insert(4.5622); tree.insert(1.456); tree.insert(0); String expected = "0.0 - 1.456 - 2.345 - 4.5622"; String actual = tree.inord_transverse(); assertEquals(expected, actual); tree.create_empty();
93949596979899100101102
tree.insert(4.5622); tree.insert(1.456); tree.insert(5); expected = "1.456 - 2.345 - 4.5622 - 5.0"; actual = tree.inord_transverse(); assertEquals(expected, actual); } }