forked from JavaTX/JavaCompilerCore
noch ein smaller test
This commit is contained in:
parent
26cc9b85ef
commit
de607cfd53
@ -340,17 +340,44 @@ public class FiniteClosureTest {
|
|||||||
/*
|
/*
|
||||||
* Test Case 14
|
* Test Case 14
|
||||||
*
|
*
|
||||||
* MyMap<K, List<K>> <* HashMap<K, V>
|
* MyMap<K> <* TreeMap<K, List<K>>
|
||||||
*
|
*
|
||||||
* smaller(HashMap<? extends Number, List<? extends Number>) =
|
* smaller(TreeMap<? extends Number, List<? extends Number>) =
|
||||||
|
* { TreeMap<? extends Number>, List<? extends Number>>,
|
||||||
|
* TreeMap<? extends Integer, List<? extends Number>>,
|
||||||
|
* TreeMap<Number, List<? extends Number>>,
|
||||||
|
* TreeMap<Integer, List<? extends Number>>,
|
||||||
|
* MyMap<Integer>
|
||||||
|
* MyMap<Number>
|
||||||
|
* MyMap<? extends Integer>
|
||||||
|
* MyMap<? extends Number>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
Type listExtNum = tf.getSimpleType("List", extNum);
|
||||||
|
Type treeMapExtNumListExtNum = tf.getSimpleType("TreeMap", extNum, listExtNum);
|
||||||
|
Type myMapInt = tf.getSimpleType("MyMap", integer);
|
||||||
|
Type myMapNumber = tf.getSimpleType("MyMap", number);
|
||||||
|
Type myMapExtInt = tf.getSimpleType("MyMap", extInt);
|
||||||
|
Type myMapExtNum = tf.getSimpleType("MyMap", extNum);
|
||||||
|
|
||||||
|
actual = fc.smaller(treeMapExtNumListExtNum);
|
||||||
|
|
||||||
|
expectedResult = new HashSet<>(Arrays.stream(new Type[] {
|
||||||
|
tf.getSimpleType("TreeMap", extNum, listExtNum),
|
||||||
|
tf.getSimpleType("TreeMap", extInt, listExtNum),
|
||||||
|
tf.getSimpleType("TreeMap", number, listExtNum),
|
||||||
|
tf.getSimpleType("TreeMap", integer, listExtNum),
|
||||||
|
myMapInt, myMapNumber, myMapExtInt, myMapExtNum
|
||||||
|
}).collect(Collectors.toSet()));
|
||||||
|
|
||||||
|
Assert.assertEquals(expectedResult, actual);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Test Case 15:
|
* Test Case 15:
|
||||||
*
|
*
|
||||||
* MyMap<K, List<K>> <* HashMap<K, V>
|
* MyMap<K> <* HashMap<K, List<K>>
|
||||||
// * TODO sinnvoll ausformulieren
|
*
|
||||||
* smaller(HashMap<? extends Number, ? extends List< ? extends Integer>) =
|
* smaller(SortedSet<? extends Number, ? extends List<? extends Integer>) =
|
||||||
* { HashMap<? extends Integer>, List<Integer>>,
|
* { HashMap<? extends Integer>, List<Integer>>,
|
||||||
* HashMap<? extends Number, List<Integer>>,
|
* HashMap<? extends Number, List<Integer>>,
|
||||||
* MyMap<Integer, List<Integer>> }
|
* MyMap<Integer, List<Integer>> }
|
||||||
|
Loading…
Reference in New Issue
Block a user