示例#1
0
 @Test
 public void testEquals() {
   final Block block = new Block(program), block2 = new Block(program);
   assertTrue(block.equals(block2));
   assertTrue(block2.equals(block2));
   assertFalse(block.equals(new Block()));
 }
示例#2
0
 @Test
 public void testGenerateCodeString() {
   final Block block = new Block(program);
   assertEquals("{\n  \"docstr\"\n  abc\n  abc.def\n  123\n}", block.generateCodeString());
 }
示例#3
0
 @Test
 public void testConstruct() {
   final Block block = new Block(program);
   assertEquals(program, block.getProgram());
 }