1 26 27 package net.sourceforge.groboutils.codecoverage.v2.compiler; 28 29 import junit.framework.Test; 30 import junit.framework.TestCase; 31 import junit.framework.TestSuite; 32 import net.sourceforge.groboutils.autodoc.v1.AutoDoc; 33 34 import org.apache.bcel.generic.InstructionList; 35 36 37 44 public class MeasureMarkUTest extends TestCase 45 { 46 49 private static final Class THIS_CLASS = MeasureMarkUTest.class; 50 private static final AutoDoc DOC = new AutoDoc( THIS_CLASS ); 51 52 public MeasureMarkUTest( String name ) 53 { 54 super( name ); 55 } 56 57 58 61 62 63 66 public void testConstructor1() 67 { 68 new MeasureMark( Integer.MAX_VALUE, 0, 69 (short)-1, (short)-1, Short.MIN_VALUE ); 70 } 71 72 73 public void testAddToInstructionList1() 74 { 75 MeasureMark mm = new MeasureMark( Integer.MAX_VALUE, 0, 76 (short)-1, (short)-1, Short.MIN_VALUE ); 77 InstructionList list = new InstructionList(); 78 mm.addToInstructionList( list ); 79 assertEquals( 80 "Did not insert currect number of instructions.", 81 5, 82 list.size() ); 83 } 84 85 86 87 88 91 92 public static Test suite() 93 { 94 TestSuite suite = new TestSuite( THIS_CLASS ); 95 96 return suite; 97 } 98 99 public static void main( String [] args ) 100 { 101 String [] name = { THIS_CLASS.getName() }; 102 103 106 junit.textui.TestRunner.main( name ); 107 } 108 109 110 114 protected void setUp() throws Exception 115 { 116 super.setUp(); 117 118 } 120 121 122 126 protected void tearDown() throws Exception 127 { 128 130 131 super.tearDown(); 132 } 133 } 134 135 | Popular Tags |