Types are no more rendered for annotation arguments + a swarm of tests corrected accordingly

This commit is contained in:
Mikhail Glukhikh
2015-06-29 19:54:43 +03:00
parent dde295011b
commit bae9a7d7f8
213 changed files with 604 additions and 552 deletions
+1 -1
View File
@@ -9,4 +9,4 @@ annotation class Ann(
Ann(1, 1.toByte(), 128.toByte(), 128) class MyClass
// EXPECTED: Ann(b1 = IntegerValueType(1): IntegerValueType(1), b2 = 1.toByte(): Byte, b3 = -128.toByte(): Byte, b4 = IntegerValueType(128): IntegerValueType(128))
// EXPECTED: Ann(b1 = IntegerValueType(1), b2 = 1.toByte(), b3 = -128.toByte(), b4 = IntegerValueType(128))
+1 -1
View File
@@ -13,4 +13,4 @@ annotation class Ann(
Ann('c', 99.toChar(), 'c'.toInt(), 'c'.toLong(), 'c'.toByte(), 'c'.toShort(), 'c'.toDouble(), 'c'.toFloat()) class MyClass
// EXPECTED: Ann(b1 = \u0063 ('c'): Char, b2 = \u0063 ('c'): Char, b3 = 99: Int, b4 = 99.toLong(): Long, b5 = 99.toByte(): Byte, b6 = 99.toShort(): Short, b7 = 99.0.toDouble(): Double, b8 = 99.0.toFloat(): Float)
// EXPECTED: Ann(b1 = \u0063 ('c'), b2 = \u0063 ('c'), b3 = 99, b4 = 99.toLong(), b5 = 99.toByte(), b6 = 99.toShort(), b7 = 99.0.toDouble(), b8 = 99.0.toFloat())
+1 -1
View File
@@ -9,4 +9,4 @@ annotation class Ann(
Ann(1.0, 1.toDouble(), 1.7976931348623157E309.toDouble(), 1.7976931348623157E309) class MyClass
// EXPECTED: Ann(b1 = 1.0.toDouble(): Double, b2 = 1.0.toDouble(): Double, b3 = Infinity.toDouble(): Double, b4 = Infinity.toDouble(): Double)
// EXPECTED: Ann(b1 = 1.0.toDouble(), b2 = 1.0.toDouble(), b3 = Infinity.toDouble(), b4 = Infinity.toDouble())
@@ -7,4 +7,4 @@ annotation class Ann(
Ann(true && false, true && true) class MyClass
// EXPECTED: Ann(b1 = false: Boolean, b2 = true: Boolean)
// EXPECTED: Ann(b1 = false, b2 = true)
@@ -8,4 +8,4 @@ annotation class Ann(
Ann(true and false, false or true, true xor false) class MyClass
// EXPECTED: Ann(b1 = false: Boolean, b2 = true: Boolean, b3 = true: Boolean)
// EXPECTED: Ann(b1 = false, b2 = true, b3 = true)
@@ -4,4 +4,4 @@ annotation class Ann(val c1: Char)
Ann('a' - 'a') class MyClass
// EXPECTED: Ann(c1 = IntegerValueType(0): IntegerValueType(0))
// EXPECTED: Ann(c1 = IntegerValueType(0))
@@ -8,4 +8,4 @@ annotation class Ann(
Ann(1.toInt().plus(1), 1.minus(1.toInt()), 1.toInt().times(1.toInt())) class MyClass
// EXPECTED: Ann(p1 = 2: Int, p2 = 0: Int, p3 = 1: Int)
// EXPECTED: Ann(p1 = 2, p2 = 0, p3 = 1)
@@ -9,4 +9,4 @@ annotation class Ann(
Ann(1 / 1, 1 / 1, 1 / 1, 1 / 1) class MyClass
// EXPECTED: Ann(b = IntegerValueType(1): IntegerValueType(1), i = IntegerValueType(1): IntegerValueType(1), l = IntegerValueType(1): IntegerValueType(1), s = IntegerValueType(1): IntegerValueType(1))
// EXPECTED: Ann(b = IntegerValueType(1), i = IntegerValueType(1), l = IntegerValueType(1), s = IntegerValueType(1))
@@ -8,4 +8,4 @@ annotation class Ann(
Ann(1.0 + 1.0, 1.0 + 1, 1 + 1.0) class MyClass
// EXPECTED: Ann(d1 = 2.0.toDouble(): Double, d2 = 2.0.toDouble(): Double, d3 = 2.0.toDouble(): Double)
// EXPECTED: Ann(d1 = 2.0.toDouble(), d2 = 2.0.toDouble(), d3 = 2.0.toDouble())
@@ -10,4 +10,4 @@ annotation class Ann(
Ann(1 == 2, 1.0 == 2.0, 'b' == 'a', "a" == "b", "a" == "a") class MyClass
// EXPECTED: Ann(b1 = false: Boolean, b2 = false: Boolean, b3 = false: Boolean, b4 = false: Boolean, b5 = true: Boolean)
// EXPECTED: Ann(b1 = false, b2 = false, b3 = false, b4 = false, b5 = true)
@@ -4,4 +4,4 @@ annotation class Ann(val s1: String)
Ann(s1 = "\$ab") class MyClass
// EXPECTED: Ann(s1 = "$ab": String)
// EXPECTED: Ann(s1 = "$ab")
@@ -9,4 +9,4 @@ annotation class Ann(
Ann(1.toFloat() + 1.toFloat(), 1.toFloat() + 1, 1.toFloat() + 1.0) class MyClass
// EXPECTED: Ann(d1 = 2.0.toFloat(): Float, d2 = 2.0.toFloat(): Float, d3 = 2.0.toDouble(): Double)
// EXPECTED: Ann(d1 = 2.0.toFloat(), d2 = 2.0.toFloat(), d3 = 2.0.toDouble())
@@ -14,4 +14,4 @@ val b = 2
Ann(1 > 2, 1.0 > 2.0, 2 > a, b > a, 'b' > 'a', "a" > "b") class MyClass
// EXPECTED: Ann(b1 = false: Boolean, b2 = false: Boolean, b3 = true: Boolean, b4 = true: Boolean, b5 = true: Boolean, b6 = false: Boolean)
// EXPECTED: Ann(b1 = false, b2 = false, b3 = true, b4 = true, b5 = true, b6 = false)
@@ -9,4 +9,4 @@ annotation class Ann(
Ann(1 >= 2, 1.0 >= 2.0, 1 >= 1, 1.0 >= 1.0) class MyClass
// EXPECTED: Ann(b1 = false: Boolean, b2 = false: Boolean, b3 = true: Boolean, b4 = true: Boolean)
// EXPECTED: Ann(b1 = false, b2 = false, b3 = true, b4 = true)
@@ -10,4 +10,4 @@ annotation class Ann(
Ann(1 plus 1, 1 minus 1, 1 times 1, 1 div 1, 1 mod 1) class MyClass
// EXPECTED: Ann(p1 = IntegerValueType(2): IntegerValueType(2), p2 = IntegerValueType(0): IntegerValueType(0), p3 = IntegerValueType(1): IntegerValueType(1), p4 = IntegerValueType(1): IntegerValueType(1), p5 = IntegerValueType(0): IntegerValueType(0))
// EXPECTED: Ann(p1 = IntegerValueType(2), p2 = IntegerValueType(0), p3 = IntegerValueType(1), p4 = IntegerValueType(1), p5 = IntegerValueType(0))
@@ -10,4 +10,4 @@ annotation class Ann(p1: Int,
Ann(1 or 1, 1 and 1, 1 xor 1, 1 shl 1, 1 shr 1, 1 ushr 1) class MyClass
// EXPECTED: Ann(p1 = IntegerValueType(1): IntegerValueType(1), p2 = IntegerValueType(1): IntegerValueType(1), p3 = IntegerValueType(0): IntegerValueType(0), p4 = IntegerValueType(2): IntegerValueType(2), p5 = IntegerValueType(0): IntegerValueType(0), p6 = IntegerValueType(0): IntegerValueType(0))
// EXPECTED: Ann(p1 = IntegerValueType(1), p2 = IntegerValueType(1), p3 = IntegerValueType(0), p4 = IntegerValueType(2), p5 = IntegerValueType(0), p6 = IntegerValueType(0))
@@ -4,4 +4,4 @@ annotation class Ann(i: Double)
Ann(A@ 1.0) class MyClass
// EXPECTED: Ann(i = 1.0.toDouble(): Double)
// EXPECTED: Ann(i = 1.0.toDouble())
@@ -8,4 +8,4 @@ annotation class Ann(
Ann(1 + 1, java.lang.Long.MAX_VALUE + 1 - 1, java.lang.Long.MAX_VALUE - 1) class MyClass
// EXPECTED: Ann(l1 = IntegerValueType(2): IntegerValueType(2), l2 = 9223372036854775807.toLong(): Long, l3 = 9223372036854775806.toLong(): Long)
// EXPECTED: Ann(l1 = IntegerValueType(2), l2 = 9223372036854775807.toLong(), l3 = 9223372036854775806.toLong())
@@ -14,4 +14,4 @@ val b = 2
Ann(1 < 2, 1.0 < 2.0, 2 < a, b < a, 'b' < 'a', "a" < "b") class MyClass
// EXPECTED: Ann(b1 = true: Boolean, b2 = true: Boolean, b3 = false: Boolean, b4 = false: Boolean, b5 = false: Boolean, b6 = true: Boolean)
// EXPECTED: Ann(b1 = true, b2 = true, b3 = false, b4 = false, b5 = false, b6 = true)
@@ -9,4 +9,4 @@ annotation class Ann(
Ann(1 <= 2, 1.0 <= 2.0, 1 <= 1, 1.0 <= 1.0) class MyClass
// EXPECTED: Ann(b1 = true: Boolean, b2 = true: Boolean, b3 = true: Boolean, b4 = true: Boolean)
// EXPECTED: Ann(b1 = true, b2 = true, b3 = true, b4 = true)
@@ -18,4 +18,4 @@ Ann(
p6 = java.lang.Long.MAX_VALUE + 1
) class MyClass
// EXPECTED: Ann(p1 = 128: Int, p2 = 32768: Int, p3 = -2147483648: Int, p4 = -2147483648: Int, p5 = 2147483648.toLong(): Long, p6 = -9223372036854775808.toLong(): Long)
// EXPECTED: Ann(p1 = 128, p2 = 32768, p3 = -2147483648, p4 = -2147483648, p5 = 2147483648.toLong(), p6 = -9223372036854775808.toLong())
@@ -16,4 +16,4 @@ Ann(
p5 = 1.toByte() + 1.toByte()
) class MyClass
// EXPECTED: Ann(p1 = 128: Int, p2 = IntegerValueType(2): IntegerValueType(2), p3 = 128: Int, p4 = 2: Int, p5 = 2: Int)
// EXPECTED: Ann(p1 = 128, p2 = IntegerValueType(2), p3 = 128, p4 = 2, p5 = 2)
@@ -16,4 +16,4 @@ Ann(
p5 = 1.toInt() + 1.toInt()
) class MyClass
// EXPECTED: Ann(p1 = -2147483648: Int, p2 = IntegerValueType(2): IntegerValueType(2), p3 = -2147483648: Int, p4 = 2: Int, p5 = 2: Int)
// EXPECTED: Ann(p1 = -2147483648, p2 = IntegerValueType(2), p3 = -2147483648, p4 = 2, p5 = 2)
@@ -9,4 +9,4 @@ annotation class Ann(
Ann(1 * 1, 1 * 1, 1 * 1, 1 * 1) class MyClass
// EXPECTED: Ann(b = IntegerValueType(1): IntegerValueType(1), i = IntegerValueType(1): IntegerValueType(1), l = IntegerValueType(1): IntegerValueType(1), s = IntegerValueType(1): IntegerValueType(1))
// EXPECTED: Ann(b = IntegerValueType(1), i = IntegerValueType(1), l = IntegerValueType(1), s = IntegerValueType(1))
@@ -9,4 +9,4 @@ annotation class Ann(
Ann(1 - 1, 1 - 1, 1 - 1, 1 - 1) class MyClass
// EXPECTED: Ann(b = IntegerValueType(0): IntegerValueType(0), i = IntegerValueType(0): IntegerValueType(0), l = IntegerValueType(0): IntegerValueType(0), s = IntegerValueType(0): IntegerValueType(0))
// EXPECTED: Ann(b = IntegerValueType(0), i = IntegerValueType(0), l = IntegerValueType(0), s = IntegerValueType(0))
@@ -9,4 +9,4 @@ annotation class Ann(
Ann(1 % 1, 1 % 1, 1 % 1, 1 % 1) class MyClass
// EXPECTED: Ann(b = IntegerValueType(0): IntegerValueType(0), i = IntegerValueType(0): IntegerValueType(0), l = IntegerValueType(0): IntegerValueType(0), s = IntegerValueType(0): IntegerValueType(0))
// EXPECTED: Ann(b = IntegerValueType(0), i = IntegerValueType(0), l = IntegerValueType(0), s = IntegerValueType(0))
@@ -4,4 +4,4 @@ annotation class Ann(val s1: String)
Ann(s1 = """a""" + "b") class MyClass
// EXPECTED: Ann(s1 = "ab": String)
// EXPECTED: Ann(s1 = "ab")
@@ -8,4 +8,4 @@ annotation class Ann(
Ann(!true, !false) class MyClass
// EXPECTED: Ann(b1 = false: Boolean, b2 = true: Boolean)
// EXPECTED: Ann(b1 = false, b2 = true)
@@ -10,4 +10,4 @@ annotation class Ann(
Ann(1 != 2, 1.0 != 2.0, 'b' != 'a', "a" != "b", "a" != "a") class MyClass
// EXPECTED: Ann(b1 = true: Boolean, b2 = true: Boolean, b3 = true: Boolean, b4 = true: Boolean, b5 = false: Boolean)
// EXPECTED: Ann(b1 = true, b2 = true, b3 = true, b4 = true, b5 = false)
@@ -7,4 +7,4 @@ annotation class Ann(
Ann(true || false, true || true) class MyClass
// EXPECTED: Ann(b1 = true: Boolean, b2 = true: Boolean)
// EXPECTED: Ann(b1 = true, b2 = true)
@@ -4,4 +4,4 @@ annotation class Ann(i: Int)
Ann((1 + 2) * 2) class MyClass
// EXPECTED: Ann(i = IntegerValueType(6): IntegerValueType(6))
// EXPECTED: Ann(i = IntegerValueType(6))
@@ -9,4 +9,4 @@ annotation class Ann(
Ann(1 + 1, 1 + 1, 1 + 1, 1 + 1) class MyClass
// EXPECTED: Ann(b = IntegerValueType(2): IntegerValueType(2), i = IntegerValueType(2): IntegerValueType(2), l = IntegerValueType(2): IntegerValueType(2), s = IntegerValueType(2): IntegerValueType(2))
// EXPECTED: Ann(b = IntegerValueType(2), i = IntegerValueType(2), l = IntegerValueType(2), s = IntegerValueType(2))
@@ -10,4 +10,4 @@ annotation class Ann(
Ann(1.plus(1), 1.minus(1), 1.times(1), 1.div(1), 1.mod(1)) class MyClass
// EXPECTED: Ann(p1 = IntegerValueType(2): IntegerValueType(2), p2 = IntegerValueType(0): IntegerValueType(0), p3 = IntegerValueType(1): IntegerValueType(1), p4 = IntegerValueType(1): IntegerValueType(1), p5 = IntegerValueType(0): IntegerValueType(0))
// EXPECTED: Ann(p1 = IntegerValueType(2), p2 = IntegerValueType(0), p3 = IntegerValueType(1), p4 = IntegerValueType(1), p5 = IntegerValueType(0))
@@ -4,4 +4,4 @@ annotation class Ann(val s1: String)
Ann(s1 = "a" + 1) class MyClass
// EXPECTED: Ann(s1 = "a1": String)
// EXPECTED: Ann(s1 = "a1")
@@ -16,4 +16,4 @@ Ann(
s4 = "a${i}a$i"
) class MyClass
// EXPECTED: Ann(s1 = "a1": String, s2 = "a1 b": String, s3 = "1": String, s4 = "a1a1": String)
// EXPECTED: Ann(s1 = "a1", s2 = "a1 b", s3 = "1", s4 = "a1a1")
@@ -6,4 +6,4 @@ val i = 1
Ann(s1 = "a" + "b", s2 = "a" + "a$i") class MyClass
// EXPECTED: Ann(s1 = "ab": String, s2 = "aa1": String)
// EXPECTED: Ann(s1 = "ab", s2 = "aa1")
@@ -12,4 +12,4 @@ annotation class Ann(
Ann(-1, -1, -1, -1, -1.0, -1.0.toFloat(), -'c') class MyClass
// EXPECTED: Ann(b1 = IntegerValueType(-1): IntegerValueType(-1), b2 = IntegerValueType(-1): IntegerValueType(-1), b3 = IntegerValueType(-1): IntegerValueType(-1), b4 = IntegerValueType(-1): IntegerValueType(-1), b5 = -1.0.toDouble(): Double, b6 = -1.0.toFloat(): Float, b7 = IntegerValueType(-99): IntegerValueType(-99))
// EXPECTED: Ann(b1 = IntegerValueType(-1), b2 = IntegerValueType(-1), b3 = IntegerValueType(-1), b4 = IntegerValueType(-1), b5 = -1.0.toDouble(), b6 = -1.0.toFloat(), b7 = IntegerValueType(-99))
@@ -12,4 +12,4 @@ annotation class Ann(
Ann(+1, +1, +1, +1, +1.0, +1.0.toFloat(), +'c') class MyClass
// EXPECTED: Ann(b1 = IntegerValueType(1): IntegerValueType(1), b2 = IntegerValueType(1): IntegerValueType(1), b3 = IntegerValueType(1): IntegerValueType(1), b4 = IntegerValueType(1): IntegerValueType(1), b5 = 1.0.toDouble(): Double, b6 = 1.0.toFloat(): Float, b7 = IntegerValueType(99): IntegerValueType(99))
// EXPECTED: Ann(b1 = IntegerValueType(1), b2 = IntegerValueType(1), b3 = IntegerValueType(1), b4 = IntegerValueType(1), b5 = 1.0.toDouble(), b6 = 1.0.toFloat(), b7 = IntegerValueType(99))
+1 -1
View File
@@ -7,4 +7,4 @@ annotation class Ann(
Ann(1.toFloat(), 1.0.toFloat()) class MyClass
// EXPECTED: Ann(b1 = 1.0.toFloat(): Float, b2 = 1.0.toFloat(): Float)
// EXPECTED: Ann(b1 = 1.0.toFloat(), b2 = 1.0.toFloat())
+1 -1
View File
@@ -9,4 +9,4 @@ annotation class Ann(
Ann(1, 1.toInt(), 2147483648.toInt(), 2147483648) class MyClass
// EXPECTED: Ann(b1 = IntegerValueType(1): IntegerValueType(1), b2 = 1: Int, b3 = -2147483648: Int, b4 = IntegerValueType(2147483648): IntegerValueType(2147483648))
// EXPECTED: Ann(b1 = IntegerValueType(1), b2 = 1, b3 = -2147483648, b4 = IntegerValueType(2147483648))
+1 -1
View File
@@ -7,4 +7,4 @@ annotation class Ann(
Ann(1, 1.toLong()) class MyClass
// EXPECTED: Ann(b1 = IntegerValueType(1): IntegerValueType(1), b2 = 1.toLong(): Long)
// EXPECTED: Ann(b1 = IntegerValueType(1), b2 = 1.toLong())
+1 -1
View File
@@ -9,4 +9,4 @@ annotation class Ann(
Ann(1, 1.toShort(), 32768.toShort(), 32768) class MyClass
// EXPECTED: Ann(b1 = IntegerValueType(1): IntegerValueType(1), b2 = 1.toShort(): Short, b3 = -32768.toShort(): Short, b4 = IntegerValueType(32768): IntegerValueType(32768))
// EXPECTED: Ann(b1 = IntegerValueType(1), b2 = 1.toShort(), b3 = -32768.toShort(), b4 = IntegerValueType(32768))