public static void main (String[] args) throws Throwable { TestSuite theSuite; if (args.length > 0) { theSuite = new TestSuite (); for (int i = 0; i < args.length; i++) { theSuite.addTest (new TestLabelAlphabet (args[i])); } } else { theSuite = (TestSuite) TestLabelAlphabet.suite (); } junit.textui.TestRunner.run (theSuite); }
/** Tests how serializing labels separately can lead to big losses. * This currently fails. I'm not sure what to do about this. -cas */ public void testReadResolve () throws IOException, ClassNotFoundException { LabelAlphabet dict = new LabelAlphabet (); dict.lookupIndex ("TEST1"); dict.lookupIndex ("TEST2"); dict.lookupIndex ("TEST3"); Label t1 = dict.lookupLabel ("TEST1"); Labelee l = new Labelee (dict, t1); Labelee l2 = (Labelee) TestSerializable.cloneViaSerialization (l); assertTrue (l.dict == l2.dict); assertTrue (dict.lookupLabel("TEST1") == l.theLabel); assertTrue (dict.lookupLabel("TEST1") == l2.theLabel); assertTrue (l.theLabel == l2.theLabel); }
/** Tests how serializing labels separately can lead to big losses. * This currently fails. I'm not sure what to do about this. -cas */ public void testReadResolve () throws IOException, ClassNotFoundException { LabelAlphabet dict = new LabelAlphabet (); dict.lookupIndex ("TEST1"); dict.lookupIndex ("TEST2"); dict.lookupIndex ("TEST3"); Label t1 = dict.lookupLabel ("TEST1"); Labelee l = new Labelee (dict, t1); Labelee l2 = (Labelee) TestSerializable.cloneViaSerialization (l); assertTrue (l.dict == l2.dict); assertTrue (dict.lookupLabel("TEST1") == l.theLabel); assertTrue (dict.lookupLabel("TEST1") == l2.theLabel); assertTrue (l.theLabel == l2.theLabel); }
public static void main (String[] args) throws Throwable { TestSuite theSuite; if (args.length > 0) { theSuite = new TestSuite (); for (int i = 0; i < args.length; i++) { theSuite.addTest (new TestLabelAlphabet (args[i])); } } else { theSuite = (TestSuite) TestLabelAlphabet.suite (); } junit.textui.TestRunner.run (theSuite); }