[FIR] Fix TEST SPEC tests

Ensure the test data contents for both the frontends
are identical. This is needed for proper analysis of
K2-differences.
This commit is contained in:
Nikolay Lunyak
2023-06-12 15:20:46 +03:00
committed by Space Team
parent e6633d3d92
commit 7541732752
583 changed files with 4053 additions and 5418 deletions
@@ -1,11 +0,0 @@
// TESTCASE NUMBER: 1
fun case_1() {
true checkType { <!NONE_APPLICABLE!>check<!><Boolean?>() }
false checkType { <!NONE_APPLICABLE!>check<!><Boolean?>() }
true checkType { <!NONE_APPLICABLE!>check<!><Any?>() }
false checkType { <!NONE_APPLICABLE!>check<!><Any>() }
true checkType { <!NONE_APPLICABLE!>check<!><Nothing?>() }
false checkType { <!NONE_APPLICABLE!>check<!><Nothing>() }
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
/*
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
@@ -1,6 +1,20 @@
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
// SKIP_TXT
/*
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-435
* MAIN LINK: expressions, constant-literals, character-literals -> paragraph 1 -> sentence 1
* PRIMARY LINKS: expressions, constant-literals, character-literals -> paragraph 1 -> sentence 2
* expressions, constant-literals, character-literals -> paragraph 2 -> sentence 1
* expressions, constant-literals, character-literals -> paragraph 2 -> sentence 2
* expressions, constant-literals, character-literals -> paragraph 4 -> sentence 1
* NUMBER: 1
* DESCRIPTION: A character literal defines a constant holding a unicode character value
* HELPERS: checkType
*/
// TESTCASE NUMBER: 1
fun case1() {
val c = <!EMPTY_CHARACTER_LITERAL!>''<!>
@@ -1,6 +1,18 @@
// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER -UNUSED_EXPRESSION
// SKIP_TXT
/*
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-218
* MAIN LINK: expressions, constant-literals, character-literals -> paragraph 4 -> sentence 1
* PRIMARY LINKS: expressions, constant-literals, character-literals -> paragraph 5 -> sentence 1
* NUMBER: 1
* DESCRIPTION: to define a character the unicode codepoint escaped symbol \u could be used with followed by exactly four hexadecimal digits.
* HELPERS: checkType
*/
// TESTCASE NUMBER: 1
fun case1() {
@@ -1,3 +1,12 @@
/*
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-100
* MAIN LINK: expressions, constant-literals, integer-literals, binary-integer-literals -> paragraph 1 -> sentence 2
* NUMBER: 1
* DESCRIPTION: Binary integer literals with an underscore after the prefix.
*/
// TESTCASE NUMBER: 1
val value_1 = <!ILLEGAL_UNDERSCORE!>0b_1110100000<!>
@@ -1,3 +1,12 @@
/*
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-100
* MAIN LINK: expressions, constant-literals, integer-literals, binary-integer-literals -> paragraph 1 -> sentence 2
* NUMBER: 3
* DESCRIPTION: Binary integer literals with an underscore in the last position.
*/
// TESTCASE NUMBER: 1
val value_1 = <!ILLEGAL_UNDERSCORE!>0b0_1_1_0_1_1_____<!>
@@ -1,4 +1,3 @@
// FIR_IDENTICAL
/*
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
@@ -1,4 +1,3 @@
// FIR_IDENTICAL
/*
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
@@ -1,4 +1,3 @@
// FIR_IDENTICAL
/*
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
@@ -1,3 +1,12 @@
/*
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-100
* MAIN LINK: expressions, constant-literals, integer-literals, hexadecimal-integer-literals -> paragraph 1 -> sentence 2
* NUMBER: 1
* DESCRIPTION: Hexadecimal integer literals with an underscore after the prefix.
*/
// TESTCASE NUMBER: 1
val value_1 = <!ILLEGAL_UNDERSCORE!>0x_1234567890<!>
@@ -1,3 +1,12 @@
/*
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-100
* MAIN LINK: expressions, constant-literals, integer-literals, hexadecimal-integer-literals -> paragraph 1 -> sentence 2
* NUMBER: 4
* DESCRIPTION: Hexadecimal integer literals with an underscore in the last position.
*/
// TESTCASE NUMBER: 1
val value_1 = <!ILLEGAL_UNDERSCORE!>0x3_4_5_6_7_8_____<!>
@@ -1,3 +1,12 @@
/*
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-100
* MAIN LINK: expressions, constant-literals, real-literals -> paragraph 1 -> sentence 1
* NUMBER: 2
* DESCRIPTION: Real literals with a many digits in a whole-number part and a fraction part (including conforms).
*/
// TESTCASE NUMBER: 1
val value_1 = 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
@@ -1,3 +1,12 @@
/*
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-100
* MAIN LINK: expressions, constant-literals, real-literals -> paragraph 1 -> sentence 3
* NUMBER: 2
* DESCRIPTION: Real literals suffixed by f/F (the float suffix) with a many digits in a whole-number part and a fraction part (including conforms).
*/
// TESTCASE NUMBER: 1
val value_1 = 0.000000000000000000000000000000000000000000001f
@@ -1,3 +1,12 @@
/*
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-435
* MAIN LINK: expressions, constant-literals, real-literals -> paragraph 2 -> sentence 1
* NUMBER: 2
* DESCRIPTION: Real literals with a not allowed exponent mark at the beginning.
*/
// TESTCASE NUMBER: 1
val value_1 = <!UNRESOLVED_REFERENCE!>E0<!>
@@ -1,3 +1,12 @@
/*
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-435
* MAIN LINK: expressions, constant-literals, real-literals -> paragraph 2 -> sentence 1
* NUMBER: 3
* DESCRIPTION: Real literals suffixed by f/F (float suffix) with a not allowed exponent mark at the beginning.
*/
// TESTCASE NUMBER: 1
val value_1 = <!UNRESOLVED_REFERENCE!>E0f<!>
@@ -1,3 +1,12 @@
/*
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-435
* MAIN LINK: expressions, constant-literals, real-literals -> paragraph 2 -> sentence 1
* NUMBER: 1
* DESCRIPTION: Simple real literals with an exponent mark.
*/
// TESTCASE NUMBER: 1
val value_1 = 0.0e0
@@ -1,3 +1,12 @@
/*
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-435
* MAIN LINK: expressions, constant-literals, real-literals -> paragraph 2 -> sentence 1
* NUMBER: 2
* DESCRIPTION: Real literals suffixed by f/F (float suffix) with an exponent mark.
*/
// TESTCASE NUMBER: 1
val value_1 = 0.0e0f
@@ -1,3 +1,12 @@
/*
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-100
* MAIN LINK: expressions, constant-literals, real-literals -> paragraph 3 -> sentence 1
* NUMBER: 1
* DESCRIPTION: Simple real literals with omitted a whole-number part.
*/
// TESTCASE NUMBER: 1
val value_1 = .0
@@ -1,3 +1,12 @@
/*
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-100
* MAIN LINK: expressions, constant-literals, real-literals -> paragraph 3 -> sentence 1
* NUMBER: 2
* DESCRIPTION: Real literals with omitted a whole-number part and an exponent mark.
*/
// TESTCASE NUMBER: 1
val value_1 = .0e0
@@ -1,3 +1,12 @@
/*
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-100
* MAIN LINK: expressions, constant-literals, real-literals -> paragraph 3 -> sentence 1
* NUMBER: 5
* DESCRIPTION: Real literals suffixed by f/F (float suffix) with omitted a whole-number part and an exponent mark.
*/
// TESTCASE NUMBER: 1
val value_1 = .0e0f
@@ -1,3 +1,12 @@
/*
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-100
* MAIN LINK: expressions, constant-literals, real-literals -> paragraph 3 -> sentence 2
* NUMBER: 1
* DESCRIPTION: Simple real literals with omitted a fraction part, suffixed by f/F (float suffix).
*/
// TESTCASE NUMBER: 1
val value_1 = 0F
@@ -1,3 +1,12 @@
/*
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-100
* MAIN LINK: expressions, constant-literals, real-literals -> paragraph 3 -> sentence 2
* NUMBER: 2
* DESCRIPTION: Real literals with omitted a fraction part and an exponent mark.
*/
// TESTCASE NUMBER: 1
val value_1 = 0e0
@@ -1,3 +1,12 @@
/*
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-100
* MAIN LINK: expressions, constant-literals, real-literals -> paragraph 3 -> sentence 2
* NUMBER: 3
* DESCRIPTION: Real literals with omitted a fraction part and an exponent mark, suffixed by f/F (float suffix).
*/
// TESTCASE NUMBER: 1
val value_1 = 0e0f
@@ -1,3 +1,12 @@
/*
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-100
* MAIN LINK: expressions, constant-literals, real-literals -> paragraph 4 -> sentence 1
* NUMBER: 2
* DESCRIPTION: Real literals with underscores at the end.
*/
// TESTCASE NUMBER: 1
val value_1= <!ILLEGAL_UNDERSCORE!>.0_0e-0___<!>
@@ -1,3 +1,12 @@
/*
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-100
* MAIN LINK: expressions, constant-literals, real-literals -> paragraph 4 -> sentence 2
* NUMBER: 1
* DESCRIPTION: Real literals with underscores before an exponent mark.
*/
// TESTCASE NUMBER: 1
val value_1 = <!ILLEGAL_UNDERSCORE!>0_E0<!>
@@ -1,3 +1,12 @@
/*
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-100
* MAIN LINK: expressions, constant-literals, real-literals -> paragraph 4 -> sentence 2
* NUMBER: 2
* DESCRIPTION: Real literals with underscores after an exponent mark.
*/
// TESTCASE NUMBER: 1
val value_1 = <!ILLEGAL_UNDERSCORE!>0e___0<!>
@@ -1,3 +1,12 @@
/*
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-100
* MAIN LINK: expressions, constant-literals, real-literals -> paragraph 4 -> sentence 2
* NUMBER: 3
* DESCRIPTION: Real literals with underscores around an exponent mark.
*/
// TESTCASE NUMBER: 1
val value_1 = <!ILLEGAL_UNDERSCORE!>.0__e_0<!>
@@ -1,3 +1,12 @@
/*
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-100
* MAIN LINK: expressions, constant-literals, real-literals -> paragraph 4 -> sentence 1
* NUMBER: 1
* DESCRIPTION: Real literals with underscores in a whole-number part and a fraction part.
*/
// TESTCASE NUMBER: 1
val value_1 = 0.0_0
@@ -1,3 +1,12 @@
/*
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-100
* MAIN LINK: expressions, constant-literals, real-literals -> paragraph 4 -> sentence 1
* NUMBER: 2
* DESCRIPTION: Real literals suffixed by f/F (float suffix) with underscores in a whole-number part and a fraction part.
*/
// TESTCASE NUMBER: 1
val value_1 = 0.0_0f
@@ -1,3 +1,12 @@
/*
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-100
* MAIN LINK: expressions, constant-literals, real-literals -> paragraph 4 -> sentence 1
* NUMBER: 3
* DESCRIPTION: Real literals suffixed by f/F (float suffix) with an exponent mark and underscores in a whole-number part, a fraction part and an exponent part.
*/
// TESTCASE NUMBER: 1
val value_1 = 0.0_0e1_0f
@@ -1,3 +1,12 @@
/*
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-100
* MAIN LINK: expressions, constant-literals, real-literals -> paragraph 4 -> sentence 1
* NUMBER: 4
* DESCRIPTION: Real literals with an omitted whole-number part and underscores in a whole-number part, a fraction part and an exponent part.
*/
// TESTCASE NUMBER: 1
val value_1 = .0_0
@@ -1,3 +1,12 @@
/*
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-100
* MAIN LINK: expressions, constant-literals, real-literals -> paragraph 4 -> sentence 1
* NUMBER: 5
* DESCRIPTION: Real literals with an omitted fraction part and underscores in a whole-number part, a fraction part and an exponent part.
*/
// TESTCASE NUMBER: 1
val value_1 = 0_0F
@@ -1,3 +1,13 @@
/*
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-100
* MAIN LINK: expressions, constant-literals, real-literals -> paragraph 5 -> sentence 1
* NUMBER: 1
* DESCRIPTION: A type checking of a simple real literal (with/without underscores).
* HELPERS: checkType
*/
// TESTCASE NUMBER: 1
val value_1 = 0.1 checkType { check<Double>() }
@@ -1,3 +1,13 @@
/*
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-100
* MAIN LINK: expressions, constant-literals, real-literals -> paragraph 5 -> sentence 1
* NUMBER: 2
* DESCRIPTION: A type checking of a real literal with an exponent mark.
* HELPERS: checkType
*/
// TESTCASE NUMBER: 1
val value_1 = 0.0e0 checkType { check<Double>() }
@@ -1,3 +1,13 @@
/*
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-100
* MAIN LINK: expressions, constant-literals, real-literals -> paragraph 5 -> sentence 1
* NUMBER: 3
* DESCRIPTION: A type checking of a real literal with omitted a whole-number part.
* HELPERS: checkType
*/
// TESTCASE NUMBER: 1
val value_1 = .0 checkType { check<Double>() }
@@ -1,3 +1,13 @@
/*
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-100
* MAIN LINK: expressions, constant-literals, real-literals -> paragraph 5 -> sentence 1
* NUMBER: 4
* DESCRIPTION: A type checking of a real literal with omitted a whole-number part and an exponent mark.
* HELPERS: checkType
*/
// TESTCASE NUMBER: 1
val value_1 = .0e0 checkType { check<Double>() }
@@ -1,3 +1,13 @@
/*
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
*
* SPEC VERSION: 0.1-100
* MAIN LINK: expressions, constant-literals, real-literals -> paragraph 5 -> sentence 1
* NUMBER: 5
* DESCRIPTION: A type checking of a real literal with omitted a fraction part and an exponent mark.
* HELPERS: checkType
*/
// TESTCASE NUMBER: 1
val value_1 = 0e0 checkType { check<Double>() }
@@ -1,3 +1,12 @@
/*
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-100
* MAIN LINK: expressions, constant-literals, the-types-for-integer-literals -> paragraph 1 -> sentence 1
* NUMBER: 1
* DESCRIPTION: Binary and hexadecimal integer literals with a long literal mark only.
*/
// TESTCASE NUMBER: 1
val value_1 = <!INT_LITERAL_OUT_OF_RANGE!>0bl<!>
@@ -1,3 +1,12 @@
/*
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-100
* MAIN LINK: expressions, constant-literals, the-types-for-integer-literals -> paragraph 1 -> sentence 1
* NUMBER: 2
* DESCRIPTION: Various integer literals with a not allowed underscore before the long literal mark.
*/
// TESTCASE NUMBER: 1
val value_1 = <!ILLEGAL_UNDERSCORE!>0b0_l<!>
@@ -1,5 +1,15 @@
// SKIP_TXT
/*
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-100
* MAIN LINK: expressions, constant-literals, the-types-for-integer-literals -> paragraph 1 -> sentence 2
* NUMBER: 1
* DESCRIPTION: Various integer literals with not allowed long literal mark in lower case (type checking).
* HELPERS: checkType
*/
// TESTCASE NUMBER: 1
fun case_1() {
0<!WRONG_LONG_SUFFIX!>l<!> <!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>checkType<!> { check<Long>() }
@@ -1,5 +1,15 @@
// SKIP_TXT
/*
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-100
* MAIN LINK: expressions, constant-literals, the-types-for-integer-literals -> paragraph 1 -> sentence 2
* NUMBER: 2
* DESCRIPTION: Type checking (comparison with invalid types) of various integer literals with long literal mark.
* HELPERS: checkType
*/
// TESTCASE NUMBER: 1
fun case_1() {
0L checkType { <!NONE_APPLICABLE!>check<!><Short>() }
@@ -1,5 +1,15 @@
// SKIP_TXT
/*
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-100
* MAIN LINK: expressions, constant-literals, the-types-for-integer-literals -> paragraph 1 -> sentence 2
* NUMBER: 3
* DESCRIPTION: Type checking (comparison with invalid types) of various integer literals.
* HELPERS: checkType
*/
// TESTCASE NUMBER: 1
fun case_1() {
0 checkType { <!NONE_APPLICABLE!>check<!><Byte>() }
@@ -1,5 +1,15 @@
// SKIP_TXT
/*
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-100
* MAIN LINK: expressions, constant-literals, the-types-for-integer-literals -> paragraph 1 -> sentence 2
* NUMBER: 4
* DESCRIPTION: Type checking (comparison with invalid types) of too a big integers.
* HELPERS: checkType
*/
// TESTCASE NUMBER: 1
fun case_1() {
checkSubtype<Long>(<!OVERLOAD_RESOLUTION_AMBIGUITY!>-<!><!INT_LITERAL_OUT_OF_RANGE!>9223372036854775808L<!>)
@@ -1,5 +1,15 @@
// SKIP_TXT
/*
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
*
* SPEC VERSION: 0.1-100
* MAIN LINK: expressions, constant-literals, the-types-for-integer-literals -> paragraph 1 -> sentence 2
* NUMBER: 5
* DESCRIPTION: Check of integer type selection depends on the context (incopatible types).
* HELPERS: checkType
*/
// FILE: testFunctions.kt
package functions
@@ -1,82 +0,0 @@
// SKIP_TXT
// TESTCASE NUMBER: 1
fun case_1() {
0 checkType { check<Int>() }
checkSubtype<Int>(0)
checkSubtype<Short>(0)
checkSubtype<Byte>(0)
checkSubtype<Long>(0)
}
// TESTCASE NUMBER: 2
fun case_2() {
127 checkType { check<Int>() }
checkSubtype<Int>(127)
checkSubtype<Short>(127)
checkSubtype<Byte>(127)
checkSubtype<Long>(127)
128 checkType { check<Int>() }
checkSubtype<Int>(128)
checkSubtype<Short>(128)
checkSubtype<Long>(128)
-128 checkType { check<Int>() }
checkSubtype<Int>(-128)
checkSubtype<Short>(-128)
checkSubtype<Byte>(-128)
checkSubtype<Long>(-128)
-129 checkType { check<Int>() }
checkSubtype<Int>(-129)
checkSubtype<Short>(-129)
checkSubtype<Long>(-129)
}
// TESTCASE NUMBER: 3
fun case_3() {
32767 checkType { check<Int>() }
checkSubtype<Int>(32767)
checkSubtype<Short>(32767)
checkSubtype<Long>(32767)
32768 checkType { check<Int>() }
checkSubtype<Int>(32768)
checkSubtype<Long>(32768)
-32768 checkType { check<Int>() }
checkSubtype<Int>(-32768)
checkSubtype<Short>(-32768)
checkSubtype<Long>(-32768)
-32769 checkType { check<Int>() }
checkSubtype<Int>(-32769)
checkSubtype<Long>(-32769)
}
// TESTCASE NUMBER: 4
fun case_4() {
2147483647 checkType { check<Int>() }
checkSubtype<Int>(2147483647)
checkSubtype<Long>(2147483647)
2147483648 checkType { check<Long>() }
checkSubtype<Long>(2147483648)
-2147483648 checkType { check<Int>() }
checkSubtype<Int>(-2147483648)
checkSubtype<Long>(-2147483648)
-2147483649 checkType { check<Long>() }
checkSubtype<Long>(-2147483649)
}
// TESTCASE NUMBER: 5
fun case_5() {
9223372036854775807 checkType { check<Long>() }
checkSubtype<Long>(9223372036854775807)
-9223372036854775807 checkType { check<Long>() }
checkSubtype<Long>(-9223372036854775807)
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// SKIP_TXT
/*
@@ -1,82 +0,0 @@
// SKIP_TXT
// TESTCASE NUMBER: 1
fun case_1() {
0x0 checkType { check<Int>() }
checkSubtype<Int>(0x0)
checkSubtype<Short>(0x0)
checkSubtype<Byte>(0x0)
checkSubtype<Long>(0x0)
}
// TESTCASE NUMBER: 2
fun case_2() {
0x7F checkType { check<Int>() }
checkSubtype<Int>(0x7F)
checkSubtype<Short>(0x7F)
checkSubtype<Byte>(0x7F)
checkSubtype<Long>(0x7F)
0X80 checkType { check<Int>() }
checkSubtype<Int>(0X80)
checkSubtype<Short>(0X80)
checkSubtype<Long>(0X80)
-0X80 checkType { check<Int>() }
checkSubtype<Int>(-0X80)
checkSubtype<Short>(-0X80)
checkSubtype<Byte>(-0X80)
checkSubtype<Long>(-0X80)
-0x81 checkType { check<Int>() }
checkSubtype<Int>(-0x81)
checkSubtype<Short>(-0x81)
checkSubtype<Long>(-0x81)
}
// TESTCASE NUMBER: 3
fun case_3() {
0x7FFF checkType { check<Int>() }
checkSubtype<Int>(0x7FFF)
checkSubtype<Short>(0x7FFF)
checkSubtype<Long>(0x7FFF)
0x8000 checkType { check<Int>() }
checkSubtype<Int>(0x8000)
checkSubtype<Long>(0x8000)
-0x8000 checkType { check<Int>() }
checkSubtype<Int>(-0x8000)
checkSubtype<Short>(-0x8000)
checkSubtype<Long>(-0x8000)
-0X8001 checkType { check<Int>() }
checkSubtype<Int>(-0X8001)
checkSubtype<Long>(-0X8001)
}
// TESTCASE NUMBER: 4
fun case_4() {
0x7FFFFFFF checkType { check<Int>() }
checkSubtype<Int>(0x7FFFFFFF)
checkSubtype<Long>(0x7FFFFFFF)
0x80000000 checkType { check<Long>() }
checkSubtype<Long>(0x80000000)
-0x80000000 checkType { check<Int>() }
checkSubtype<Int>(-0x80000000)
checkSubtype<Long>(-0x80000000)
-0x80000001 checkType { check<Long>() }
checkSubtype<Long>(-0x80000001)
}
// TESTCASE NUMBER: 5
fun case_5() {
0X7FFFFFFFFFFFFFFF checkType { check<Long>() }
checkSubtype<Long>(0X7FFFFFFFFFFFFFFF)
-0X7FFFFFFFFFFFFFFF checkType { check<Long>() }
checkSubtype<Long>(-0X7FFFFFFFFFFFFFFF)
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// SKIP_TXT
/*
@@ -1,82 +0,0 @@
// SKIP_TXT
// TESTCASE NUMBER: 1
fun case_1() {
0b0 checkType { check<Int>() }
checkSubtype<Int>(0b0)
checkSubtype<Short>(0b0)
checkSubtype<Byte>(0b0)
checkSubtype<Long>(0b0)
}
// TESTCASE NUMBER: 2
fun case_2() {
0B1111111 checkType { check<Int>() }
checkSubtype<Int>(0B1111111)
checkSubtype<Short>(0B1111111)
checkSubtype<Byte>(0B1111111)
checkSubtype<Long>(0B1111111)
0b10000000 checkType { check<Int>() }
checkSubtype<Int>(0b10000000)
checkSubtype<Short>(0b10000000)
checkSubtype<Long>(0b10000000)
-0B10000000 checkType { check<Int>() }
checkSubtype<Int>(-0B10000000)
checkSubtype<Short>(-0B10000000)
checkSubtype<Byte>(-0B10000000)
checkSubtype<Long>(-0B10000000)
-0b10000001 checkType { check<Int>() }
checkSubtype<Int>(-0b10000001)
checkSubtype<Short>(-0b10000001)
checkSubtype<Long>(-0b10000001)
}
// TESTCASE NUMBER: 3
fun case_3() {
0B111111111111111 checkType { check<Int>() }
checkSubtype<Int>(0B111111111111111)
checkSubtype<Short>(0B111111111111111)
checkSubtype<Long>(0B111111111111111)
0b1000000000000000 checkType { check<Int>() }
checkSubtype<Int>(0b1000000000000000)
checkSubtype<Long>(0b1000000000000000)
-0b1000000000000000 checkType { check<Int>() }
checkSubtype<Int>(-0b1000000000000000)
checkSubtype<Short>(-0b1000000000000000)
checkSubtype<Long>(-0b1000000000000000)
-0B1000000000000001 checkType { check<Int>() }
checkSubtype<Int>(-0B1000000000000001)
checkSubtype<Long>(-0B1000000000000001)
}
// TESTCASE NUMBER: 4
fun case_4() {
0b1111111111111111111111111111111 checkType { check<Int>() }
checkSubtype<Int>(0b1111111111111111111111111111111)
checkSubtype<Long>(0b1111111111111111111111111111111)
0B10000000000000000000000000000000 checkType { check<Long>() }
checkSubtype<Long>(0B10000000000000000000000000000000)
-0B10000000000000000000000000000000 checkType { check<Int>() }
checkSubtype<Int>(-0B10000000000000000000000000000000)
checkSubtype<Long>(-0B10000000000000000000000000000000)
-0b10000000000000000000000000000001 checkType { check<Long>() }
checkSubtype<Long>(-0b10000000000000000000000000000001)
}
// TESTCASE NUMBER: 5
fun case_5() {
0b111111111111111111111111111111111111111111111111111111111111111 checkType { check<Long>() }
checkSubtype<Long>(0b111111111111111111111111111111111111111111111111111111111111111)
-0B111111111111111111111111111111111111111111111111111111111111111 checkType { check<Long>() }
checkSubtype<Long>(-0B111111111111111111111111111111111111111111111111111111111111111)
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// SKIP_TXT
/*