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
@@ -4,8 +4,7 @@ trait Trait {
class TraitImpl : Trait {
override fun <A, B: Runnable, E: Map.Entry<A, B>> foo()
where B: Cloneable, B: Comparable<B> {
override fun <A, B: Runnable, E: Map.Entry<A, B>> foo() where B: Cloneable, B: Comparable<B> {
throw UnsupportedOperationException()
}
}
@@ -4,4 +4,4 @@ fun some() {
tes<caret>
}
// EXIST: test@test(a : jet.Int)
// EXIST: test@test(a: jet.Int)
@@ -9,20 +9,20 @@ T</b>
<td align="right" colspan="2" style="white-space:nowrap;font-weight:bold;">
<b>
fun</b>
&lt;T, E>
&lt;T, E : java.lang.Cloneable>
writeToMyList</td>
<td style="white-space:nowrap;font-weight:bold;">
(</td>
<td align="right" style="white-space:nowrap;font-weight:bold;">
l : MyList&lt;in T&gt;,</td>
l: MyList&lt;in T&gt;,</td>
<td align="right" style="white-space:nowrap;font-weight:bold;">
t : T</td>
t: T</td>
<td style="white-space:nowrap;font-weight:bold;">
)</td>
<td style="white-space:nowrap;font-weight:bold;">
: jet.Unit <b>
: jet.Unit <b>
where</b>
E : java.lang.Cloneable, E : java.io.Closeable</td>
E : java.io.Closeable</td>
</tr>
<tr>
<td colspan="8" style="white-space:nowrap;">
@@ -115,4 +115,4 @@ jet.Any</b>
</td>
</tr>
</table>
</html>
</html>
@@ -14,9 +14,9 @@ constructor</b>
<td style="white-space:nowrap;font-weight:bold;">
(</td>
<td align="right" style="white-space:nowrap;font-weight:bold;">
l : MyList&lt;in T&gt;,</td>
l: MyList&lt;in T&gt;,</td>
<td align="right" style="white-space:nowrap;font-weight:bold;">
t : T</td>
t: T</td>
<td style="white-space:nowrap;font-weight:bold;">
)</td>
<td style="white-space:nowrap;font-weight:bold;">
@@ -12,11 +12,11 @@ fun</b>
<td style="white-space:nowrap;font-weight:bold;">
(</td>
<td align="right" style="white-space:nowrap;font-weight:bold;">
a : A&lt;T, R&gt;</td>
a: A&lt;T, R&gt;</td>
<td style="white-space:nowrap;font-weight:bold;">
)</td>
<td style="white-space:nowrap;font-weight:bold;">
: A&lt;T, R&gt;</td>
: A&lt;T, R&gt;</td>
</tr>
<tr>
<td colspan="7" style="white-space:nowrap;">
@@ -12,11 +12,11 @@ fun</b>
<td style="white-space:nowrap;font-weight:bold;">
(</td>
<td align="right" style="white-space:nowrap;font-weight:bold;">
a : A&lt;T, R&gt;</td>
a: A&lt;T, R&gt;</td>
<td style="white-space:nowrap;font-weight:bold;">
)</td>
<td style="white-space:nowrap;font-weight:bold;">
: A&lt;T, R&gt;</td>
: A&lt;T, R&gt;</td>
</tr>
<tr>
<td colspan="7" style="white-space:nowrap;">
@@ -12,11 +12,11 @@ fun</b>
<td style="white-space:nowrap;font-weight:bold;">
(</td>
<td align="right" style="white-space:nowrap;font-weight:bold;">
a : A&lt;T, R&gt;</td>
a: A&lt;T, R&gt;</td>
<td style="white-space:nowrap;font-weight:bold;">
)</td>
<td style="white-space:nowrap;font-weight:bold;">
: A&lt;T, R&gt;</td>
: A&lt;T, R&gt;</td>
</tr>
<tr>
<td colspan="7" style="white-space:nowrap;">
@@ -14,13 +14,13 @@ fun</b>
<td style="white-space:nowrap;font-weight:bold;">
(</td>
<td align="right" style="white-space:nowrap;font-weight:bold;">
r : R,</td>
r: R,</td>
<td align="right" style="white-space:nowrap;font-weight:bold;">
list : T</td>
list: T</td>
<td style="white-space:nowrap;font-weight:bold;">
)</td>
<td style="white-space:nowrap;font-weight:bold;">
: jet.Unit</td>
: jet.Unit</td>
</tr>
</table>
is not satisfied: inferred type <font color=red>
@@ -3,7 +3,7 @@ fun test() {
MyClass().<warning descr="'fun test2()' is deprecated. Use A instead">test2</warning>()
MyClass.<warning descr="'fun test3()' is deprecated. Use A instead">test3</warning>()
<warning descr="'fun test4(x : jet.Int, y : jet.Int)' is deprecated. Use A instead">test4</warning>(1, 2)
<warning descr="'fun test4(x: jet.Int, y: jet.Int)' is deprecated. Use A instead">test4</warning>(1, 2)
}
deprecated("Use A instead") fun test1() { }
+1 -1
View File
@@ -6,5 +6,5 @@ fun test() {
val x1 = MyClass()
val x2 = MyClass()
<warning descr="'fun get(i : MyClass)' is deprecated. Use A instead">x1[x2]</warning>
<warning descr="'fun get(i: MyClass)' is deprecated. Use A instead">x1[x2]</warning>
}
@@ -20,19 +20,19 @@ fun test() {
val x1 = MyClass()
val x2 = MyClass()
x1 <warning descr="'fun minus(i : MyClass)' is deprecated. Use A instead">-</warning> x2
x1 <warning descr="'fun div(i : MyClass)' is deprecated. Use A instead">/</warning> x2
x1 <warning descr="'fun times(i : MyClass)' is deprecated. Use A instead">*</warning> x2
x1 <warning descr="'fun minus(i: MyClass)' is deprecated. Use A instead">-</warning> x2
x1 <warning descr="'fun div(i: MyClass)' is deprecated. Use A instead">/</warning> x2
x1 <warning descr="'fun times(i: MyClass)' is deprecated. Use A instead">*</warning> x2
<warning descr="'fun not()' is deprecated. Use A instead">!</warning>x1
<warning descr="'fun plus()' is deprecated. Use A instead">+</warning>x1
x1 <warning descr="'fun contains(i : MyClass)' is deprecated. Use A instead">in</warning> x2
x1 <warning descr="'fun contains(i : MyClass)' is deprecated. Use A instead">!in</warning> x2
x1 <warning descr="'fun contains(i: MyClass)' is deprecated. Use A instead">in</warning> x2
x1 <warning descr="'fun contains(i: MyClass)' is deprecated. Use A instead">!in</warning> x2
x1 <warning descr="'fun plusAssign(i : MyClass)' is deprecated. Use A instead">+=</warning> x2
x1 <warning descr="'fun plusAssign(i: MyClass)' is deprecated. Use A instead">+=</warning> x2
x1 <warning descr="'fun equals(i : jet.Any?)' is deprecated. Use A instead">==</warning> x2
x1 <warning descr="'fun equals(i : jet.Any?)' is deprecated. Use A instead">!=</warning> x2
x1 <warning descr="'fun compareTo(i : MyClass)' is deprecated. Use A instead">></warning> x2
x1 <warning descr="'fun equals(i: jet.Any?)' is deprecated. Use A instead">==</warning> x2
x1 <warning descr="'fun equals(i: jet.Any?)' is deprecated. Use A instead">!=</warning> x2
x1 <warning descr="'fun compareTo(i: MyClass)' is deprecated. Use A instead">></warning> x2
}
@@ -11,7 +11,7 @@ fun test() {
val x1 = MyClass()
val x2 = MyClass()
for (i in x1<warning descr="'fun rangeTo(i : MyClass)' is deprecated. Use A instead">..</warning>x2) {
for (i in x1<warning descr="'fun rangeTo(i: MyClass)' is deprecated. Use A instead">..</warning>x2) {
}
}
@@ -4,19 +4,19 @@
package testData.libraries
[[public abstract class ClassWithAbstractAndOpenMembers() {
[public abstract val abstractVal : jet.String]
[public abstract val abstractVal: jet.String]
[public abstract var abstractVar : jet.String]
[public abstract var abstractVar: jet.String]
[public open val openVal : jet.String] /* compiled code */
[public open val openVal: jet.String] /* compiled code */
[public open val openValWithGetter : jet.String] /* compiled code */
[public open val openValWithGetter: jet.String] /* compiled code */
[public open var openVar : jet.String] /* compiled code */
[public open var openVar: jet.String] /* compiled code */
[public open var openVarWithGetter : jet.String] /* compiled code */
[public open var openVarWithGetter: jet.String] /* compiled code */
[public abstract fun abstractFun() : jet.Unit]
[public abstract fun abstractFun(): jet.Unit]
[public open fun openFun() : jet.Unit { /* compiled code */ }]
}]]
[public open fun openFun(): jet.Unit { /* compiled code */ }]
}]]
@@ -3,6 +3,6 @@
package testData.libraries
[[public final class ClassWithConstructor(a : jet.String, b : jet.Any) {
[internal final val a : jet.String] /* compiled code */
[[public final class ClassWithConstructor(a: jet.String, b: jet.Any) {
[internal final val a: jet.String] /* compiled code */
}]]
+8 -8
View File
@@ -3,18 +3,18 @@
package testData.libraries
[[public final enum class Color(rgb : jet.Int) : jet.Enum<testData.libraries.Color> {
[[public final enum class Color(rgb: jet.Int) : jet.Enum<testData.libraries.Color> {
public class object {
[public final val BLUE : testData.libraries.Color] /* compiled code */
[public final val BLUE: testData.libraries.Color] /* compiled code */
[public final val GREEN : testData.libraries.Color] /* compiled code */
[public final val GREEN: testData.libraries.Color] /* compiled code */
[public final val RED : testData.libraries.Color] /* compiled code */
[public final val RED: testData.libraries.Color] /* compiled code */
public final fun valueOf(value : jet.String) : testData.libraries.Color { /* compiled code */ }
public final fun valueOf(value: jet.String): testData.libraries.Color { /* compiled code */ }
public final fun values() : jet.Array<testData.libraries.Color> { /* compiled code */ }
public final fun values(): jet.Array<testData.libraries.Color> { /* compiled code */ }
}
[internal final val rgb : jet.Int] /* compiled code */
}]]
[internal final val rgb: jet.Int] /* compiled code */
}]]
@@ -3,34 +3,34 @@
package testData.libraries
[public val globalVal : testData.libraries.Pair<jet.Int, jet.String>] /* compiled code */
[public val globalVal: testData.libraries.Pair<jet.Int, jet.String>] /* compiled code */
[public val globalValWithGetter : jet.Long] /* compiled code */
[public val globalValWithGetter: jet.Long] /* compiled code */
[public val jet.Int.exProp : jet.Int] /* compiled code */
[public val jet.Int.exProp: jet.Int] /* compiled code */
[public val jet.String.exProp : jet.String] /* compiled code */
[public val jet.String.exProp: jet.String] /* compiled code */
[public val <T> testData.libraries.Pair<T, T>.exProp : jet.String] /* compiled code */
[public val <T> testData.libraries.Pair<T, T>.exProp: jet.String] /* compiled code */
[public fun <T : jet.CharSequence> funWithTypeParam(t : T) : jet.Unit { /* compiled code */ }]
[public fun <T : jet.CharSequence> funWithTypeParam(t: T): jet.Unit { /* compiled code */ }]
[public fun <T : jet.Number> funWithTypeParam(t : T) : jet.Unit { /* compiled code */ }]
[public fun <T : jet.Number> funWithTypeParam(t: T): jet.Unit { /* compiled code */ }]
[public fun func() : jet.Unit { /* compiled code */ }]
[public fun func(): jet.Unit { /* compiled code */ }]
[public fun func(cs : jet.CharSequence) : jet.Unit { /* compiled code */ }]
[public fun func(cs: jet.CharSequence): jet.Unit { /* compiled code */ }]
[public fun func(a : jet.Int, b : jet.Int) : jet.Unit { /* compiled code */ }]
[public fun func(a: jet.Int, b: jet.Int): jet.Unit { /* compiled code */ }]
[public fun func(a : jet.Int, b : jet.String = /* compiled code */) : jet.Unit { /* compiled code */ }]
[public fun func(a: jet.Int, b: jet.String = /* compiled code */): jet.Unit { /* compiled code */ }]
[public fun func(str : jet.String) : jet.Unit { /* compiled code */ }]
[public fun func(str: jet.String): jet.Unit { /* compiled code */ }]
[public fun main(args : jet.Array<jet.String>) : jet.Unit { /* compiled code */ }]
[public fun main(args: jet.Array<jet.String>): jet.Unit { /* compiled code */ }]
[public fun processDouble(d : jet.Double) : jet.Unit { /* compiled code */ }]
[public fun processDouble(d: jet.Double): jet.Unit { /* compiled code */ }]
[public fun processDouble(d : testData.libraries.Double) : jet.Unit { /* compiled code */ }]
[public fun processDouble(d: testData.libraries.Double): jet.Unit { /* compiled code */ }]
[public fun <T> T.filter(predicate : (T) -> jet.Boolean) : T? { /* compiled code */ }]
[public fun <T> T.filter(predicate: (T) -> jet.Boolean): T? { /* compiled code */ }]
@@ -4,5 +4,5 @@
package testData.libraries
[[public object NamedObject {
[public final val objectMember : jet.Int] /* compiled code */
[public final val objectMember: jet.Int] /* compiled code */
}]]
@@ -5,12 +5,12 @@ package testData.libraries
[[public final class WithInnerAndObject() {
public class object {
[internal final fun foo() : jet.Unit { /* compiled code */ }]
[internal final fun foo(): jet.Unit { /* compiled code */ }]
}
[[internal final class MyInner() {
[internal trait MyInnerInner {
[internal abstract fun innerInnerMethod() : jet.Unit]
[internal abstract fun innerInnerMethod(): jet.Unit]
}]
}]]
}]]
}]]
@@ -1,5 +1,5 @@
// "Change function signature..." "true"
// ERROR: <html>Class 'B' must be declared abstract or implement abstract member<br/><b>abstract</b> <b>fun</b> f(a: jet.String): jet.Unit <i>defined in</i> A</html>
// ERROR: <html>Class 'B' must be declared abstract or implement abstract member<br/><b>internal</b> <b>abstract</b> <b>fun</b> f(a: jet.String): jet.Unit <i>defined in</i> A</html>
trait A {
fun f(a: Int)
fun f(a: String)
@@ -1,5 +1,5 @@
// "Change function signature..." "true"
// ERROR: <html>Class 'B' must be declared abstract or implement abstract member<br/><b>abstract</b> <b>fun</b> f(a: jet.String): jet.Unit <i>defined in</i> A</html>
// ERROR: <html>Class 'B' must be declared abstract or implement abstract member<br/><b>internal</b> <b>abstract</b> <b>fun</b> f(a: jet.String): jet.Unit <i>defined in</i> A</html>
trait A {
fun f(a: Int)
fun f(a: String)
@@ -1,7 +1,7 @@
// "Change 'B.foo' function return type to 'Int'" "false"
// "Change 'B.foo' function return type to 'Long'" "false"
// "Remove explicitly specified return type in 'B.foo' function" "false"
// ERROR: <html>Return type is 'jet.String', which is not a subtype of overridden<br/><b>internal</b> <b>abstract</b> <b>fun</b> foo() : jet.Int <i>defined in</i> A</html>
// "Remove explicitly specified return type" "false"
// ERROR: <html>Return type is 'jet.String', which is not a subtype of overridden<br/><b>internal</b> <b>abstract</b> <b>fun</b> foo(): jet.Int <i>defined in</i> A</html>
abstract class A {
abstract fun foo() : Int;
}
@@ -1,3 +1,3 @@
Duplicating local variable 'y'
Duplicating parameter 'y'
Function already exists: 'local final fun inner2(x : Int, y : Int) : Any defined in outer'
Function already exists: 'local final fun inner2(x: Int, y: Int): Any defined in outer'
@@ -1 +1 @@
Function already exists: 'internal final fun inner2(x : Int, y : Int) : Unit defined in outer'
Function already exists: 'internal final fun inner2(x: Int, y: Int): Unit defined in outer'
@@ -1 +1 @@
Function already exists: 'internal fun fun2() : Unit defined in root package'
Function already exists: 'internal fun fun2(): Unit defined in root package'