erase3 test
This commit is contained in:
parent
2eb11748ca
commit
4c6c77929f
@ -199,7 +199,26 @@ public class RuleSetTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testErase3() {
|
public void testErase3() {
|
||||||
|
TypeFactory tf = new TypeFactory();
|
||||||
|
RuleSet rules = new RuleSet(new FiniteClosureBuilder().getFiniteClosure());
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Positive Tests
|
||||||
|
*/
|
||||||
|
MPair erase1 = new MPair(tf.getSimpleType("List", "T"), tf.getSimpleType("List", "T"), PairOperator.EQUALSDOT);
|
||||||
|
MPair erase2 = new MPair(tf.getPlaceholderType("W"), tf.getPlaceholderType("W"), PairOperator.EQUALSDOT);
|
||||||
|
|
||||||
|
Assert.assertTrue(rules.erase3(erase1));
|
||||||
|
Assert.assertTrue(rules.erase3(erase2));
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Negative Tests
|
||||||
|
*/
|
||||||
|
MPair noerase1 = new MPair(tf.getSimpleType("Collection"), tf.getSimpleType("List", "T"), PairOperator.EQUALSDOT);
|
||||||
|
MPair noerase2 = new MPair(tf.getSimpleType("List", "T"), tf.getSimpleType("List", "T"), PairOperator.SMALLERDOT);
|
||||||
|
|
||||||
|
Assert.assertFalse(rules.erase3(noerase1));
|
||||||
|
Assert.assertFalse(rules.erase3(noerase2));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
Loading…
x
Reference in New Issue
Block a user