From: jjenista Date: Fri, 19 Feb 2010 23:00:14 +0000 (+0000) Subject: checking in this test before monkeying around with debugging stuff X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=3aa0a597f125e6ca5bb723d22528c45a163c5597;p=IRC.git checking in this test before monkeying around with debugging stuff --- diff --git a/Robust/src/Tests/disjoint/critical-regression-testing/test.java b/Robust/src/Tests/disjoint/critical-regression-testing/test.java index d0c9838b..c1ba826a 100644 --- a/Robust/src/Tests/disjoint/critical-regression-testing/test.java +++ b/Robust/src/Tests/disjoint/critical-regression-testing/test.java @@ -16,10 +16,13 @@ public class test { System.out.println( "Testing components of disjoint reachability analysis..." ); t1(); t2(); + t3(); System.out.println( "Testing completed successfully." ); } void t1() { + System.out.println( "test 1..." ); + ReachTuple rt11a = ReachTuple.factory( 11, true, ReachTuple.ARITY_ONE ); ReachTuple rt11b = ReachTuple.factory( 11, true, ReachTuple.ARITY_ONE ); ReachTuple rt12 = ReachTuple.factory( 12, true, ReachTuple.ARITY_ONE ); @@ -43,6 +46,8 @@ public class test { } void t2() { + System.out.println( "test 2..." ); + ReachTuple rt14 = ReachTuple.factory( 14, false, ReachTuple.ARITY_ONE ); ReachTuple rt15 = ReachTuple.factory( 15, true, ReachTuple.ARITY_ZEROORMORE ); @@ -67,4 +72,31 @@ public class test { assert !s8.equals( s5 ); } + void t3() { + System.out.println( "test 3..." ); + + ExistPred ept = ExistPred.factory(); + ExistPred ep21a = ExistPred.factory( 21, null ); + ExistPred ep21b = ExistPred.factory( 21, null ); + ExistPred ep22 = ExistPred.factory( 22, null ); + + assert !ept.equals( ep21a ); + assert ep21a.equals( ep21b ); + assert ep21a == ep21b; + assert !ep22.equals( ep21b ); + + ExistPredSet eps1 = + Canonical.add( + Canonical.add( ExistPredSet.factory(), + ept ), + ep21a ); + + ExistPredSet eps2 = ExistPredSet.factory( ept ); + ExistPredSet eps3 = ExistPredSet.factory( ep21a ); + + ExistPredSet eps4 = Canonical.join( eps2, eps3 ); + + assert eps1.equals( eps4 ); + } + }