[Spec tests] Remove spec info from fir tests
This commit is contained in:
-10
@@ -1,13 +1,3 @@
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
|
||||
*
|
||||
* SPEC VERSION: 0.1-100
|
||||
* MAIN LINK: expressions, constant-literals, boolean-literals -> paragraph 1 -> sentence 3
|
||||
* NUMBER: 1
|
||||
* DESCRIPTION: Checking of type for Boolean values
|
||||
* HELPERS: checkType
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1() {
|
||||
true checkType { <!INAPPLICABLE_CANDIDATE!>check<!><Boolean?>() }
|
||||
|
||||
-14
@@ -2,20 +2,6 @@
|
||||
// !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 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 = <!ILLEGAL_CONST_EXPRESSION!>''<!>
|
||||
|
||||
-12
@@ -2,18 +2,6 @@
|
||||
// !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() {
|
||||
|
||||
-9
@@ -1,12 +1,3 @@
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
|
||||
*
|
||||
* SPEC VERSION: 0.1-100
|
||||
* MAIN LINK: expressions, constant-literals, integer-literals, binary-integer-literals -> paragraph 1 -> sentence 1
|
||||
* NUMBER: 1
|
||||
* DESCRIPTION: Binary integer literals with the prefix only.
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
val value_1 = <!ILLEGAL_CONST_EXPRESSION!>0b<!>
|
||||
|
||||
|
||||
-9
@@ -1,12 +1,3 @@
|
||||
/*
|
||||
* 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 = 0b_1110100000
|
||||
|
||||
|
||||
-9
@@ -1,12 +1,3 @@
|
||||
/*
|
||||
* 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 = 0b0_1_1_0_1_1_____
|
||||
|
||||
|
||||
-9
@@ -1,12 +1,3 @@
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
|
||||
*
|
||||
* SPEC VERSION: 0.1-100
|
||||
* MAIN LINK: expressions, constant-literals, integer-literals, hexadecimal-integer-literals -> paragraph 1 -> sentence 1
|
||||
* NUMBER: 1
|
||||
* DESCRIPTION: Hexadecimal integer literals with the prefix only.
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
val value_1 = <!ILLEGAL_CONST_EXPRESSION!>0x<!>
|
||||
|
||||
|
||||
-9
@@ -1,12 +1,3 @@
|
||||
/*
|
||||
* 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 = 0x_1234567890
|
||||
|
||||
|
||||
-9
@@ -1,12 +1,3 @@
|
||||
/*
|
||||
* 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 = 0x3_4_5_6_7_8_____
|
||||
|
||||
|
||||
-9
@@ -1,12 +1,3 @@
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
|
||||
*
|
||||
* SPEC VERSION: 0.1-100
|
||||
* MAIN LINK: expressions, constant-literals, real-literals -> paragraph 1 -> sentence 1
|
||||
* NUMBER: 1
|
||||
* DESCRIPTION: Real literals separeted by comments.
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
val value_1 = 0./**/99901
|
||||
|
||||
|
||||
-9
@@ -1,12 +1,3 @@
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
|
||||
*
|
||||
* SPEC VERSION: 0.1-100
|
||||
* MAIN LINK: expressions, constant-literals, real-literals -> paragraph 1 -> sentence 3
|
||||
* NUMBER: 1
|
||||
* DESCRIPTION: Real literals suffixed by f/F (float suffix) separeted by comments.
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
val value_1 = 0./**/99901f
|
||||
|
||||
|
||||
-9
@@ -1,12 +1,3 @@
|
||||
/*
|
||||
* 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
|
||||
|
||||
|
||||
-9
@@ -1,12 +1,3 @@
|
||||
/*
|
||||
* 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
|
||||
|
||||
|
||||
-9
@@ -1,13 +1,4 @@
|
||||
// FIR_IGNORE
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
|
||||
*
|
||||
* SPEC VERSION: 0.1-100
|
||||
* MAIN LINK: expressions, constant-literals, real-literals -> paragraph 2 -> sentence 1
|
||||
* NUMBER: 1
|
||||
* DESCRIPTION: Real literals without digits after an exponent mark.
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
val value_1 = <!FLOAT_LITERAL_OUT_OF_RANGE!>0.0E<!>
|
||||
|
||||
|
||||
-9
@@ -1,12 +1,3 @@
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
|
||||
*
|
||||
* SPEC VERSION: 0.1-100
|
||||
* 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<!>
|
||||
|
||||
|
||||
-9
@@ -1,12 +1,3 @@
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
|
||||
*
|
||||
* SPEC VERSION: 0.1-100
|
||||
* 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<!>
|
||||
|
||||
|
||||
-9
@@ -1,13 +1,4 @@
|
||||
// FIR_IGNORE
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
|
||||
*
|
||||
* SPEC VERSION: 0.1-100
|
||||
* MAIN LINK: expressions, constant-literals, real-literals -> paragraph 2 -> sentence 1
|
||||
* NUMBER: 4
|
||||
* DESCRIPTION: Real literals suffixed by f/F (float suffix) with an exponent mark without digits after it.
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
val value_1 = <!FLOAT_LITERAL_OUT_OF_RANGE!>0.0EF<!>
|
||||
|
||||
|
||||
-9
@@ -1,12 +1,3 @@
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SPEC VERSION: 0.1-100
|
||||
* 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
|
||||
|
||||
|
||||
-9
@@ -1,12 +1,3 @@
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SPEC VERSION: 0.1-100
|
||||
* 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
|
||||
|
||||
|
||||
-9
@@ -1,13 +1,4 @@
|
||||
// FIR_IGNORE
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
|
||||
*
|
||||
* SPEC VERSION: 0.1-100
|
||||
* MAIN LINK: expressions, constant-literals, real-literals -> paragraph 3 -> sentence 1
|
||||
* NUMBER: 1
|
||||
* DESCRIPTION: Real literals with omitted a whole-number part and an exponent mark without digits after it.
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
val value_1 = <!FLOAT_LITERAL_OUT_OF_RANGE!>.0E<!>
|
||||
|
||||
|
||||
-9
@@ -1,13 +1,4 @@
|
||||
// FIR_IGNORE
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
|
||||
*
|
||||
* 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, suffixed by f/F (float suffix) followed by an exponent mark without digits.
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
val value_1 = <!FLOAT_LITERAL_OUT_OF_RANGE!>.0EF<!>
|
||||
|
||||
|
||||
-9
@@ -1,13 +1,4 @@
|
||||
// FIR_IGNORE
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
|
||||
*
|
||||
* SPEC VERSION: 0.1-100
|
||||
* MAIN LINK: expressions, constant-literals, real-literals -> paragraph 3 -> sentence 2
|
||||
* NUMBER: 1
|
||||
* DESCRIPTION: Real literals with omitted a fraction part and an exponent mark without digits after it.
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
val value_1 = <!FLOAT_LITERAL_OUT_OF_RANGE!>0e<!>
|
||||
|
||||
|
||||
-9
@@ -1,12 +1,3 @@
|
||||
/*
|
||||
* 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
|
||||
|
||||
|
||||
-9
@@ -1,12 +1,3 @@
|
||||
/*
|
||||
* 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
|
||||
|
||||
|
||||
-9
@@ -1,12 +1,3 @@
|
||||
/*
|
||||
* 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
|
||||
|
||||
|
||||
-9
@@ -1,12 +1,3 @@
|
||||
/*
|
||||
* 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
|
||||
|
||||
|
||||
-9
@@ -1,12 +1,3 @@
|
||||
/*
|
||||
* 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
|
||||
|
||||
|
||||
-9
@@ -1,12 +1,3 @@
|
||||
/*
|
||||
* 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
|
||||
|
||||
|
||||
-9
@@ -1,13 +1,4 @@
|
||||
// FIR_IGNORE
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE)
|
||||
*
|
||||
* SPEC VERSION: 0.1-100
|
||||
* MAIN LINK: expressions, constant-literals, real-literals -> paragraph 4 -> sentence 1
|
||||
* NUMBER: 1
|
||||
* DESCRIPTION: Real literals without digits after an exponent mark and with undescores in the different pisitions.
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
val value_1 = <!FLOAT_LITERAL_OUT_OF_RANGE!>.0_0e-<!>
|
||||
|
||||
|
||||
-9
@@ -1,12 +1,3 @@
|
||||
/*
|
||||
* 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= .0_0e-0___
|
||||
|
||||
|
||||
-9
@@ -1,12 +1,3 @@
|
||||
/*
|
||||
* 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 = 0_E0
|
||||
|
||||
|
||||
-9
@@ -1,13 +1,4 @@
|
||||
// FIR_IGNORE
|
||||
/*
|
||||
* 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<!>
|
||||
|
||||
|
||||
-9
@@ -1,13 +1,4 @@
|
||||
// FIR_IGNORE
|
||||
/*
|
||||
* 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<!>
|
||||
|
||||
|
||||
-9
@@ -1,12 +1,3 @@
|
||||
/*
|
||||
* 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
|
||||
|
||||
|
||||
-9
@@ -1,12 +1,3 @@
|
||||
/*
|
||||
* 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
|
||||
|
||||
|
||||
-9
@@ -1,12 +1,3 @@
|
||||
/*
|
||||
* 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
|
||||
|
||||
|
||||
-9
@@ -1,12 +1,3 @@
|
||||
/*
|
||||
* 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
|
||||
|
||||
|
||||
-9
@@ -1,12 +1,3 @@
|
||||
/*
|
||||
* 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
|
||||
|
||||
|
||||
-10
@@ -1,13 +1,3 @@
|
||||
/*
|
||||
* 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>() }
|
||||
|
||||
|
||||
-10
@@ -1,13 +1,3 @@
|
||||
/*
|
||||
* 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>() }
|
||||
|
||||
|
||||
-10
@@ -1,13 +1,3 @@
|
||||
/*
|
||||
* 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>() }
|
||||
|
||||
|
||||
-10
@@ -1,13 +1,3 @@
|
||||
/*
|
||||
* 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>() }
|
||||
|
||||
|
||||
-10
@@ -1,13 +1,3 @@
|
||||
/*
|
||||
* 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>() }
|
||||
|
||||
|
||||
-9
@@ -1,12 +1,3 @@
|
||||
/*
|
||||
* 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 = <!ILLEGAL_CONST_EXPRESSION!>0bl<!>
|
||||
|
||||
|
||||
-9
@@ -1,12 +1,3 @@
|
||||
/*
|
||||
* 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 = 0b0_l
|
||||
|
||||
|
||||
-9
@@ -1,12 +1,3 @@
|
||||
/*
|
||||
* 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: 3
|
||||
* DESCRIPTION: Various integer literals with not allowed long literal mark in lower case.
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
val value_1 = 0l
|
||||
|
||||
|
||||
-10
@@ -1,15 +1,5 @@
|
||||
// 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() {
|
||||
0l checkType { check<Long>() }
|
||||
|
||||
-10
@@ -1,15 +1,5 @@
|
||||
// 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 { <!INAPPLICABLE_CANDIDATE!>check<!><Short>() }
|
||||
|
||||
-10
@@ -1,15 +1,5 @@
|
||||
// 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 { <!INAPPLICABLE_CANDIDATE!>check<!><Byte>() }
|
||||
|
||||
-10
@@ -1,15 +1,5 @@
|
||||
// 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() {
|
||||
<!INAPPLICABLE_CANDIDATE!>checkSubtype<!><Long>(<!AMBIGUITY!>-<!><!ILLEGAL_CONST_EXPRESSION!>9223372036854775808L<!>)
|
||||
|
||||
-10
@@ -1,15 +1,5 @@
|
||||
// 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: functions.kt
|
||||
|
||||
package functions
|
||||
|
||||
-10
@@ -1,15 +1,5 @@
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SPEC VERSION: 0.1-100
|
||||
* MAIN LINK: expressions, constant-literals, the-types-for-integer-literals -> paragraph 1 -> sentence 2
|
||||
* NUMBER: 2
|
||||
* DESCRIPTION: Type checking of decimal integer literals.
|
||||
* HELPERS: checkType
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1() {
|
||||
0 checkType { check<Int>() }
|
||||
|
||||
-10
@@ -1,15 +1,5 @@
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SPEC VERSION: 0.1-100
|
||||
* MAIN LINK: expressions, constant-literals, the-types-for-integer-literals -> paragraph 1 -> sentence 2
|
||||
* NUMBER: 3
|
||||
* DESCRIPTION: Type checking of hexadecimal integer literals.
|
||||
* HELPERS: checkType
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1() {
|
||||
0x0 checkType { check<Int>() }
|
||||
|
||||
-10
@@ -1,15 +1,5 @@
|
||||
// SKIP_TXT
|
||||
|
||||
/*
|
||||
* KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE)
|
||||
*
|
||||
* SPEC VERSION: 0.1-100
|
||||
* MAIN LINK: expressions, constant-literals, the-types-for-integer-literals -> paragraph 1 -> sentence 2
|
||||
* NUMBER: 4
|
||||
* DESCRIPTION: Type checking of binary integer literals.
|
||||
* HELPERS: checkType
|
||||
*/
|
||||
|
||||
// TESTCASE NUMBER: 1
|
||||
fun case_1() {
|
||||
0b0 checkType { check<Int>() }
|
||||
|
||||
Reference in New Issue
Block a user