Adjusted tests to the new DescriptorRenderer behaviour

This commit is contained in:
Michał Sapalski
2013-04-15 07:43:51 +02:00
committed by Andrey Breslav
parent 2352d86932
commit 7deec28b9c
406 changed files with 2360 additions and 2361 deletions
@@ -41,27 +41,27 @@ public class BoundsSubstitutorTest extends KotlinTestWithEnvironment {
public void testSimpleSubstitution() throws Exception {
doTest("fun <T> f(l: List<T>): T",
"fun <T> f(l : jet.List<jet.Any?>) : jet.Any?");
"fun <T> f(l: jet.List<jet.Any?>): jet.Any?");
}
public void testParameterInBound() throws Exception {
doTest("fun <T, R : List<T>> f(l: List<R>): R",
"fun <T, R : jet.List<jet.Any?>> f(l : jet.List<jet.List<jet.Any?>>) : jet.List<jet.Any?>");
"fun <T, R : jet.List<jet.Any?>> f(l: jet.List<jet.List<jet.Any?>>): jet.List<jet.Any?>");
}
public void testWithWhere() throws Exception {
doTest("fun <T> f(l: List<T>): T where T : Any",
"fun <T : jet.Any> f(l : jet.List<jet.Any>) : jet.Any");
"fun <T : jet.Any> f(l: jet.List<jet.Any>): jet.Any");
}
public void testWithWhereTwoBounds() throws Exception {
doTest("fun <T, R> f(l: List<R>): R where T : List<R>, R : Any",
"fun <T : jet.List<jet.Any>, R : jet.Any> f(l : jet.List<jet.Any>) : jet.Any");
"fun <T : jet.List<jet.Any>, R : jet.Any> f(l: jet.List<jet.Any>): jet.Any");
}
public void testWithWhereTwoBoundsReversed() throws Exception {
doTest("fun <T, R> f(l: List<R>): R where T : Any, R : List<T>",
"fun <T : jet.Any, R : jet.List<jet.Any>> f(l : jet.List<jet.List<jet.Any>>) : jet.List<jet.Any>");
"fun <T : jet.Any, R : jet.List<jet.Any>> f(l: jet.List<jet.List<jet.Any>>): jet.List<jet.Any>");
}
//public void testWithWhereTwoBoundsLoop() throws Exception {