From cf692fb257370ceaf4c3d89053aee66aff726cd1 Mon Sep 17 00:00:00 2001 From: "victor.petukhov" Date: Mon, 19 Aug 2019 11:26:12 +0300 Subject: [PATCH] Implement tests map generator and refactor folder structure to spec tests linking --- .../type-system/introduction/p-5/pos/2.1.kt | 32 + .../testData/diagnostics/helpers/checkType.kt | 5 + .../testData/diagnostics/helpers/classes.kt | 16 +- .../testData/diagnostics/helpers/functions.kt | 4 +- .../diagnostics/helpers/sealedClasses.kt | 2 +- .../boolean-literals/p-1/neg/3.1.kt | 23 - .../boolean-literals/p-1/neg/3.1.txt | 3 - .../boolean-literals/p-1/pos/3.1.kt | 20 - .../boolean-literals/p-1/pos/3.1.txt | 3 - .../boolean-literals/p-1/pos/3.2.kt | 20 - .../boolean-literals/p-1/pos/3.2.txt | 3 - .../long-integer-literals/p-1/neg/2.1.kt | 21 - .../long-integer-literals/p-1/neg/2.3.kt | 122 - .../long-integer-literals/p-1/pos/2.1.kt | 33 - .../real-literals/p-5/pos/1.1.txt | 16 - .../boolean-literals/p-1/neg/3.1.kt | 21 + .../boolean-literals/p-1/neg/3.1.txt | 13 + .../boolean-literals/p-1/pos/3.1.kt | 18 + .../boolean-literals/p-1/pos/3.1.txt | 13 + .../boolean-literals/p-1/pos/3.2.kt | 18 + .../boolean-literals/p-1/pos/3.2.txt | 13 + .../boolean-literals/testsMap.txt | 13 + .../binary-integer-literals/p-1/neg/1.1.kt | 2 +- .../binary-integer-literals/p-1/neg/1.1.txt | 0 .../binary-integer-literals/p-1/neg/2.1.kt | 2 +- .../binary-integer-literals/p-1/neg/2.1.txt | 0 .../binary-integer-literals/p-1/neg/2.2.kt | 2 +- .../binary-integer-literals/p-1/neg/2.2.txt | 0 .../binary-integer-literals/p-1/neg/2.3.kt | 2 +- .../binary-integer-literals/p-1/neg/2.3.txt | 0 .../binary-integer-literals/testsMap.txt | 12 + .../decimal-integer-literals/p-1/neg/2.1.kt | 2 +- .../decimal-integer-literals/p-1/neg/2.1.txt | 0 .../decimal-integer-literals/p-1/neg/2.2.kt | 2 +- .../decimal-integer-literals/p-1/neg/2.2.txt | 0 .../decimal-integer-literals/testsMap.txt | 12 + .../p-1/neg/1.1.kt | 2 +- .../p-1/neg/1.1.txt | 0 .../p-1/neg/2.1.kt | 2 +- .../p-1/neg/2.1.txt | 0 .../p-1/neg/2.2.kt | 2 +- .../p-1/neg/2.2.txt | 0 .../p-1/neg/2.3.kt | 2 +- .../p-1/neg/2.3.txt | 0 .../hexadecimal-integer-literals/testsMap.txt | 12 + .../long-integer-literals/p-1/neg/1.1.kt | 2 +- .../long-integer-literals/p-1/neg/1.1.txt | 0 .../long-integer-literals/p-1/neg/1.2.kt | 2 +- .../long-integer-literals/p-1/neg/1.2.txt | 0 .../long-integer-literals/p-1/neg/1.3.kt | 2 +- .../long-integer-literals/p-1/neg/1.3.txt | 0 .../long-integer-literals/p-1/neg/2.1.kt | 21 + .../long-integer-literals/p-1/neg/2.2.kt | 16 +- .../long-integer-literals/p-1/neg/2.3.kt | 122 + .../long-integer-literals/p-1/neg/2.4.kt | 16 +- .../long-integer-literals/p-1/neg/2.5.kt | 4 +- .../long-integer-literals/p-1/pos/2.1.kt | 33 + .../long-integer-literals/p-1/pos/2.2.kt | 34 +- .../long-integer-literals/p-1/pos/2.3.kt | 34 +- .../long-integer-literals/p-1/pos/2.4.kt | 34 +- .../long-integer-literals/p-1/pos/2.5.kt | 4 +- .../long-integer-literals/testsMap.txt | 13 + .../real-literals/p-1/neg/1.1.kt | 2 +- .../real-literals/p-1/neg/1.1.txt | 0 .../real-literals/p-1/neg/3.1.kt | 2 +- .../real-literals/p-1/neg/3.1.txt | 0 .../real-literals/p-1/pos/1.1.kt | 2 +- .../real-literals/p-1/pos/1.1.txt | 0 .../real-literals/p-1/pos/1.2.kt | 2 +- .../real-literals/p-1/pos/1.2.txt | 0 .../real-literals/p-1/pos/3.1.kt | 2 +- .../real-literals/p-1/pos/3.1.txt | 0 .../real-literals/p-1/pos/3.2.kt | 2 +- .../real-literals/p-1/pos/3.2.txt | 0 .../real-literals/p-2/neg/1.1.kt | 2 +- .../real-literals/p-2/neg/1.1.txt | 0 .../real-literals/p-2/neg/1.2.kt | 2 +- .../real-literals/p-2/neg/1.2.txt | 0 .../real-literals/p-2/neg/1.3.kt | 2 +- .../real-literals/p-2/neg/1.3.txt | 0 .../real-literals/p-2/neg/1.4.kt | 2 +- .../real-literals/p-2/neg/1.4.txt | 0 .../real-literals/p-2/pos/1.1.kt | 2 +- .../real-literals/p-2/pos/1.1.txt | 0 .../real-literals/p-2/pos/1.2.kt | 2 +- .../real-literals/p-2/pos/1.2.txt | 0 .../real-literals/p-3/neg/1.1.kt | 2 +- .../real-literals/p-3/neg/1.1.txt | 0 .../real-literals/p-3/neg/1.2.kt | 2 +- .../real-literals/p-3/neg/1.2.txt | 0 .../real-literals/p-3/neg/2.1.kt | 2 +- .../real-literals/p-3/neg/2.1.txt | 0 .../real-literals/p-3/pos/1.1.kt | 2 +- .../real-literals/p-3/pos/1.1.txt | 0 .../real-literals/p-3/pos/1.2.kt | 2 +- .../real-literals/p-3/pos/1.2.txt | 0 .../real-literals/p-3/pos/1.3.kt | 2 +- .../real-literals/p-3/pos/1.3.txt | 0 .../real-literals/p-3/pos/1.4.kt | 2 +- .../real-literals/p-3/pos/1.4.txt | 0 .../real-literals/p-3/pos/1.5.kt | 2 +- .../real-literals/p-3/pos/1.5.txt | 0 .../real-literals/p-3/pos/2.1.kt | 2 +- .../real-literals/p-3/pos/2.1.txt | 0 .../real-literals/p-3/pos/2.2.kt | 2 +- .../real-literals/p-3/pos/2.2.txt | 0 .../real-literals/p-3/pos/2.3.kt | 2 +- .../real-literals/p-3/pos/2.3.txt | 0 .../real-literals/p-4/neg/1.1.kt | 2 +- .../real-literals/p-4/neg/1.1.txt | 0 .../real-literals/p-4/neg/1.2.kt | 2 +- .../real-literals/p-4/neg/1.2.txt | 0 .../real-literals/p-4/neg/2.1.kt | 2 +- .../real-literals/p-4/neg/2.1.txt | 0 .../real-literals/p-4/neg/2.2.kt | 2 +- .../real-literals/p-4/neg/2.2.txt | 0 .../real-literals/p-4/neg/2.3.kt | 2 +- .../real-literals/p-4/neg/2.3.txt | 0 .../real-literals/p-4/pos/1.1.kt | 2 +- .../real-literals/p-4/pos/1.1.txt | 0 .../real-literals/p-4/pos/1.2.kt | 2 +- .../real-literals/p-4/pos/1.2.txt | 0 .../real-literals/p-4/pos/1.3.kt | 2 +- .../real-literals/p-4/pos/1.3.txt | 0 .../real-literals/p-4/pos/1.4.kt | 2 +- .../real-literals/p-4/pos/1.4.txt | 0 .../real-literals/p-4/pos/1.5.kt | 2 +- .../real-literals/p-4/pos/1.5.txt | 0 .../real-literals/p-5/pos/1.1.kt | 33 +- .../real-literals/p-5/pos/1.1.txt | 26 + .../real-literals/p-5/pos/1.2.kt | 83 +- .../real-literals/p-5/pos/1.2.txt | 10 + .../real-literals/p-5/pos/1.3.kt | 63 +- .../real-literals/p-5/pos/1.3.txt | 10 + .../real-literals/p-5/pos/1.4.kt | 65 +- .../real-literals/p-5/pos/1.4.txt | 10 + .../real-literals/p-5/pos/1.5.kt | 51 +- .../real-literals/p-5/pos/1.5.txt | 10 + .../real-literals/testsMap.txt | 24 + .../p-2}/neg/1.1.kt | 6 +- .../p-2}/neg/1.2.kt | 5 +- .../p-2}/neg/3.1.kt | 5 +- .../p-2}/neg/6.1.kt | 5 +- .../p-2}/neg/7.1.kt | 5 +- .../p-2}/neg/8.1.kt | 5 +- .../p-2}/neg/8.2.kt | 5 +- .../p-2}/neg/8.3.kt | 5 +- .../p-2}/pos/1.1.kt | 6 +- .../p-2}/pos/1.2.kt | 5 +- .../p-2}/pos/1.3.kt | 5 +- .../p-2}/pos/3.1.kt | 6 +- .../p-2}/pos/6.1.kt | 5 +- .../p-2}/pos/7.1.kt | 5 +- .../p-2}/pos/8.1.kt | 6 +- .../p-2}/pos/8.2.kt | 5 +- .../p-2}/pos/8.3.kt | 5 +- .../exhaustive-when-expressions/testsMap.txt | 13 + .../when-expression/p-2/pos/3.1.kt | 6 +- .../when-expression/p-2/pos/3.2.kt | 6 +- .../when-expression/p-3/neg/1.1.kt | 6 +- .../when-expression/p-3/neg/2.1.kt | 5 +- .../when-expression/p-3/neg/2.2.kt | 5 +- .../when-expression/p-3/pos/1.1.kt | 5 +- .../when-expression/p-3/pos/2.1.kt | 5 +- .../when-expression/p-3/pos/2.2.kt | 4 +- .../when-expression/p-3/pos/2.3.kt | 3 +- .../when-expression/p-5/neg/1.1.kt | 4 +- .../when-expression/p-5/pos/1.1.kt | 4 +- .../when-expression/p-6/neg/1.1.kt | 4 +- .../when-expression/p-6/pos/1.1.kt | 3 +- .../when-expression/p-7/neg/1.1.kt | 3 +- .../when-expression/p-7/neg/1.2.kt | 3 +- .../when-expression/p-7/neg/3.1.kt | 3 +- .../when-expression/p-7/neg/3.2.kt | 3 +- .../when-expression/p-7/neg/5.1.kt | 3 +- .../when-expression/p-7/neg/5.2.kt | 4 +- .../when-expression/p-7/neg/7.1.kt | 3 +- .../when-expression/p-7/pos/1.1.kt | 3 +- .../when-expression/p-7/pos/1.2.kt | 3 +- .../when-expression/p-7/pos/1.3.kt | 3 +- .../when-expression/p-7/pos/1.4.kt | 3 +- .../when-expression/p-7/pos/3.1.kt | 3 +- .../when-expression/p-7/pos/3.2.kt | 3 +- .../when-expression/p-7/pos/5.1.kt | 3 +- .../when-expression/p-7/pos/5.2.kt | 3 +- .../when-expression/p-7/pos/7.1.kt | 2 +- .../when-expression/p-9/neg/1.1.kt | 58 +- .../when-expression/p-9/neg/1.2.kt | 36 +- .../when-expression/p-9/neg/1.3.kt | 28 +- .../when-expression/p-9/neg/1.4.kt | 62 +- .../when-expression/p-9/pos/1.1.kt | 22 +- .../when-expression/p-9/pos/1.2.kt | 14 +- .../when-expression/p-9/pos/1.3.kt | 14 +- .../when-expression/p-9/pos/1.4.kt | 24 +- .../expressions/when-expression/testsMap.txt | 27 + .../type-system/introduction-1/p-5/neg/2.1.kt | 69 + .../type-system/introduction-1/p-5/neg/2.2.kt | 101 + .../type-system/introduction-1/p-5/neg/2.3.kt | 39 + .../type-system/introduction-1/p-7/pos/1.1.kt | 84 + .../type-system/introduction-1/p-7/pos/2.1.kt | 87 + .../type-system/introduction-1/testsMap.txt | 14 + .../contractBuilder/effects/returns/pos/1.txt | 12 +- .../contractBuilder/effects/returns/pos/2.txt | 12 +- .../declarations/contractFunction/neg/2.txt | 12 +- .../diagnostics/notLinked/dfa/pos/29.kt | 9 +- .../diagnostics/notLinked/dfa/pos/30.kt | 4 +- .../diagnostics/notLinked/dfa/pos/31.kt | 9 +- .../diagnostics/notLinked/dfa/pos/9.kt | 2 +- .../DiagnosticsTestSpecGenerated.java | 2193 +++++++++-------- .../BlackBoxCodegenTestSpecGenerated.java | 61 +- .../parsing/ParsingTestSpecGenerated.java | 4 +- .../kotlin/spec/models/LinkedSpecTest.kt | 2 +- .../kotlin/spec/parsers/CommonParser.kt | 8 +- .../jetbrains/kotlin/spec/parsers/Patterns.kt | 2 +- .../GenerateFeatureInteractionSpecTestData.kt | 2 +- .../kotlin/spec/tasks/GenerateJsonTestsMap.kt | 2 +- .../kotlin/spec/tasks/GenerateSpecTests.kt | 115 +- 217 files changed, 2827 insertions(+), 1787 deletions(-) create mode 100644 compiler/tests-spec/testData/codegen/box/linked/type-system/introduction/p-5/pos/2.1.kt create mode 100644 compiler/tests-spec/testData/diagnostics/helpers/checkType.kt delete mode 100644 compiler/tests-spec/testData/diagnostics/linked/constant-literals/boolean-literals/p-1/neg/3.1.kt delete mode 100644 compiler/tests-spec/testData/diagnostics/linked/constant-literals/boolean-literals/p-1/neg/3.1.txt delete mode 100644 compiler/tests-spec/testData/diagnostics/linked/constant-literals/boolean-literals/p-1/pos/3.1.kt delete mode 100644 compiler/tests-spec/testData/diagnostics/linked/constant-literals/boolean-literals/p-1/pos/3.1.txt delete mode 100644 compiler/tests-spec/testData/diagnostics/linked/constant-literals/boolean-literals/p-1/pos/3.2.kt delete mode 100644 compiler/tests-spec/testData/diagnostics/linked/constant-literals/boolean-literals/p-1/pos/3.2.txt delete mode 100644 compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals/p-1/neg/2.1.kt delete mode 100644 compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals/p-1/neg/2.3.kt delete mode 100644 compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals/p-1/pos/2.1.kt delete mode 100644 compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-5/pos/1.1.txt create mode 100644 compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/boolean-literals/p-1/neg/3.1.kt create mode 100644 compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/boolean-literals/p-1/neg/3.1.txt create mode 100644 compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/boolean-literals/p-1/pos/3.1.kt create mode 100644 compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/boolean-literals/p-1/pos/3.1.txt create mode 100644 compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/boolean-literals/p-1/pos/3.2.kt create mode 100644 compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/boolean-literals/p-1/pos/3.2.txt create mode 100644 compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/boolean-literals/testsMap.txt rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/integer-literals/binary-integer-literals/p-1/neg/1.1.kt (72%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/integer-literals/binary-integer-literals/p-1/neg/1.1.txt (100%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/integer-literals/binary-integer-literals/p-1/neg/2.1.kt (81%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/integer-literals/binary-integer-literals/p-1/neg/2.1.txt (100%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/integer-literals/binary-integer-literals/p-1/neg/2.2.kt (90%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/integer-literals/binary-integer-literals/p-1/neg/2.2.txt (100%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/integer-literals/binary-integer-literals/p-1/neg/2.3.kt (86%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/integer-literals/binary-integer-literals/p-1/neg/2.3.txt (100%) create mode 100644 compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/binary-integer-literals/testsMap.txt rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/integer-literals/decimal-integer-literals/p-1/neg/2.1.kt (85%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/integer-literals/decimal-integer-literals/p-1/neg/2.1.txt (100%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/integer-literals/decimal-integer-literals/p-1/neg/2.2.kt (89%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/integer-literals/decimal-integer-literals/p-1/neg/2.2.txt (100%) create mode 100644 compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/testsMap.txt rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg/1.1.kt (71%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg/1.1.txt (100%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg/2.1.kt (81%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg/2.1.txt (100%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg/2.2.kt (89%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg/2.2.txt (100%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg/2.3.kt (86%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg/2.3.txt (100%) create mode 100644 compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/testsMap.txt rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/integer-literals/long-integer-literals/p-1/neg/1.1.kt (88%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/integer-literals/long-integer-literals/p-1/neg/1.1.txt (100%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/integer-literals/long-integer-literals/p-1/neg/1.2.kt (83%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/integer-literals/long-integer-literals/p-1/neg/1.2.txt (100%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/integer-literals/long-integer-literals/p-1/neg/1.3.kt (80%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/integer-literals/long-integer-literals/p-1/neg/1.3.txt (100%) create mode 100644 compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/neg/2.1.kt rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/integer-literals/long-integer-literals/p-1/neg/2.2.kt (57%) create mode 100644 compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/neg/2.3.kt rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/integer-literals/long-integer-literals/p-1/neg/2.4.kt (74%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/integer-literals/long-integer-literals/p-1/neg/2.5.kt (94%) create mode 100644 compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/pos/2.1.kt rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/integer-literals/long-integer-literals/p-1/pos/2.2.kt (66%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/integer-literals/long-integer-literals/p-1/pos/2.3.kt (67%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/integer-literals/long-integer-literals/p-1/pos/2.4.kt (70%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/integer-literals/long-integer-literals/p-1/pos/2.5.kt (88%) create mode 100644 compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/testsMap.txt rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-1/neg/1.1.kt (88%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-1/neg/1.1.txt (100%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-1/neg/3.1.kt (88%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-1/neg/3.1.txt (100%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-1/pos/1.1.kt (95%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-1/pos/1.1.txt (100%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-1/pos/1.2.kt (98%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-1/pos/1.2.txt (100%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-1/pos/3.1.kt (95%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-1/pos/3.1.txt (100%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-1/pos/3.2.kt (97%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-1/pos/3.2.txt (100%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-2/neg/1.1.kt (96%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-2/neg/1.1.txt (100%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-2/neg/1.2.kt (94%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-2/neg/1.2.txt (100%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-2/neg/1.3.kt (94%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-2/neg/1.3.txt (100%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-2/neg/1.4.kt (96%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-2/neg/1.4.txt (100%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-2/pos/1.1.kt (98%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-2/pos/1.1.txt (100%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-2/pos/1.2.kt (97%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-2/pos/1.2.txt (100%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-3/neg/1.1.kt (96%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-3/neg/1.1.txt (100%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-3/neg/1.2.kt (96%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-3/neg/1.2.txt (100%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-3/neg/2.1.kt (91%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-3/neg/2.1.txt (100%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-3/pos/1.1.kt (97%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-3/pos/1.1.txt (100%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-3/pos/1.2.kt (97%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-3/pos/1.2.txt (100%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-3/pos/1.3.kt (85%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-3/pos/1.3.txt (100%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-3/pos/1.4.kt (93%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-3/pos/1.4.txt (100%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-3/pos/1.5.kt (97%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-3/pos/1.5.txt (100%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-3/pos/2.1.kt (96%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-3/pos/2.1.txt (100%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-3/pos/2.2.kt (95%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-3/pos/2.2.txt (100%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-3/pos/2.3.kt (95%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-3/pos/2.3.txt (100%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-4/neg/1.1.kt (96%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-4/neg/1.1.txt (100%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-4/neg/1.2.kt (96%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-4/neg/1.2.txt (100%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-4/neg/2.1.kt (95%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-4/neg/2.1.txt (100%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-4/neg/2.2.kt (97%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-4/neg/2.2.txt (100%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-4/neg/2.3.kt (97%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-4/neg/2.3.txt (100%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-4/pos/1.1.kt (97%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-4/pos/1.1.txt (100%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-4/pos/1.2.kt (96%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-4/pos/1.2.txt (100%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-4/pos/1.3.kt (96%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-4/pos/1.3.txt (100%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-4/pos/1.4.kt (96%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-4/pos/1.4.txt (100%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-4/pos/1.5.kt (97%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-4/pos/1.5.txt (100%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-5/pos/1.1.kt (74%) create mode 100644 compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-5/pos/1.1.txt rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-5/pos/1.2.kt (66%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-5/pos/1.2.txt (71%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-5/pos/1.3.kt (65%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-5/pos/1.3.txt (64%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-5/pos/1.4.kt (56%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-5/pos/1.4.txt (65%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-5/pos/1.5.kt (51%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/constant-literals/real-literals/p-5/pos/1.5.txt (59%) create mode 100644 compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/testsMap.txt rename compiler/tests-spec/testData/diagnostics/linked/{when-expression/p-11 => expressions/when-expression/exhaustive-when-expressions/p-2}/neg/1.1.kt (69%) rename compiler/tests-spec/testData/diagnostics/linked/{when-expression/p-11 => expressions/when-expression/exhaustive-when-expressions/p-2}/neg/1.2.kt (71%) rename compiler/tests-spec/testData/diagnostics/linked/{when-expression/p-11 => expressions/when-expression/exhaustive-when-expressions/p-2}/neg/3.1.kt (83%) rename compiler/tests-spec/testData/diagnostics/linked/{when-expression/p-11 => expressions/when-expression/exhaustive-when-expressions/p-2}/neg/6.1.kt (92%) rename compiler/tests-spec/testData/diagnostics/linked/{when-expression/p-11 => expressions/when-expression/exhaustive-when-expressions/p-2}/neg/7.1.kt (89%) rename compiler/tests-spec/testData/diagnostics/linked/{when-expression/p-11 => expressions/when-expression/exhaustive-when-expressions/p-2}/neg/8.1.kt (73%) rename compiler/tests-spec/testData/diagnostics/linked/{when-expression/p-11 => expressions/when-expression/exhaustive-when-expressions/p-2}/neg/8.2.kt (91%) rename compiler/tests-spec/testData/diagnostics/linked/{when-expression/p-11 => expressions/when-expression/exhaustive-when-expressions/p-2}/neg/8.3.kt (86%) rename compiler/tests-spec/testData/diagnostics/linked/{when-expression/p-11 => expressions/when-expression/exhaustive-when-expressions/p-2}/pos/1.1.kt (71%) rename compiler/tests-spec/testData/diagnostics/linked/{when-expression/p-11 => expressions/when-expression/exhaustive-when-expressions/p-2}/pos/1.2.kt (77%) rename compiler/tests-spec/testData/diagnostics/linked/{when-expression/p-11 => expressions/when-expression/exhaustive-when-expressions/p-2}/pos/1.3.kt (89%) rename compiler/tests-spec/testData/diagnostics/linked/{when-expression/p-11 => expressions/when-expression/exhaustive-when-expressions/p-2}/pos/3.1.kt (72%) rename compiler/tests-spec/testData/diagnostics/linked/{when-expression/p-11 => expressions/when-expression/exhaustive-when-expressions/p-2}/pos/6.1.kt (93%) rename compiler/tests-spec/testData/diagnostics/linked/{when-expression/p-11 => expressions/when-expression/exhaustive-when-expressions/p-2}/pos/7.1.kt (72%) rename compiler/tests-spec/testData/diagnostics/linked/{when-expression/p-11 => expressions/when-expression/exhaustive-when-expressions/p-2}/pos/8.1.kt (72%) rename compiler/tests-spec/testData/diagnostics/linked/{when-expression/p-11 => expressions/when-expression/exhaustive-when-expressions/p-2}/pos/8.2.kt (79%) rename compiler/tests-spec/testData/diagnostics/linked/{when-expression/p-11 => expressions/when-expression/exhaustive-when-expressions/p-2}/pos/8.3.kt (91%) create mode 100644 compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/testsMap.txt rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/when-expression/p-2/pos/3.1.kt (60%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/when-expression/p-2/pos/3.2.kt (52%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/when-expression/p-3/neg/1.1.kt (72%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/when-expression/p-3/neg/2.1.kt (79%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/when-expression/p-3/neg/2.2.kt (83%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/when-expression/p-3/pos/1.1.kt (97%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/when-expression/p-3/pos/2.1.kt (92%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/when-expression/p-3/pos/2.2.kt (79%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/when-expression/p-3/pos/2.3.kt (97%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/when-expression/p-5/neg/1.1.kt (90%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/when-expression/p-5/pos/1.1.kt (85%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/when-expression/p-6/neg/1.1.kt (89%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/when-expression/p-6/pos/1.1.kt (98%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/when-expression/p-7/neg/1.1.kt (90%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/when-expression/p-7/neg/1.2.kt (84%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/when-expression/p-7/neg/3.1.kt (86%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/when-expression/p-7/neg/3.2.kt (93%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/when-expression/p-7/neg/5.1.kt (91%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/when-expression/p-7/neg/5.2.kt (90%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/when-expression/p-7/neg/7.1.kt (90%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/when-expression/p-7/pos/1.1.kt (94%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/when-expression/p-7/pos/1.2.kt (94%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/when-expression/p-7/pos/1.3.kt (95%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/when-expression/p-7/pos/1.4.kt (94%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/when-expression/p-7/pos/3.1.kt (89%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/when-expression/p-7/pos/3.2.kt (89%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/when-expression/p-7/pos/5.1.kt (98%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/when-expression/p-7/pos/5.2.kt (98%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/when-expression/p-7/pos/7.1.kt (89%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/when-expression/p-9/neg/1.1.kt (66%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/when-expression/p-9/neg/1.2.kt (67%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/when-expression/p-9/neg/1.3.kt (65%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/when-expression/p-9/neg/1.4.kt (68%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/when-expression/p-9/pos/1.1.kt (82%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/when-expression/p-9/pos/1.2.kt (84%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/when-expression/p-9/pos/1.3.kt (81%) rename compiler/tests-spec/testData/diagnostics/linked/{ => expressions}/when-expression/p-9/pos/1.4.kt (86%) create mode 100644 compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/testsMap.txt create mode 100644 compiler/tests-spec/testData/diagnostics/linked/type-system/introduction-1/p-5/neg/2.1.kt create mode 100644 compiler/tests-spec/testData/diagnostics/linked/type-system/introduction-1/p-5/neg/2.2.kt create mode 100644 compiler/tests-spec/testData/diagnostics/linked/type-system/introduction-1/p-5/neg/2.3.kt create mode 100644 compiler/tests-spec/testData/diagnostics/linked/type-system/introduction-1/p-7/pos/1.1.kt create mode 100644 compiler/tests-spec/testData/diagnostics/linked/type-system/introduction-1/p-7/pos/2.1.kt create mode 100644 compiler/tests-spec/testData/diagnostics/linked/type-system/introduction-1/testsMap.txt diff --git a/compiler/tests-spec/testData/codegen/box/linked/type-system/introduction/p-5/pos/2.1.kt b/compiler/tests-spec/testData/codegen/box/linked/type-system/introduction/p-5/pos/2.1.kt new file mode 100644 index 00000000000..fcfa97026cf --- /dev/null +++ b/compiler/tests-spec/testData/codegen/box/linked/type-system/introduction/p-5/pos/2.1.kt @@ -0,0 +1,32 @@ +// WITH_RUNTIME +/* + * KOTLIN CODEGEN BOX SPEC TEST (POSITIVE) + * + * SPEC VERSION: 0.1-draft + * PLACE: type-system, introduction -> paragraph 5 -> sentence 2 + * NUMBER: 1 + * DESCRIPTION: The use of Boolean literals as the identifier (with backtick) in the class. + * NOTE: this test data is generated by FeatureInteractionTestDataGenerator. DO NOT MODIFY CODE MANUALLY + * UNEXPECTED BEHAVIOUR + * ISSUES: KT-26947 + */ + +val map = mapOf("x" to null) + +fun box(): String { + try { + val x: Int by mapOf("x" to null) + } catch (e: KotlinNullPointerException) { + return "OK" + } catch (e: NullPointerException) { + return "OK" + } + try { + val x: Any by map + } catch (e: KotlinNullPointerException) { + return "OK" + } catch (e: NullPointerException) { + return "OK" + } + return "Error" +} diff --git a/compiler/tests-spec/testData/diagnostics/helpers/checkType.kt b/compiler/tests-spec/testData/diagnostics/helpers/checkType.kt new file mode 100644 index 00000000000..e5d4fe26cff --- /dev/null +++ b/compiler/tests-spec/testData/diagnostics/helpers/checkType.kt @@ -0,0 +1,5 @@ +fun checkSubtype(t: T) = t +class CheckType +fun CheckType.check() {} + +infix fun T.checkType(f: CheckType.() -> Unit) {} diff --git a/compiler/tests-spec/testData/diagnostics/helpers/classes.kt b/compiler/tests-spec/testData/diagnostics/helpers/classes.kt index 3c64437e16b..f57ddb7b70e 100644 --- a/compiler/tests-spec/testData/diagnostics/helpers/classes.kt +++ b/compiler/tests-spec/testData/diagnostics/helpers/classes.kt @@ -12,8 +12,8 @@ class Class { val prop_11: Int = 10 var prop_12: String = "" val prop_13: Any? = "" - val prop_14: Comparable<*>? = "" - val prop_15: Iterable<*>? = "" + val prop_14: Comparable<*>? = null + val prop_15: Iterable<*>? = null fun fun_1(): (Int) -> (Int) -> Int = {number: Int -> { number * 5 }} fun fun_2(value_1: Int): Int = value_1 * 2 @@ -25,7 +25,7 @@ class Class { operator fun get(i1: Int) = 10 operator fun set(i1: Int, el: Int) {} operator fun invoke() {} - operator fun invoke(x) = { x: Any -> x } + operator fun invoke(x: Any) = { x: Any -> x } operator fun invoke(x: Any, y: Any) {} operator fun contains(a: Int) = a > 30 operator fun contains(a: Long) = a > 30L @@ -90,29 +90,29 @@ class ClassLevel6: ClassLevel5() { class Inv(val x: T = null as T) { val prop_1: Inv? = null val prop_2: T? = null - val prop_3: T = null + val prop_3: T = null as T val prop_4 = 10 fun test() {} fun get() = x fun put(x: T) {} - fun getNullable(): T? = select(x, null) + fun getNullable(): T? = if (true) x else null } class In() { fun put(x: T) {} - fun getWithUpperBoundT(): K = x as K + fun getWithUpperBoundT(x: T): K = x as K } class Out(val x: T = null as T) { - val prop_1: Inv? = null + val prop_1: Inv? = null val prop_2: T? = null fun get() = x } open class ClassWithTwoTypeParameters { - fun test1(): T? { return null } + fun test1(): L? { return null } fun test2(): K? { return null } } diff --git a/compiler/tests-spec/testData/diagnostics/helpers/functions.kt b/compiler/tests-spec/testData/diagnostics/helpers/functions.kt index 2684cc96ad6..27227cd2120 100644 --- a/compiler/tests-spec/testData/diagnostics/helpers/functions.kt +++ b/compiler/tests-spec/testData/diagnostics/helpers/functions.kt @@ -19,10 +19,10 @@ fun expandOutWithRemoveNullable(vararg x: Out): K = x[0] as K fun removeNullable(vararg x: K?): K = x as K fun T.funT() = 10 -fun T?.funNullableT = 10 +fun T?.funNullableT() = 10 fun Any.funAny() = 10 -fun Any?.funNullableAny = 10 +fun Any?.funNullableAny() = 10 fun funNothingQuest() = null \ No newline at end of file diff --git a/compiler/tests-spec/testData/diagnostics/helpers/sealedClasses.kt b/compiler/tests-spec/testData/diagnostics/helpers/sealedClasses.kt index 7a01ff9c468..8d6783d84ae 100644 --- a/compiler/tests-spec/testData/diagnostics/helpers/sealedClasses.kt +++ b/compiler/tests-spec/testData/diagnostics/helpers/sealedClasses.kt @@ -12,7 +12,7 @@ sealed class SealedClassSingle data class SealedSingleChild1(val number: Int) : SealedClassSingle() sealed class SealedClassSingleWithObject -object SealedSingleWithObjectChild1: Expr3() {} +object SealedSingleWithObjectChild1: SealedClassSingleWithObject() {} sealed class SealedClassEmpty diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/boolean-literals/p-1/neg/3.1.kt b/compiler/tests-spec/testData/diagnostics/linked/constant-literals/boolean-literals/p-1/neg/3.1.kt deleted file mode 100644 index 5360efdd1fd..00000000000 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/boolean-literals/p-1/neg/3.1.kt +++ /dev/null @@ -1,23 +0,0 @@ -// !CHECK_TYPE - -/* - * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) - * - * SPEC VERSION: 0.1-draft - * PLACE: constant-literals, boolean-literals -> paragraph 1 -> sentence 3 - * NUMBER: 1 - * DESCRIPTION: The use of Boolean literals as the identifier (with backtick) in the class. - * NOTE: this test data is generated by FeatureInteractionTestDataGenerator. DO NOT MODIFY CODE MANUALLY - */ - -// TESTCASE NUMBER: 1 -fun case_1() { - true checkType { _() } - false checkType { _() } - - true checkType { _() } - false checkType { _() } - - true checkType { _() } - false checkType { _() } -} \ No newline at end of file diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/boolean-literals/p-1/neg/3.1.txt b/compiler/tests-spec/testData/diagnostics/linked/constant-literals/boolean-literals/p-1/neg/3.1.txt deleted file mode 100644 index d83cc877305..00000000000 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/boolean-literals/p-1/neg/3.1.txt +++ /dev/null @@ -1,3 +0,0 @@ -package - -public fun case_1(): kotlin.Unit diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/boolean-literals/p-1/pos/3.1.kt b/compiler/tests-spec/testData/diagnostics/linked/constant-literals/boolean-literals/p-1/pos/3.1.kt deleted file mode 100644 index 8276b8e8114..00000000000 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/boolean-literals/p-1/pos/3.1.kt +++ /dev/null @@ -1,20 +0,0 @@ -// !CHECK_TYPE - -/* - * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) - * - * SPEC VERSION: 0.1-draft - * PLACE: constant-literals, boolean-literals -> paragraph 1 -> sentence 3 - * NUMBER: 1 - * DESCRIPTION: The use of Boolean literals as the identifier (with backtick) in the class. - * NOTE: this test data is generated by FeatureInteractionTestDataGenerator. DO NOT MODIFY CODE MANUALLY - */ - -// TESTCASE NUMBER: 1 -fun case_1() { - true checkType { _() } - false checkType { _() } - - checkSubtype(true) - checkSubtype(false) -} diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/boolean-literals/p-1/pos/3.1.txt b/compiler/tests-spec/testData/diagnostics/linked/constant-literals/boolean-literals/p-1/pos/3.1.txt deleted file mode 100644 index d83cc877305..00000000000 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/boolean-literals/p-1/pos/3.1.txt +++ /dev/null @@ -1,3 +0,0 @@ -package - -public fun case_1(): kotlin.Unit diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/boolean-literals/p-1/pos/3.2.kt b/compiler/tests-spec/testData/diagnostics/linked/constant-literals/boolean-literals/p-1/pos/3.2.kt deleted file mode 100644 index 24984752d2b..00000000000 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/boolean-literals/p-1/pos/3.2.kt +++ /dev/null @@ -1,20 +0,0 @@ -// !CHECK_TYPE - -/* - * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) - * - * SPEC VERSION: 0.1-draft - * PLACE: constant-literals, boolean-literals -> paragraph 1 -> sentence 3 - * NUMBER: 2 - * DESCRIPTION: The use of Boolean literals as the identifier (with backtick) in the class. - * NOTE: this test data is generated by FeatureInteractionTestDataGenerator. DO NOT MODIFY CODE MANUALLY - */ - -// TESTCASE NUMBER: 1 -fun case_1() { - checkSubtype(true) - checkSubtype(false) - - checkSubtype(true) - checkSubtype(false) -} \ No newline at end of file diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/boolean-literals/p-1/pos/3.2.txt b/compiler/tests-spec/testData/diagnostics/linked/constant-literals/boolean-literals/p-1/pos/3.2.txt deleted file mode 100644 index d83cc877305..00000000000 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/boolean-literals/p-1/pos/3.2.txt +++ /dev/null @@ -1,3 +0,0 @@ -package - -public fun case_1(): kotlin.Unit diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals/p-1/neg/2.1.kt b/compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals/p-1/neg/2.1.kt deleted file mode 100644 index 6291bee19cd..00000000000 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals/p-1/neg/2.1.kt +++ /dev/null @@ -1,21 +0,0 @@ -// !CHECK_TYPE -// SKIP_TXT - -/* - * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) - * - * SPEC VERSION: 0.1-draft - * PLACE: constant-literals, integer-literals, long-integer-literals -> paragraph 1 -> sentence 2 - * NUMBER: 1 - * DESCRIPTION: Various integer literals with not allowed long literal mark in lower case (type checking). - */ - -// TESTCASE NUMBER: 1 -fun case_1() { - 0l checkType { _() } - 10000000000000l checkType { _() } - 0X000Af10cDl checkType { _() } - 0x0_0l checkType { _() } - 0b100_000_111_111l checkType { _() } - 0b0l checkType { _() } -} diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals/p-1/neg/2.3.kt b/compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals/p-1/neg/2.3.kt deleted file mode 100644 index 70af61846db..00000000000 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals/p-1/neg/2.3.kt +++ /dev/null @@ -1,122 +0,0 @@ -// !CHECK_TYPE -// SKIP_TXT - -/* - * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) - * - * SPEC VERSION: 0.1-draft - * PLACE: constant-literals, integer-literals, long-integer-literals -> paragraph 1 -> sentence 2 - * NUMBER: 3 - * DESCRIPTION: Type checking (comparison with invalid types) of various integer literals. - */ - -// TESTCASE NUMBER: 1 -fun case_1() { - 0 checkType { _() } - 0 checkType { _() } - 0 checkType { _() } -} - -// TESTCASE NUMBER: 2 -fun case_2() { - 127 checkType { _() } - 127 checkType { _() } - 127 checkType { _() } - - checkSubtype(128) - 128 checkType { _() } - 128 checkType { _() } - 128 checkType { _() } - - -128 checkType { _() } - -128 checkType { _() } - -128 checkType { _() } - - checkSubtype(-129) - -129 checkType { _() } - -129 checkType { _() } - -129 checkType { _() } -} - -// TESTCASE NUMBER: 3 -fun case_3() { - checkSubtype(32767) - 32767 checkType { _() } - 32767 checkType { _() } - 32767 checkType { _() } - - checkSubtype(32768) - checkSubtype(32768) - 32768 checkType { _() } - 32768 checkType { _() } - 32768 checkType { _() } - - checkSubtype(-32768) - -32768 checkType { _() } - -32768 checkType { _() } - -32768 checkType { _() } - - checkSubtype(-32769) - checkSubtype(-32769) - -32769 checkType { _() } - -32769 checkType { _() } - -32769 checkType { _() } -} - -// TESTCASE NUMBER: 4 -fun case_4() { - checkSubtype(2147483647) - checkSubtype(2147483647) - 2147483647 checkType { _() } - 2147483647 checkType { _() } - 2147483647 checkType { _() } - - checkSubtype(2147483648) - checkSubtype(2147483648) - checkSubtype(2147483648) - 2147483648 checkType { _() } - 2147483648 checkType { _() } - 2147483648 checkType { _() } - - checkSubtype(-2147483648) - checkSubtype(-2147483648) - -2147483648 checkType { _() } - -2147483648 checkType { _() } - -2147483648 checkType { _() } - - checkSubtype(-2147483649) - checkSubtype(-2147483649) - checkSubtype(-2147483649) - -2147483649 checkType { _() } - -2147483649 checkType { _() } - -2147483649 checkType { _() } -} - -// TESTCASE NUMBER: 5 -fun case_5() { - checkSubtype(9223372036854775807) - checkSubtype(9223372036854775807) - checkSubtype(9223372036854775807) - 9223372036854775807 checkType { _() } - 9223372036854775807 checkType { _() } - 9223372036854775807 checkType { _() } - - checkSubtype(-9223372036854775807) - checkSubtype(-9223372036854775807) - checkSubtype(-9223372036854775807) - -9223372036854775807 checkType { _() } - -9223372036854775807 checkType { _() } - -9223372036854775807 checkType { _() } -} - -// TESTCASE NUMBER: 6 -fun case_6() { - checkSubtype(-100000000000000000000000000000000) - checkSubtype(-100000000000000000000000000000000) - checkSubtype(-100000000000000000000000000000000) - checkSubtype(-100000000000000000000000000000000) - -100000000000000000000000000000000 checkType { _() } - -100000000000000000000000000000000 checkType { _() } - -100000000000000000000000000000000 checkType { _() } - -100000000000000000000000000000000 checkType { _() } -} diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals/p-1/pos/2.1.kt b/compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals/p-1/pos/2.1.kt deleted file mode 100644 index f9f8e21a327..00000000000 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals/p-1/pos/2.1.kt +++ /dev/null @@ -1,33 +0,0 @@ -// !CHECK_TYPE -// SKIP_TXT - -/* - * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) - * - * SPEC VERSION: 0.1-draft - * PLACE: constant-literals, integer-literals, long-integer-literals -> paragraph 1 -> sentence 2 - * NUMBER: 1 - * DESCRIPTION: Type checking of various integer literals with long literal mark. - */ - -// TESTCASE NUMBER: 1 -fun case_1() { - 0L checkType { _() } - 10000000000000L checkType { _() } - 0X000Af10cDL checkType { _() } - 0x0_0L checkType { _() } - 0b100_000_111_111L checkType { _() } - 0b0L checkType { _() } -} - -// TESTCASE NUMBER: 2 -fun case_2() { - 9223372036854775807L checkType { _() } - -9223372036854775807L checkType { _() } - - 0X7FFFFFFFFFFFFFFFL checkType { _() } - -0x7FFFFFFFFFFFFFFFL checkType { _() } - - 0b111111111111111111111111111111111111111111111111111111111111111L checkType { _() } - -0B111111111111111111111111111111111111111111111111111111111111111L checkType { _() } -} diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-5/pos/1.1.txt b/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-5/pos/1.1.txt deleted file mode 100644 index 761503e3e62..00000000000 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-5/pos/1.1.txt +++ /dev/null @@ -1,16 +0,0 @@ -package - -public val value_1: kotlin.Unit -public val value_10: kotlin.Unit -public val value_11: kotlin.Unit -public val value_12: kotlin.Unit -public val value_13: kotlin.Unit -public val value_14: kotlin.Unit -public val value_2: kotlin.Unit -public val value_3: kotlin.Unit -public val value_4: kotlin.Unit -public val value_5: kotlin.Unit -public val value_6: kotlin.Unit -public val value_7: kotlin.Unit -public val value_8: kotlin.Unit -public val value_9: kotlin.Unit diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/boolean-literals/p-1/neg/3.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/boolean-literals/p-1/neg/3.1.kt new file mode 100644 index 00000000000..83aab12d96d --- /dev/null +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/boolean-literals/p-1/neg/3.1.kt @@ -0,0 +1,21 @@ +/* + * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) + * + * SPEC VERSION: 0.1-draft + * PLACE: 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 { check() } + false checkType { check() } + + true checkType { check() } + false checkType { check() } + + true checkType { check() } + false checkType { check() } +} \ No newline at end of file diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/boolean-literals/p-1/neg/3.1.txt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/boolean-literals/p-1/neg/3.1.txt new file mode 100644 index 00000000000..4accec93c90 --- /dev/null +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/boolean-literals/p-1/neg/3.1.txt @@ -0,0 +1,13 @@ +package + +public fun case_1(): kotlin.Unit +public fun checkSubtype(/*0*/ t: T): T +public fun Inv.check(): kotlin.Unit +public infix fun T.checkType(/*0*/ f: Inv.() -> kotlin.Unit): kotlin.Unit + +public final class Inv { + public constructor Inv() + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/boolean-literals/p-1/pos/3.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/boolean-literals/p-1/pos/3.1.kt new file mode 100644 index 00000000000..df0311ecec0 --- /dev/null +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/boolean-literals/p-1/pos/3.1.kt @@ -0,0 +1,18 @@ +/* + * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) + * + * SPEC VERSION: 0.1-draft + * PLACE: 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 { check() } + false checkType { check() } + + checkSubtype(true) + checkSubtype(false) +} diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/boolean-literals/p-1/pos/3.1.txt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/boolean-literals/p-1/pos/3.1.txt new file mode 100644 index 00000000000..4accec93c90 --- /dev/null +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/boolean-literals/p-1/pos/3.1.txt @@ -0,0 +1,13 @@ +package + +public fun case_1(): kotlin.Unit +public fun checkSubtype(/*0*/ t: T): T +public fun Inv.check(): kotlin.Unit +public infix fun T.checkType(/*0*/ f: Inv.() -> kotlin.Unit): kotlin.Unit + +public final class Inv { + public constructor Inv() + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/boolean-literals/p-1/pos/3.2.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/boolean-literals/p-1/pos/3.2.kt new file mode 100644 index 00000000000..6543f7b1af4 --- /dev/null +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/boolean-literals/p-1/pos/3.2.kt @@ -0,0 +1,18 @@ +/* + * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) + * + * SPEC VERSION: 0.1-draft + * PLACE: expressions, constant-literals, boolean-literals -> paragraph 1 -> sentence 3 + * NUMBER: 2 + * DESCRIPTION: Checking of subtype for Boolean values + * HELPERS: checkType + */ + +// TESTCASE NUMBER: 1 +fun case_1() { + checkSubtype(true) + checkSubtype(false) + + checkSubtype(true) + checkSubtype(false) +} \ No newline at end of file diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/boolean-literals/p-1/pos/3.2.txt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/boolean-literals/p-1/pos/3.2.txt new file mode 100644 index 00000000000..4accec93c90 --- /dev/null +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/boolean-literals/p-1/pos/3.2.txt @@ -0,0 +1,13 @@ +package + +public fun case_1(): kotlin.Unit +public fun checkSubtype(/*0*/ t: T): T +public fun Inv.check(): kotlin.Unit +public infix fun T.checkType(/*0*/ f: Inv.() -> kotlin.Unit): kotlin.Unit + +public final class Inv { + public constructor Inv() + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/boolean-literals/testsMap.txt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/boolean-literals/testsMap.txt new file mode 100644 index 00000000000..aabfe681088 --- /dev/null +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/boolean-literals/testsMap.txt @@ -0,0 +1,13 @@ +/* + * This file is generated by {@link org.jetbrains.kotlin.spec.tasks.generateTests}. DO NOT MODIFY MANUALLY. + * This file is used in the HTML version of the Kotlin Specification (https://kotlin.github.io/kotlin-spec) to show tests coverage for sentences. + * + * Content format: + * + * {paragraphNumber} + * {testType: neg|pos}: {sentenceNumber}-{numberOfTests|testPathToAnotherSection}, ... + */ + +1 + neg: 3-1 + pos: 3-2 diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/binary-integer-literals/p-1/neg/1.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1/neg/1.1.kt similarity index 72% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/binary-integer-literals/p-1/neg/1.1.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1/neg/1.1.kt index 2e5c727bf1f..d476fc25d26 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/binary-integer-literals/p-1/neg/1.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1/neg/1.1.kt @@ -2,7 +2,7 @@ * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) * * SPEC VERSION: 0.1-draft - * PLACE: constant-literals, integer-literals, binary-integer-literals -> paragraph 1 -> sentence 1 + * PLACE: expressions, constant-literals, integer-literals, binary-integer-literals -> paragraph 1 -> sentence 1 * NUMBER: 1 * DESCRIPTION: Binary integer literals with the prefix only. */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/binary-integer-literals/p-1/neg/1.1.txt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1/neg/1.1.txt similarity index 100% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/binary-integer-literals/p-1/neg/1.1.txt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1/neg/1.1.txt diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/binary-integer-literals/p-1/neg/2.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1/neg/2.1.kt similarity index 81% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/binary-integer-literals/p-1/neg/2.1.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1/neg/2.1.kt index 7d4ec8210f0..8f6df38826c 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/binary-integer-literals/p-1/neg/2.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1/neg/2.1.kt @@ -2,7 +2,7 @@ * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) * * SPEC VERSION: 0.1-draft - * PLACE: constant-literals, integer-literals, binary-integer-literals -> paragraph 1 -> sentence 2 + * PLACE: expressions, constant-literals, integer-literals, binary-integer-literals -> paragraph 1 -> sentence 2 * NUMBER: 1 * DESCRIPTION: Binary integer literals with an underscore after the prefix. */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/binary-integer-literals/p-1/neg/2.1.txt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1/neg/2.1.txt similarity index 100% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/binary-integer-literals/p-1/neg/2.1.txt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1/neg/2.1.txt diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/binary-integer-literals/p-1/neg/2.2.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1/neg/2.2.kt similarity index 90% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/binary-integer-literals/p-1/neg/2.2.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1/neg/2.2.kt index 75fd706f4f7..7e757a21b46 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/binary-integer-literals/p-1/neg/2.2.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1/neg/2.2.kt @@ -2,7 +2,7 @@ * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) * * SPEC VERSION: 0.1-draft - * PLACE: constant-literals, integer-literals, binary-integer-literals -> paragraph 1 -> sentence 2 + * PLACE: expressions, constant-literals, integer-literals, binary-integer-literals -> paragraph 1 -> sentence 2 * NUMBER: 2 * DESCRIPTION: Binary integer literals with an underscore in the first position (it's considered as identifiers). */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/binary-integer-literals/p-1/neg/2.2.txt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1/neg/2.2.txt similarity index 100% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/binary-integer-literals/p-1/neg/2.2.txt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1/neg/2.2.txt diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/binary-integer-literals/p-1/neg/2.3.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1/neg/2.3.kt similarity index 86% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/binary-integer-literals/p-1/neg/2.3.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1/neg/2.3.kt index 2f595e8dbda..5a98405e530 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/binary-integer-literals/p-1/neg/2.3.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1/neg/2.3.kt @@ -2,7 +2,7 @@ * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) * * SPEC VERSION: 0.1-draft - * PLACE: constant-literals, integer-literals, binary-integer-literals -> paragraph 1 -> sentence 2 + * PLACE: 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. */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/binary-integer-literals/p-1/neg/2.3.txt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1/neg/2.3.txt similarity index 100% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/binary-integer-literals/p-1/neg/2.3.txt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1/neg/2.3.txt diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/binary-integer-literals/testsMap.txt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/binary-integer-literals/testsMap.txt new file mode 100644 index 00000000000..32fc004e4b6 --- /dev/null +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/binary-integer-literals/testsMap.txt @@ -0,0 +1,12 @@ +/* + * This file is generated by {@link org.jetbrains.kotlin.spec.tasks.generateTests}. DO NOT MODIFY MANUALLY. + * This file is used in the HTML version of the Kotlin Specification (https://kotlin.github.io/kotlin-spec) to show tests coverage for sentences. + * + * Content format: + * + * {paragraphNumber} + * {testType: neg|pos}: {sentenceNumber}-{numberOfTests|testPathToAnotherSection}, ... + */ + +1 + neg: 2-3, 1-1 diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/decimal-integer-literals/p-1/neg/2.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/p-1/neg/2.1.kt similarity index 85% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/decimal-integer-literals/p-1/neg/2.1.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/p-1/neg/2.1.kt index e4f9eafad5e..94d9b02f5bf 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/decimal-integer-literals/p-1/neg/2.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/p-1/neg/2.1.kt @@ -2,7 +2,7 @@ * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) * * SPEC VERSION: 0.1-draft - * PLACE: constant-literals, integer-literals, decimal-integer-literals -> paragraph 1 -> sentence 2 + * PLACE: expressions, constant-literals, integer-literals, decimal-integer-literals -> paragraph 1 -> sentence 2 * NUMBER: 1 * DESCRIPTION: Integer literals with an underscore in the last position. */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/decimal-integer-literals/p-1/neg/2.1.txt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/p-1/neg/2.1.txt similarity index 100% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/decimal-integer-literals/p-1/neg/2.1.txt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/p-1/neg/2.1.txt diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/decimal-integer-literals/p-1/neg/2.2.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/p-1/neg/2.2.kt similarity index 89% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/decimal-integer-literals/p-1/neg/2.2.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/p-1/neg/2.2.kt index 165c27b9f3e..653f3e9d424 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/decimal-integer-literals/p-1/neg/2.2.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/p-1/neg/2.2.kt @@ -2,7 +2,7 @@ * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) * * SPEC VERSION: 0.1-draft - * PLACE: constant-literals, integer-literals, decimal-integer-literals -> paragraph 1 -> sentence 2 + * PLACE: expressions, constant-literals, integer-literals, decimal-integer-literals -> paragraph 1 -> sentence 2 * NUMBER: 2 * DESCRIPTION: Integer literals with an underscore in the first position (it's considered as identifiers). */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/decimal-integer-literals/p-1/neg/2.2.txt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/p-1/neg/2.2.txt similarity index 100% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/decimal-integer-literals/p-1/neg/2.2.txt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/p-1/neg/2.2.txt diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/testsMap.txt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/testsMap.txt new file mode 100644 index 00000000000..8c98e4da46e --- /dev/null +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/testsMap.txt @@ -0,0 +1,12 @@ +/* + * This file is generated by {@link org.jetbrains.kotlin.spec.tasks.generateTests}. DO NOT MODIFY MANUALLY. + * This file is used in the HTML version of the Kotlin Specification (https://kotlin.github.io/kotlin-spec) to show tests coverage for sentences. + * + * Content format: + * + * {paragraphNumber} + * {testType: neg|pos}: {sentenceNumber}-{numberOfTests|testPathToAnotherSection}, ... + */ + +1 + neg: 2-2 diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg/1.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg/1.1.kt similarity index 71% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg/1.1.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg/1.1.kt index 2f16f9b97c9..e4095d24ca4 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg/1.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg/1.1.kt @@ -2,7 +2,7 @@ * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) * * SPEC VERSION: 0.1-draft - * PLACE: constant-literals, integer-literals, hexadecimal-integer-literals -> paragraph 1 -> sentence 1 + * PLACE: expressions, constant-literals, integer-literals, hexadecimal-integer-literals -> paragraph 1 -> sentence 1 * NUMBER: 1 * DESCRIPTION: Hexadecimal integer literals with the prefix only. */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg/1.1.txt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg/1.1.txt similarity index 100% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg/1.1.txt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg/1.1.txt diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg/2.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg/2.1.kt similarity index 81% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg/2.1.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg/2.1.kt index 63780bfc9c5..f418971669d 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg/2.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg/2.1.kt @@ -2,7 +2,7 @@ * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) * * SPEC VERSION: 0.1-draft - * PLACE: constant-literals, integer-literals, hexadecimal-integer-literals -> paragraph 1 -> sentence 2 + * PLACE: expressions, constant-literals, integer-literals, hexadecimal-integer-literals -> paragraph 1 -> sentence 2 * NUMBER: 1 * DESCRIPTION: Hexadecimal integer literals with an underscore after the prefix. */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg/2.1.txt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg/2.1.txt similarity index 100% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg/2.1.txt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg/2.1.txt diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg/2.2.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg/2.2.kt similarity index 89% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg/2.2.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg/2.2.kt index 714a223fbe4..77d675a33e4 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg/2.2.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg/2.2.kt @@ -2,7 +2,7 @@ * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) * * SPEC VERSION: 0.1-draft - * PLACE: constant-literals, integer-literals, hexadecimal-integer-literals -> paragraph 1 -> sentence 2 + * PLACE: expressions, constant-literals, integer-literals, hexadecimal-integer-literals -> paragraph 1 -> sentence 2 * NUMBER: 2 * DESCRIPTION: Hexadecimal integer literals with an underscore in the first position (it's considered as identifiers). */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg/2.2.txt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg/2.2.txt similarity index 100% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg/2.2.txt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg/2.2.txt diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg/2.3.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg/2.3.kt similarity index 86% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg/2.3.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg/2.3.kt index 13df5e581b9..2e0ae8d787c 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg/2.3.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg/2.3.kt @@ -2,7 +2,7 @@ * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) * * SPEC VERSION: 0.1-draft - * PLACE: constant-literals, integer-literals, hexadecimal-integer-literals -> paragraph 1 -> sentence 2 + * PLACE: expressions, constant-literals, integer-literals, hexadecimal-integer-literals -> paragraph 1 -> sentence 2 * NUMBER: 3 * DESCRIPTION: Hexadecimal integer literals with an underscore in the last position. */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg/2.3.txt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg/2.3.txt similarity index 100% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg/2.3.txt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg/2.3.txt diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/testsMap.txt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/testsMap.txt new file mode 100644 index 00000000000..32fc004e4b6 --- /dev/null +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/testsMap.txt @@ -0,0 +1,12 @@ +/* + * This file is generated by {@link org.jetbrains.kotlin.spec.tasks.generateTests}. DO NOT MODIFY MANUALLY. + * This file is used in the HTML version of the Kotlin Specification (https://kotlin.github.io/kotlin-spec) to show tests coverage for sentences. + * + * Content format: + * + * {paragraphNumber} + * {testType: neg|pos}: {sentenceNumber}-{numberOfTests|testPathToAnotherSection}, ... + */ + +1 + neg: 2-3, 1-1 diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals/p-1/neg/1.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/neg/1.1.kt similarity index 88% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals/p-1/neg/1.1.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/neg/1.1.kt index 18bf206501e..708d9acff51 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals/p-1/neg/1.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/neg/1.1.kt @@ -2,7 +2,7 @@ * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) * * SPEC VERSION: 0.1-draft - * PLACE: constant-literals, integer-literals, long-integer-literals -> paragraph 1 -> sentence 1 + * PLACE: expressions, constant-literals, integer-literals, long-integer-literals -> paragraph 1 -> sentence 1 * NUMBER: 1 * DESCRIPTION: Binary and hexadecimal integer literals with a long literal mark only. */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals/p-1/neg/1.1.txt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/neg/1.1.txt similarity index 100% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals/p-1/neg/1.1.txt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/neg/1.1.txt diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals/p-1/neg/1.2.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/neg/1.2.kt similarity index 83% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals/p-1/neg/1.2.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/neg/1.2.kt index 2f1e1fb4a1f..f88ab2bbc6f 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals/p-1/neg/1.2.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/neg/1.2.kt @@ -2,7 +2,7 @@ * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) * * SPEC VERSION: 0.1-draft - * PLACE: constant-literals, integer-literals, long-integer-literals -> paragraph 1 -> sentence 1 + * PLACE: expressions, constant-literals, integer-literals, long-integer-literals -> paragraph 1 -> sentence 1 * NUMBER: 2 * DESCRIPTION: Various integer literals with a not allowed underscore before the long literal mark. */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals/p-1/neg/1.2.txt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/neg/1.2.txt similarity index 100% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals/p-1/neg/1.2.txt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/neg/1.2.txt diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals/p-1/neg/1.3.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/neg/1.3.kt similarity index 80% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals/p-1/neg/1.3.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/neg/1.3.kt index 92b612a3440..112bdecea74 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals/p-1/neg/1.3.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/neg/1.3.kt @@ -2,7 +2,7 @@ * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) * * SPEC VERSION: 0.1-draft - * PLACE: constant-literals, integer-literals, long-integer-literals -> paragraph 1 -> sentence 1 + * PLACE: expressions, constant-literals, integer-literals, long-integer-literals -> paragraph 1 -> sentence 1 * NUMBER: 3 * DESCRIPTION: Various integer literals with not allowed long literal mark in lower case. */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals/p-1/neg/1.3.txt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/neg/1.3.txt similarity index 100% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals/p-1/neg/1.3.txt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/neg/1.3.txt diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/neg/2.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/neg/2.1.kt new file mode 100644 index 00000000000..5760618811f --- /dev/null +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/neg/2.1.kt @@ -0,0 +1,21 @@ +// SKIP_TXT + +/* + * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) + * + * SPEC VERSION: 0.1-draft + * PLACE: expressions, constant-literals, integer-literals, long-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() } + 10000000000000l checkType { check() } + 0X000Af10cDl checkType { check() } + 0x0_0l checkType { check() } + 0b100_000_111_111l checkType { check() } + 0b0l checkType { check() } +} diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals/p-1/neg/2.2.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/neg/2.2.kt similarity index 57% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals/p-1/neg/2.2.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/neg/2.2.kt index a70b3bf8138..0c593e79639 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals/p-1/neg/2.2.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/neg/2.2.kt @@ -1,23 +1,23 @@ -// !CHECK_TYPE // SKIP_TXT /* * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) * * SPEC VERSION: 0.1-draft - * PLACE: constant-literals, integer-literals, long-integer-literals -> paragraph 1 -> sentence 2 + * PLACE: expressions, constant-literals, integer-literals, long-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 { _() } - 1000000L checkType { _() } - 0XAf10cDL checkType { _() } - 0x0_0L checkType { _() } - 0b100_000_111_111L checkType { _() } - 0b0L checkType { _() } + 0L checkType { check() } + 1000000L checkType { check() } + 0XAf10cDL checkType { check() } + 0x0_0L checkType { check() } + 0b100_000_111_111L checkType { check() } + 0b0L checkType { check() } checkSubtype(0L) checkSubtype(1000000L) diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/neg/2.3.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/neg/2.3.kt new file mode 100644 index 00000000000..d4b63c28981 --- /dev/null +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/neg/2.3.kt @@ -0,0 +1,122 @@ +// SKIP_TXT + +/* + * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) + * + * SPEC VERSION: 0.1-draft + * PLACE: expressions, constant-literals, integer-literals, long-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 { check() } + 0 checkType { check() } + 0 checkType { check() } +} + +// TESTCASE NUMBER: 2 +fun case_2() { + 127 checkType { check() } + 127 checkType { check() } + 127 checkType { check() } + + checkSubtype(128) + 128 checkType { check() } + 128 checkType { check() } + 128 checkType { check() } + + -128 checkType { check() } + -128 checkType { check() } + -128 checkType { check() } + + checkSubtype(-129) + -129 checkType { check() } + -129 checkType { check() } + -129 checkType { check() } +} + +// TESTCASE NUMBER: 3 +fun case_3() { + checkSubtype(32767) + 32767 checkType { check() } + 32767 checkType { check() } + 32767 checkType { check() } + + checkSubtype(32768) + checkSubtype(32768) + 32768 checkType { check() } + 32768 checkType { check() } + 32768 checkType { check() } + + checkSubtype(-32768) + -32768 checkType { check() } + -32768 checkType { check() } + -32768 checkType { check() } + + checkSubtype(-32769) + checkSubtype(-32769) + -32769 checkType { check() } + -32769 checkType { check() } + -32769 checkType { check() } +} + +// TESTCASE NUMBER: 4 +fun case_4() { + checkSubtype(2147483647) + checkSubtype(2147483647) + 2147483647 checkType { check() } + 2147483647 checkType { check() } + 2147483647 checkType { check() } + + checkSubtype(2147483648) + checkSubtype(2147483648) + checkSubtype(2147483648) + 2147483648 checkType { check() } + 2147483648 checkType { check() } + 2147483648 checkType { check() } + + checkSubtype(-2147483648) + checkSubtype(-2147483648) + -2147483648 checkType { check() } + -2147483648 checkType { check() } + -2147483648 checkType { check() } + + checkSubtype(-2147483649) + checkSubtype(-2147483649) + checkSubtype(-2147483649) + -2147483649 checkType { check() } + -2147483649 checkType { check() } + -2147483649 checkType { check() } +} + +// TESTCASE NUMBER: 5 +fun case_5() { + checkSubtype(9223372036854775807) + checkSubtype(9223372036854775807) + checkSubtype(9223372036854775807) + 9223372036854775807 checkType { check() } + 9223372036854775807 checkType { check() } + 9223372036854775807 checkType { check() } + + checkSubtype(-9223372036854775807) + checkSubtype(-9223372036854775807) + checkSubtype(-9223372036854775807) + -9223372036854775807 checkType { check() } + -9223372036854775807 checkType { check() } + -9223372036854775807 checkType { check() } +} + +// TESTCASE NUMBER: 6 +fun case_6() { + checkSubtype(-100000000000000000000000000000000) + checkSubtype(-100000000000000000000000000000000) + checkSubtype(-100000000000000000000000000000000) + checkSubtype(-100000000000000000000000000000000) + -100000000000000000000000000000000 checkType { check() } + -100000000000000000000000000000000 checkType { check() } + -100000000000000000000000000000000 checkType { check() } + -100000000000000000000000000000000 checkType { check() } +} diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals/p-1/neg/2.4.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/neg/2.4.kt similarity index 74% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals/p-1/neg/2.4.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/neg/2.4.kt index d2a5a27e527..9b926d3ab67 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals/p-1/neg/2.4.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/neg/2.4.kt @@ -1,35 +1,35 @@ -// !CHECK_TYPE // SKIP_TXT /* * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) * * SPEC VERSION: 0.1-draft - * PLACE: constant-literals, integer-literals, long-integer-literals -> paragraph 1 -> sentence 2 + * PLACE: expressions, constant-literals, integer-literals, long-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(-9223372036854775808L) - -9223372036854775808L checkType { _() } + -9223372036854775808L checkType { check() } checkSubtype(9223372036854775808L) - 9223372036854775808L checkType { _() } + 9223372036854775808L checkType { check() } } // TESTCASE NUMBER: 2 fun case_2() { checkSubtype(100000000000000000000000000000000L) - 100000000000000000000000000000000L checkType { _() } + 100000000000000000000000000000000L checkType { check() } checkSubtype(100000000000000000000000000000000l) - 100000000000000000000000000000000l checkType { _() } + 100000000000000000000000000000000l checkType { check() } checkSubtype(-100000000000000000000000000000000L) - -100000000000000000000000000000000L checkType { _() } + -100000000000000000000000000000000L checkType { check() } checkSubtype(-100000000000000000000000000000000l) - -100000000000000000000000000000000l checkType { _() } + -100000000000000000000000000000000l checkType { check() } } diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals/p-1/neg/2.5.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/neg/2.5.kt similarity index 94% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals/p-1/neg/2.5.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/neg/2.5.kt index e88584a4dda..0202c28b7ae 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals/p-1/neg/2.5.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/neg/2.5.kt @@ -1,13 +1,13 @@ -// !CHECK_TYPE // SKIP_TXT /* * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) * * SPEC VERSION: 0.1-draft - * PLACE: constant-literals, integer-literals, long-integer-literals -> paragraph 1 -> sentence 2 + * PLACE: expressions, constant-literals, integer-literals, long-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 diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/pos/2.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/pos/2.1.kt new file mode 100644 index 00000000000..52a28891dc5 --- /dev/null +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/pos/2.1.kt @@ -0,0 +1,33 @@ +// SKIP_TXT + +/* + * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) + * + * SPEC VERSION: 0.1-draft + * PLACE: expressions, constant-literals, integer-literals, long-integer-literals -> paragraph 1 -> sentence 2 + * NUMBER: 1 + * DESCRIPTION: Type checking of various integer literals with long literal mark. + * HELPERS: checkType + */ + +// TESTCASE NUMBER: 1 +fun case_1() { + 0L checkType { check() } + 10000000000000L checkType { check() } + 0X000Af10cDL checkType { check() } + 0x0_0L checkType { check() } + 0b100_000_111_111L checkType { check() } + 0b0L checkType { check() } +} + +// TESTCASE NUMBER: 2 +fun case_2() { + 9223372036854775807L checkType { check() } + -9223372036854775807L checkType { check() } + + 0X7FFFFFFFFFFFFFFFL checkType { check() } + -0x7FFFFFFFFFFFFFFFL checkType { check() } + + 0b111111111111111111111111111111111111111111111111111111111111111L checkType { check() } + -0B111111111111111111111111111111111111111111111111111111111111111L checkType { check() } +} diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals/p-1/pos/2.2.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/pos/2.2.kt similarity index 66% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals/p-1/pos/2.2.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/pos/2.2.kt index eca5b6d2181..7747c0d0f90 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals/p-1/pos/2.2.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/pos/2.2.kt @@ -1,18 +1,18 @@ -// !CHECK_TYPE // SKIP_TXT /* * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * * SPEC VERSION: 0.1-draft - * PLACE: constant-literals, integer-literals, long-integer-literals -> paragraph 1 -> sentence 2 + * PLACE: expressions, constant-literals, integer-literals, long-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 { _() } + 0 checkType { check() } checkSubtype(0) checkSubtype(0) checkSubtype(0) @@ -21,24 +21,24 @@ fun case_1() { // TESTCASE NUMBER: 2 fun case_2() { - 127 checkType { _() } + 127 checkType { check() } checkSubtype(127) checkSubtype(127) checkSubtype(127) checkSubtype(127) - 128 checkType { _() } + 128 checkType { check() } checkSubtype(128) checkSubtype(128) checkSubtype(128) - -128 checkType { _() } + -128 checkType { check() } checkSubtype(-128) checkSubtype(-128) checkSubtype(-128) checkSubtype(-128) - -129 checkType { _() } + -129 checkType { check() } checkSubtype(-129) checkSubtype(-129) checkSubtype(-129) @@ -46,47 +46,47 @@ fun case_2() { // TESTCASE NUMBER: 3 fun case_3() { - 32767 checkType { _() } + 32767 checkType { check() } checkSubtype(32767) checkSubtype(32767) checkSubtype(32767) - 32768 checkType { _() } + 32768 checkType { check() } checkSubtype(32768) checkSubtype(32768) - -32768 checkType { _() } + -32768 checkType { check() } checkSubtype(-32768) checkSubtype(-32768) checkSubtype(-32768) - -32769 checkType { _() } + -32769 checkType { check() } checkSubtype(-32769) checkSubtype(-32769) } // TESTCASE NUMBER: 4 fun case_4() { - 2147483647 checkType { _() } + 2147483647 checkType { check() } checkSubtype(2147483647) checkSubtype(2147483647) - 2147483648 checkType { _() } + 2147483648 checkType { check() } checkSubtype(2147483648) - -2147483648 checkType { _() } + -2147483648 checkType { check() } checkSubtype(-2147483648) checkSubtype(-2147483648) - -2147483649 checkType { _() } + -2147483649 checkType { check() } checkSubtype(-2147483649) } // TESTCASE NUMBER: 5 fun case_5() { - 9223372036854775807 checkType { _() } + 9223372036854775807 checkType { check() } checkSubtype(9223372036854775807) - -9223372036854775807 checkType { _() } + -9223372036854775807 checkType { check() } checkSubtype(-9223372036854775807) } diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals/p-1/pos/2.3.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/pos/2.3.kt similarity index 67% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals/p-1/pos/2.3.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/pos/2.3.kt index 6501290bbce..4d3351404d3 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals/p-1/pos/2.3.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/pos/2.3.kt @@ -1,18 +1,18 @@ -// !CHECK_TYPE // SKIP_TXT /* * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * * SPEC VERSION: 0.1-draft - * PLACE: constant-literals, integer-literals, long-integer-literals -> paragraph 1 -> sentence 2 + * PLACE: expressions, constant-literals, integer-literals, long-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 { _() } + 0x0 checkType { check() } checkSubtype(0x0) checkSubtype(0x0) checkSubtype(0x0) @@ -21,24 +21,24 @@ fun case_1() { // TESTCASE NUMBER: 2 fun case_2() { - 0x7F checkType { _() } + 0x7F checkType { check() } checkSubtype(0x7F) checkSubtype(0x7F) checkSubtype(0x7F) checkSubtype(0x7F) - 0X80 checkType { _() } + 0X80 checkType { check() } checkSubtype(0X80) checkSubtype(0X80) checkSubtype(0X80) - -0X80 checkType { _() } + -0X80 checkType { check() } checkSubtype(-0X80) checkSubtype(-0X80) checkSubtype(-0X80) checkSubtype(-0X80) - -0x81 checkType { _() } + -0x81 checkType { check() } checkSubtype(-0x81) checkSubtype(-0x81) checkSubtype(-0x81) @@ -46,47 +46,47 @@ fun case_2() { // TESTCASE NUMBER: 3 fun case_3() { - 0x7FFF checkType { _() } + 0x7FFF checkType { check() } checkSubtype(0x7FFF) checkSubtype(0x7FFF) checkSubtype(0x7FFF) - 0x8000 checkType { _() } + 0x8000 checkType { check() } checkSubtype(0x8000) checkSubtype(0x8000) - -0x8000 checkType { _() } + -0x8000 checkType { check() } checkSubtype(-0x8000) checkSubtype(-0x8000) checkSubtype(-0x8000) - -0X8001 checkType { _() } + -0X8001 checkType { check() } checkSubtype(-0X8001) checkSubtype(-0X8001) } // TESTCASE NUMBER: 4 fun case_4() { - 0x7FFFFFFF checkType { _() } + 0x7FFFFFFF checkType { check() } checkSubtype(0x7FFFFFFF) checkSubtype(0x7FFFFFFF) - 0x80000000 checkType { _() } + 0x80000000 checkType { check() } checkSubtype(0x80000000) - -0x80000000 checkType { _() } + -0x80000000 checkType { check() } checkSubtype(-0x80000000) checkSubtype(-0x80000000) - -0x80000001 checkType { _() } + -0x80000001 checkType { check() } checkSubtype(-0x80000001) } // TESTCASE NUMBER: 5 fun case_5() { - 0X7FFFFFFFFFFFFFFF checkType { _() } + 0X7FFFFFFFFFFFFFFF checkType { check() } checkSubtype(0X7FFFFFFFFFFFFFFF) - -0X7FFFFFFFFFFFFFFF checkType { _() } + -0X7FFFFFFFFFFFFFFF checkType { check() } checkSubtype(-0X7FFFFFFFFFFFFFFF) } diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals/p-1/pos/2.4.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/pos/2.4.kt similarity index 70% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals/p-1/pos/2.4.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/pos/2.4.kt index 39938189b0d..511574260db 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals/p-1/pos/2.4.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/pos/2.4.kt @@ -1,18 +1,18 @@ -// !CHECK_TYPE // SKIP_TXT /* * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * * SPEC VERSION: 0.1-draft - * PLACE: constant-literals, integer-literals, long-integer-literals -> paragraph 1 -> sentence 2 + * PLACE: expressions, constant-literals, integer-literals, long-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 { _() } + 0b0 checkType { check() } checkSubtype(0b0) checkSubtype(0b0) checkSubtype(0b0) @@ -21,24 +21,24 @@ fun case_1() { // TESTCASE NUMBER: 2 fun case_2() { - 0B1111111 checkType { _() } + 0B1111111 checkType { check() } checkSubtype(0B1111111) checkSubtype(0B1111111) checkSubtype(0B1111111) checkSubtype(0B1111111) - 0b10000000 checkType { _() } + 0b10000000 checkType { check() } checkSubtype(0b10000000) checkSubtype(0b10000000) checkSubtype(0b10000000) - -0B10000000 checkType { _() } + -0B10000000 checkType { check() } checkSubtype(-0B10000000) checkSubtype(-0B10000000) checkSubtype(-0B10000000) checkSubtype(-0B10000000) - -0b10000001 checkType { _() } + -0b10000001 checkType { check() } checkSubtype(-0b10000001) checkSubtype(-0b10000001) checkSubtype(-0b10000001) @@ -46,47 +46,47 @@ fun case_2() { // TESTCASE NUMBER: 3 fun case_3() { - 0B111111111111111 checkType { _() } + 0B111111111111111 checkType { check() } checkSubtype(0B111111111111111) checkSubtype(0B111111111111111) checkSubtype(0B111111111111111) - 0b1000000000000000 checkType { _() } + 0b1000000000000000 checkType { check() } checkSubtype(0b1000000000000000) checkSubtype(0b1000000000000000) - -0b1000000000000000 checkType { _() } + -0b1000000000000000 checkType { check() } checkSubtype(-0b1000000000000000) checkSubtype(-0b1000000000000000) checkSubtype(-0b1000000000000000) - -0B1000000000000001 checkType { _() } + -0B1000000000000001 checkType { check() } checkSubtype(-0B1000000000000001) checkSubtype(-0B1000000000000001) } // TESTCASE NUMBER: 4 fun case_4() { - 0b1111111111111111111111111111111 checkType { _() } + 0b1111111111111111111111111111111 checkType { check() } checkSubtype(0b1111111111111111111111111111111) checkSubtype(0b1111111111111111111111111111111) - 0B10000000000000000000000000000000 checkType { _() } + 0B10000000000000000000000000000000 checkType { check() } checkSubtype(0B10000000000000000000000000000000) - -0B10000000000000000000000000000000 checkType { _() } + -0B10000000000000000000000000000000 checkType { check() } checkSubtype(-0B10000000000000000000000000000000) checkSubtype(-0B10000000000000000000000000000000) - -0b10000000000000000000000000000001 checkType { _() } + -0b10000000000000000000000000000001 checkType { check() } checkSubtype(-0b10000000000000000000000000000001) } // TESTCASE NUMBER: 5 fun case_5() { - 0b111111111111111111111111111111111111111111111111111111111111111 checkType { _() } + 0b111111111111111111111111111111111111111111111111111111111111111 checkType { check() } checkSubtype(0b111111111111111111111111111111111111111111111111111111111111111) - -0B111111111111111111111111111111111111111111111111111111111111111 checkType { _() } + -0B111111111111111111111111111111111111111111111111111111111111111 checkType { check() } checkSubtype(-0B111111111111111111111111111111111111111111111111111111111111111) } diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals/p-1/pos/2.5.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/pos/2.5.kt similarity index 88% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals/p-1/pos/2.5.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/pos/2.5.kt index 2576d6a3fd8..c26144a08a1 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals/p-1/pos/2.5.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/pos/2.5.kt @@ -1,13 +1,13 @@ -// !CHECK_TYPE // SKIP_TXT /* * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * * SPEC VERSION: 0.1-draft - * PLACE: constant-literals, integer-literals, long-integer-literals -> paragraph 1 -> sentence 2 + * PLACE: expressions, constant-literals, integer-literals, long-integer-literals -> paragraph 1 -> sentence 2 * NUMBER: 5 * DESCRIPTION: Check of integer type selection depends on the context. + * HELPERS: checkType */ // FILE: functions.kt diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/testsMap.txt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/testsMap.txt new file mode 100644 index 00000000000..e7b3c0f681f --- /dev/null +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/testsMap.txt @@ -0,0 +1,13 @@ +/* + * This file is generated by {@link org.jetbrains.kotlin.spec.tasks.generateTests}. DO NOT MODIFY MANUALLY. + * This file is used in the HTML version of the Kotlin Specification (https://kotlin.github.io/kotlin-spec) to show tests coverage for sentences. + * + * Content format: + * + * {paragraphNumber} + * {testType: neg|pos}: {sentenceNumber}-{numberOfTests|testPathToAnotherSection}, ... + */ + +1 + neg: 2-5, 1-3 + pos: 2-5 diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-1/neg/1.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-1/neg/1.1.kt similarity index 88% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-1/neg/1.1.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-1/neg/1.1.kt index c14785467de..31420bce926 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-1/neg/1.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-1/neg/1.1.kt @@ -2,7 +2,7 @@ * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) * * SPEC VERSION: 0.1-draft - * PLACE: constant-literals, real-literals -> paragraph 1 -> sentence 1 + * PLACE: expressions, constant-literals, real-literals -> paragraph 1 -> sentence 1 * NUMBER: 1 * DESCRIPTION: Real literals separeted by comments. */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-1/neg/1.1.txt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-1/neg/1.1.txt similarity index 100% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-1/neg/1.1.txt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-1/neg/1.1.txt diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-1/neg/3.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-1/neg/3.1.kt similarity index 88% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-1/neg/3.1.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-1/neg/3.1.kt index f47ec7efb2d..0e3a5976527 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-1/neg/3.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-1/neg/3.1.kt @@ -2,7 +2,7 @@ * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) * * SPEC VERSION: 0.1-draft - * PLACE: constant-literals, real-literals -> paragraph 1 -> sentence 3 + * PLACE: expressions, constant-literals, real-literals -> paragraph 1 -> sentence 3 * NUMBER: 1 * DESCRIPTION: Real literals suffixed by f/F (float suffix) separeted by comments. */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-1/neg/3.1.txt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-1/neg/3.1.txt similarity index 100% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-1/neg/3.1.txt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-1/neg/3.1.txt diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-1/pos/1.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-1/pos/1.1.kt similarity index 95% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-1/pos/1.1.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-1/pos/1.1.kt index cc2663f5a9d..6d071e575c9 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-1/pos/1.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-1/pos/1.1.kt @@ -2,7 +2,7 @@ * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * * SPEC VERSION: 0.1-draft - * PLACE: constant-literals, real-literals -> paragraph 1 -> sentence 1 + * PLACE: expressions, constant-literals, real-literals -> paragraph 1 -> sentence 1 * NUMBER: 1 * DESCRIPTION: Simple real literals with a different whole-number part and fraction part. */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-1/pos/1.1.txt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-1/pos/1.1.txt similarity index 100% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-1/pos/1.1.txt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-1/pos/1.1.txt diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-1/pos/1.2.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-1/pos/1.2.kt similarity index 98% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-1/pos/1.2.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-1/pos/1.2.kt index 46e4d960f75..745bf26b398 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-1/pos/1.2.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-1/pos/1.2.kt @@ -2,7 +2,7 @@ * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * * SPEC VERSION: 0.1-draft - * PLACE: constant-literals, real-literals -> paragraph 1 -> sentence 1 + * PLACE: 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). */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-1/pos/1.2.txt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-1/pos/1.2.txt similarity index 100% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-1/pos/1.2.txt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-1/pos/1.2.txt diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-1/pos/3.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-1/pos/3.1.kt similarity index 95% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-1/pos/3.1.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-1/pos/3.1.kt index c6a9efdd105..1de2435d42a 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-1/pos/3.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-1/pos/3.1.kt @@ -2,7 +2,7 @@ * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * * SPEC VERSION: 0.1-draft - * PLACE: constant-literals, real-literals -> paragraph 1 -> sentence 3 + * PLACE: expressions, constant-literals, real-literals -> paragraph 1 -> sentence 3 * NUMBER: 1 * DESCRIPTION: Simple real literals suffixed by f/F (the float suffix) with a different whole-number part and fraction part. */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-1/pos/3.1.txt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-1/pos/3.1.txt similarity index 100% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-1/pos/3.1.txt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-1/pos/3.1.txt diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-1/pos/3.2.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-1/pos/3.2.kt similarity index 97% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-1/pos/3.2.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-1/pos/3.2.kt index ded65a41a95..78d594b4432 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-1/pos/3.2.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-1/pos/3.2.kt @@ -2,7 +2,7 @@ * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * * SPEC VERSION: 0.1-draft - * PLACE: constant-literals, real-literals -> paragraph 1 -> sentence 3 + * PLACE: 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). */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-1/pos/3.2.txt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-1/pos/3.2.txt similarity index 100% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-1/pos/3.2.txt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-1/pos/3.2.txt diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-2/neg/1.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/neg/1.1.kt similarity index 96% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-2/neg/1.1.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/neg/1.1.kt index a7ed2bc05ac..a8eec4de2ce 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-2/neg/1.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/neg/1.1.kt @@ -2,7 +2,7 @@ * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) * * SPEC VERSION: 0.1-draft - * PLACE: constant-literals, real-literals -> paragraph 2 -> sentence 1 + * PLACE: expressions, constant-literals, real-literals -> paragraph 2 -> sentence 1 * NUMBER: 1 * DESCRIPTION: Real literals without digits after an exponent mark. */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-2/neg/1.1.txt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/neg/1.1.txt similarity index 100% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-2/neg/1.1.txt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/neg/1.1.txt diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-2/neg/1.2.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/neg/1.2.kt similarity index 94% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-2/neg/1.2.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/neg/1.2.kt index b8fa86edad4..ae3bd139fe0 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-2/neg/1.2.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/neg/1.2.kt @@ -2,7 +2,7 @@ * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) * * SPEC VERSION: 0.1-draft - * PLACE: constant-literals, real-literals -> paragraph 2 -> sentence 1 + * PLACE: expressions, constant-literals, real-literals -> paragraph 2 -> sentence 1 * NUMBER: 2 * DESCRIPTION: Real literals with a not allowed exponent mark at the beginning. */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-2/neg/1.2.txt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/neg/1.2.txt similarity index 100% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-2/neg/1.2.txt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/neg/1.2.txt diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-2/neg/1.3.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/neg/1.3.kt similarity index 94% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-2/neg/1.3.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/neg/1.3.kt index e7a9f77fd83..bfb04219f07 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-2/neg/1.3.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/neg/1.3.kt @@ -2,7 +2,7 @@ * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) * * SPEC VERSION: 0.1-draft - * PLACE: constant-literals, real-literals -> paragraph 2 -> sentence 1 + * PLACE: 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. */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-2/neg/1.3.txt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/neg/1.3.txt similarity index 100% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-2/neg/1.3.txt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/neg/1.3.txt diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-2/neg/1.4.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/neg/1.4.kt similarity index 96% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-2/neg/1.4.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/neg/1.4.kt index 86a6041efff..38c4e4d0132 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-2/neg/1.4.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/neg/1.4.kt @@ -2,7 +2,7 @@ * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) * * SPEC VERSION: 0.1-draft - * PLACE: constant-literals, real-literals -> paragraph 2 -> sentence 1 + * PLACE: 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. */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-2/neg/1.4.txt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/neg/1.4.txt similarity index 100% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-2/neg/1.4.txt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/neg/1.4.txt diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-2/pos/1.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/pos/1.1.kt similarity index 98% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-2/pos/1.1.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/pos/1.1.kt index a0d9b1e44aa..70ac631a0a9 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-2/pos/1.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/pos/1.1.kt @@ -2,7 +2,7 @@ * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * * SPEC VERSION: 0.1-draft - * PLACE: constant-literals, real-literals -> paragraph 2 -> sentence 1 + * PLACE: expressions, constant-literals, real-literals -> paragraph 2 -> sentence 1 * NUMBER: 1 * DESCRIPTION: Simple real literals with an exponent mark. */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-2/pos/1.1.txt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/pos/1.1.txt similarity index 100% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-2/pos/1.1.txt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/pos/1.1.txt diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-2/pos/1.2.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/pos/1.2.kt similarity index 97% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-2/pos/1.2.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/pos/1.2.kt index d0b8eef8941..71a8b9b8707 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-2/pos/1.2.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/pos/1.2.kt @@ -2,7 +2,7 @@ * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * * SPEC VERSION: 0.1-draft - * PLACE: constant-literals, real-literals -> paragraph 2 -> sentence 1 + * PLACE: expressions, constant-literals, real-literals -> paragraph 2 -> sentence 1 * NUMBER: 2 * DESCRIPTION: Real literals suffixed by f/F (float suffix) with an exponent mark. */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-2/pos/1.2.txt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/pos/1.2.txt similarity index 100% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-2/pos/1.2.txt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/pos/1.2.txt diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/neg/1.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/neg/1.1.kt similarity index 96% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/neg/1.1.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/neg/1.1.kt index 3afb5a10640..b5e875df789 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/neg/1.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/neg/1.1.kt @@ -2,7 +2,7 @@ * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) * * SPEC VERSION: 0.1-draft - * PLACE: constant-literals, real-literals -> paragraph 3 -> sentence 1 + * PLACE: 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. */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/neg/1.1.txt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/neg/1.1.txt similarity index 100% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/neg/1.1.txt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/neg/1.1.txt diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/neg/1.2.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/neg/1.2.kt similarity index 96% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/neg/1.2.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/neg/1.2.kt index 15f58ebf783..e7a9730c8bf 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/neg/1.2.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/neg/1.2.kt @@ -2,7 +2,7 @@ * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) * * SPEC VERSION: 0.1-draft - * PLACE: constant-literals, real-literals -> paragraph 3 -> sentence 1 + * PLACE: 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. */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/neg/1.2.txt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/neg/1.2.txt similarity index 100% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/neg/1.2.txt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/neg/1.2.txt diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/neg/2.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/neg/2.1.kt similarity index 91% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/neg/2.1.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/neg/2.1.kt index a1ad2d94225..bda534805c6 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/neg/2.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/neg/2.1.kt @@ -2,7 +2,7 @@ * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) * * SPEC VERSION: 0.1-draft - * PLACE: constant-literals, real-literals -> paragraph 3 -> sentence 2 + * PLACE: 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. */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/neg/2.1.txt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/neg/2.1.txt similarity index 100% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/neg/2.1.txt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/neg/2.1.txt diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/pos/1.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/pos/1.1.kt similarity index 97% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/pos/1.1.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/pos/1.1.kt index f243e3b9aa1..b703b75c2cc 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/pos/1.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/pos/1.1.kt @@ -2,7 +2,7 @@ * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * * SPEC VERSION: 0.1-draft - * PLACE: constant-literals, real-literals -> paragraph 3 -> sentence 1 + * PLACE: expressions, constant-literals, real-literals -> paragraph 3 -> sentence 1 * NUMBER: 1 * DESCRIPTION: Simple real literals with omitted a whole-number part. */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/pos/1.1.txt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/pos/1.1.txt similarity index 100% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/pos/1.1.txt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/pos/1.1.txt diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/pos/1.2.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/pos/1.2.kt similarity index 97% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/pos/1.2.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/pos/1.2.kt index f238dcaf7a8..b0d6bd577a4 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/pos/1.2.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/pos/1.2.kt @@ -2,7 +2,7 @@ * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * * SPEC VERSION: 0.1-draft - * PLACE: constant-literals, real-literals -> paragraph 3 -> sentence 1 + * PLACE: expressions, constant-literals, real-literals -> paragraph 3 -> sentence 1 * NUMBER: 2 * DESCRIPTION: Real literals with omitted a whole-number part and an exponent mark. */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/pos/1.2.txt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/pos/1.2.txt similarity index 100% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/pos/1.2.txt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/pos/1.2.txt diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/pos/1.3.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/pos/1.3.kt similarity index 85% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/pos/1.3.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/pos/1.3.kt index 402402ac930..0c76be6e685 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/pos/1.3.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/pos/1.3.kt @@ -2,7 +2,7 @@ * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * * SPEC VERSION: 0.1-draft - * PLACE: constant-literals, real-literals -> paragraph 3 -> sentence 1 + * PLACE: expressions, constant-literals, real-literals -> paragraph 3 -> sentence 1 * NUMBER: 3 * DESCRIPTION: Real literals separeted by comments with omitted a whole-number part. */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/pos/1.3.txt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/pos/1.3.txt similarity index 100% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/pos/1.3.txt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/pos/1.3.txt diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/pos/1.4.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/pos/1.4.kt similarity index 93% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/pos/1.4.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/pos/1.4.kt index 845315fb198..dcfd22e8ddc 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/pos/1.4.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/pos/1.4.kt @@ -2,7 +2,7 @@ * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * * SPEC VERSION: 0.1-draft - * PLACE: constant-literals, real-literals -> paragraph 3 -> sentence 1 + * PLACE: expressions, constant-literals, real-literals -> paragraph 3 -> sentence 1 * NUMBER: 4 * DESCRIPTION: Real literals suffixed by f/F (float suffix) with omitted a whole-number part. */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/pos/1.4.txt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/pos/1.4.txt similarity index 100% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/pos/1.4.txt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/pos/1.4.txt diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/pos/1.5.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/pos/1.5.kt similarity index 97% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/pos/1.5.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/pos/1.5.kt index 96f1aba824c..eba4c61977b 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/pos/1.5.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/pos/1.5.kt @@ -2,7 +2,7 @@ * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * * SPEC VERSION: 0.1-draft - * PLACE: constant-literals, real-literals -> paragraph 3 -> sentence 1 + * PLACE: 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. */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/pos/1.5.txt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/pos/1.5.txt similarity index 100% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/pos/1.5.txt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/pos/1.5.txt diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/pos/2.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/pos/2.1.kt similarity index 96% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/pos/2.1.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/pos/2.1.kt index c1574ebf96b..12c951a6349 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/pos/2.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/pos/2.1.kt @@ -2,7 +2,7 @@ * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * * SPEC VERSION: 0.1-draft - * PLACE: constant-literals, real-literals -> paragraph 3 -> sentence 2 + * PLACE: 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). */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/pos/2.1.txt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/pos/2.1.txt similarity index 100% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/pos/2.1.txt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/pos/2.1.txt diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/pos/2.2.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/pos/2.2.kt similarity index 95% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/pos/2.2.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/pos/2.2.kt index bcca6bf4166..fd8ba2349e9 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/pos/2.2.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/pos/2.2.kt @@ -2,7 +2,7 @@ * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * * SPEC VERSION: 0.1-draft - * PLACE: constant-literals, real-literals -> paragraph 3 -> sentence 2 + * PLACE: expressions, constant-literals, real-literals -> paragraph 3 -> sentence 2 * NUMBER: 2 * DESCRIPTION: Real literals with omitted a fraction part and an exponent mark. */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/pos/2.2.txt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/pos/2.2.txt similarity index 100% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/pos/2.2.txt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/pos/2.2.txt diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/pos/2.3.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/pos/2.3.kt similarity index 95% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/pos/2.3.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/pos/2.3.kt index 68e40d854ad..59bd3b4d122 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/pos/2.3.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/pos/2.3.kt @@ -2,7 +2,7 @@ * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * * SPEC VERSION: 0.1-draft - * PLACE: constant-literals, real-literals -> paragraph 3 -> sentence 2 + * PLACE: 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). */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/pos/2.3.txt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/pos/2.3.txt similarity index 100% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/pos/2.3.txt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/pos/2.3.txt diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-4/neg/1.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/neg/1.1.kt similarity index 96% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-4/neg/1.1.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/neg/1.1.kt index 6d31149f3e9..d5b5cda1853 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-4/neg/1.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/neg/1.1.kt @@ -2,7 +2,7 @@ * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) * * SPEC VERSION: 0.1-draft - * PLACE: constant-literals, real-literals -> paragraph 4 -> sentence 1 + * PLACE: 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. */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-4/neg/1.1.txt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/neg/1.1.txt similarity index 100% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-4/neg/1.1.txt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/neg/1.1.txt diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-4/neg/1.2.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/neg/1.2.kt similarity index 96% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-4/neg/1.2.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/neg/1.2.kt index 6fb9cfea703..d6ea385955b 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-4/neg/1.2.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/neg/1.2.kt @@ -2,7 +2,7 @@ * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) * * SPEC VERSION: 0.1-draft - * PLACE: constant-literals, real-literals -> paragraph 4 -> sentence 1 + * PLACE: expressions, constant-literals, real-literals -> paragraph 4 -> sentence 1 * NUMBER: 2 * DESCRIPTION: Real literals with underscores at the end. */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-4/neg/1.2.txt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/neg/1.2.txt similarity index 100% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-4/neg/1.2.txt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/neg/1.2.txt diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-4/neg/2.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/neg/2.1.kt similarity index 95% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-4/neg/2.1.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/neg/2.1.kt index f0fe54e45b7..3fd116b023f 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-4/neg/2.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/neg/2.1.kt @@ -2,7 +2,7 @@ * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) * * SPEC VERSION: 0.1-draft - * PLACE: constant-literals, real-literals -> paragraph 4 -> sentence 2 + * PLACE: expressions, constant-literals, real-literals -> paragraph 4 -> sentence 2 * NUMBER: 1 * DESCRIPTION: Real literals with underscores before an exponent mark. */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-4/neg/2.1.txt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/neg/2.1.txt similarity index 100% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-4/neg/2.1.txt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/neg/2.1.txt diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-4/neg/2.2.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/neg/2.2.kt similarity index 97% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-4/neg/2.2.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/neg/2.2.kt index 0ee90cc127c..7ffc2da8938 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-4/neg/2.2.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/neg/2.2.kt @@ -2,7 +2,7 @@ * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) * * SPEC VERSION: 0.1-draft - * PLACE: constant-literals, real-literals -> paragraph 4 -> sentence 2 + * PLACE: expressions, constant-literals, real-literals -> paragraph 4 -> sentence 2 * NUMBER: 2 * DESCRIPTION: Real literals with underscores after an exponent mark. */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-4/neg/2.2.txt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/neg/2.2.txt similarity index 100% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-4/neg/2.2.txt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/neg/2.2.txt diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-4/neg/2.3.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/neg/2.3.kt similarity index 97% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-4/neg/2.3.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/neg/2.3.kt index 8fbda9b897d..0598582b175 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-4/neg/2.3.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/neg/2.3.kt @@ -2,7 +2,7 @@ * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) * * SPEC VERSION: 0.1-draft - * PLACE: constant-literals, real-literals -> paragraph 4 -> sentence 2 + * PLACE: expressions, constant-literals, real-literals -> paragraph 4 -> sentence 2 * NUMBER: 3 * DESCRIPTION: Real literals with underscores around an exponent mark. */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-4/neg/2.3.txt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/neg/2.3.txt similarity index 100% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-4/neg/2.3.txt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/neg/2.3.txt diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-4/pos/1.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/pos/1.1.kt similarity index 97% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-4/pos/1.1.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/pos/1.1.kt index a0a9b485e81..03dd6ea39cf 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-4/pos/1.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/pos/1.1.kt @@ -2,7 +2,7 @@ * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * * SPEC VERSION: 0.1-draft - * PLACE: constant-literals, real-literals -> paragraph 4 -> sentence 1 + * PLACE: 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. */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-4/pos/1.1.txt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/pos/1.1.txt similarity index 100% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-4/pos/1.1.txt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/pos/1.1.txt diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-4/pos/1.2.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/pos/1.2.kt similarity index 96% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-4/pos/1.2.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/pos/1.2.kt index 81ea4110c89..34853fd9e71 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-4/pos/1.2.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/pos/1.2.kt @@ -2,7 +2,7 @@ * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * * SPEC VERSION: 0.1-draft - * PLACE: constant-literals, real-literals -> paragraph 4 -> sentence 1 + * PLACE: 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. */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-4/pos/1.2.txt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/pos/1.2.txt similarity index 100% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-4/pos/1.2.txt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/pos/1.2.txt diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-4/pos/1.3.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/pos/1.3.kt similarity index 96% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-4/pos/1.3.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/pos/1.3.kt index c09fd3162a2..b8e5b8e9cb5 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-4/pos/1.3.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/pos/1.3.kt @@ -2,7 +2,7 @@ * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * * SPEC VERSION: 0.1-draft - * PLACE: constant-literals, real-literals -> paragraph 4 -> sentence 1 + * PLACE: 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. */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-4/pos/1.3.txt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/pos/1.3.txt similarity index 100% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-4/pos/1.3.txt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/pos/1.3.txt diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-4/pos/1.4.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/pos/1.4.kt similarity index 96% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-4/pos/1.4.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/pos/1.4.kt index 58f39119c6b..cb70a438a49 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-4/pos/1.4.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/pos/1.4.kt @@ -2,7 +2,7 @@ * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * * SPEC VERSION: 0.1-draft - * PLACE: constant-literals, real-literals -> paragraph 4 -> sentence 1 + * PLACE: 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. */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-4/pos/1.4.txt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/pos/1.4.txt similarity index 100% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-4/pos/1.4.txt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/pos/1.4.txt diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-4/pos/1.5.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/pos/1.5.kt similarity index 97% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-4/pos/1.5.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/pos/1.5.kt index 784f31887dc..5e9457aa57a 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-4/pos/1.5.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/pos/1.5.kt @@ -2,7 +2,7 @@ * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * * SPEC VERSION: 0.1-draft - * PLACE: constant-literals, real-literals -> paragraph 4 -> sentence 1 + * PLACE: 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. */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-4/pos/1.5.txt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/pos/1.5.txt similarity index 100% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-4/pos/1.5.txt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/pos/1.5.txt diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-5/pos/1.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-5/pos/1.1.kt similarity index 74% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-5/pos/1.1.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-5/pos/1.1.kt index 33daabc47c9..95841b5cfba 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-5/pos/1.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-5/pos/1.1.kt @@ -1,52 +1,51 @@ -// !CHECK_TYPE - /* * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * * SPEC VERSION: 0.1-draft - * PLACE: constant-literals, real-literals -> paragraph 5 -> sentence 1 + * PLACE: 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 { _() } +val value_1 = 0.1 checkType { check() } // TESTCASE NUMBER: 2 -val value_2 = 0.1234567890 checkType { _() } +val value_2 = 0.1234567890 checkType { check() } // TESTCASE NUMBER: 3 -val value_3 = -0.99___99999999 checkType { _() } +val value_3 = -0.99___99999999 checkType { check() } // TESTCASE NUMBER: 4 -val value_4 = -1111111111.9_9_9_9_9_9_9_9_9_9 checkType { _() } +val value_4 = -1111111111.9_9_9_9_9_9_9_9_9_9 checkType { check() } // TESTCASE NUMBER: 5 -val value_5 = 6_6_6_6_6_6_6_6_6_6.0000000000 checkType { _() } +val value_5 = 6_6_6_6_6_6_6_6_6_6.0000000000 checkType { check() } // TESTCASE NUMBER: 6 -val value_6 = 66666666666666666666666666666666666666666666666666.000000000000000000000000000_____000000000000000000000001 checkType { _() } +val value_6 = 66666666666666666666666666666666666666666666666666.000000000000000000000000000_____000000000000000000000001 checkType { check() } // TESTCASE NUMBER: 7 -val value_7 = 0.0 checkType { _() } +val value_7 = 0.0 checkType { check() } // TESTCASE NUMBER: 8 -val value_8 = -0.0________0_______0______0_____0____0___0__0_0 checkType { _() } +val value_8 = -0.0________0_______0______0_____0____0___0__0_0 checkType { check() } // TESTCASE NUMBER: 9 -val value_9 = 0.0000000000 checkType { _() } +val value_9 = 0.0000000000 checkType { check() } // TESTCASE NUMBER: 10 -val value_10 = 0.00000000000000000000000000__________________________________________________________________________________________00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 checkType { _() } +val value_10 = 0.00000000000000000000000000__________________________________________________________________________________________00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 checkType { check() } // TESTCASE NUMBER: 11 -val value_11 = -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001 checkType { _() } +val value_11 = -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001 checkType { check() } // TESTCASE NUMBER: 12 -val value_12 = 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001 checkType { _() } +val value_12 = 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001 checkType { check() } // TESTCASE NUMBER: 13 -val value_13 = -99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999.0 checkType { _() } +val value_13 = -99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999.0 checkType { check() } // TESTCASE NUMBER: 14 -val value_14 = 222222222222222222___222222222222222222222___222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222.0 checkType { _() } +val value_14 = 222222222222222222___222222222222222222222___222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222.0 checkType { check() } diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-5/pos/1.1.txt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-5/pos/1.1.txt new file mode 100644 index 00000000000..a1a0b4a413d --- /dev/null +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-5/pos/1.1.txt @@ -0,0 +1,26 @@ +package + +public val value_1: kotlin.Unit +public val value_10: kotlin.Unit +public val value_11: kotlin.Unit +public val value_12: kotlin.Unit +public val value_13: kotlin.Unit +public val value_14: kotlin.Unit +public val value_2: kotlin.Unit +public val value_3: kotlin.Unit +public val value_4: kotlin.Unit +public val value_5: kotlin.Unit +public val value_6: kotlin.Unit +public val value_7: kotlin.Unit +public val value_8: kotlin.Unit +public val value_9: kotlin.Unit +public fun checkSubtype(/*0*/ t: T): T +public fun Inv.check(): kotlin.Unit +public infix fun T.checkType(/*0*/ f: Inv.() -> kotlin.Unit): kotlin.Unit + +public final class Inv { + public constructor Inv() + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-5/pos/1.2.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-5/pos/1.2.kt similarity index 66% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-5/pos/1.2.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-5/pos/1.2.kt index e9a6047638f..e23af41a372 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-5/pos/1.2.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-5/pos/1.2.kt @@ -1,127 +1,126 @@ -// !CHECK_TYPE - /* * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * * SPEC VERSION: 0.1-draft - * PLACE: constant-literals, real-literals -> paragraph 5 -> sentence 1 + * PLACE: 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 { _() } +val value_1 = 0.0e0 checkType { check() } // TESTCASE NUMBER: 2 -val value_2 = 0.0e-0____0 checkType { _() } +val value_2 = 0.0e-0____0 checkType { check() } // TESTCASE NUMBER: 3 -val value_3 = 0.0E000 checkType { _() } +val value_3 = 0.0E000 checkType { check() } // TESTCASE NUMBER: 4 -val value_4 = 0.0E+0_0_0_0 checkType { _() } +val value_4 = 0.0E+0_0_0_0 checkType { check() } // TESTCASE NUMBER: 5 -val value_5 = 0________________________________________0.0e+0 checkType { _() } +val value_5 = 0________________________________________0.0e+0 checkType { check() } // TESTCASE NUMBER: 6 -val value_6 = 000.0___0e0_0 checkType { _() } +val value_6 = 000.0___0e0_0 checkType { check() } // TESTCASE NUMBER: 7 -val value_7 = 0000.000E-000 checkType { _() } +val value_7 = 0000.000E-000 checkType { check() } // TESTCASE NUMBER: 8 -val value_8 = 1.0E+1 checkType { _() } +val value_8 = 1.0E+1 checkType { check() } // TESTCASE NUMBER: 9 -val value_9 = 2_________2.0_0e2_2 checkType { _() } +val value_9 = 2_________2.0_0e2_2 checkType { check() } // TESTCASE NUMBER: 10 -val value_10 = 33____3.000e-333 checkType { _() } +val value_10 = 33____3.000e-333 checkType { check() } // TESTCASE NUMBER: 11 -val value_11 = 4444.0000e4444 checkType { _() } +val value_11 = 4444.0000e4444 checkType { check() } // TESTCASE NUMBER: 12 -val value_12 = 55555.0E-5_5_5_5_5 checkType { _() } +val value_12 = 55555.0E-5_5_5_5_5 checkType { check() } // TESTCASE NUMBER: 13 -val value_13 = 6_6_6_6_6_6.0____0e666666 checkType { _() } +val value_13 = 6_6_6_6_6_6.0____0e666666 checkType { check() } // TESTCASE NUMBER: 14 -val value_14 = 7777777.000E7777777 checkType { _() } +val value_14 = 7777777.000E7777777 checkType { check() } // TESTCASE NUMBER: 15 -val value_15 = 88888888.0000e-88888888 checkType { _() } +val value_15 = 88888888.0000e-88888888 checkType { check() } // TESTCASE NUMBER: 16 -val value_16 = 9_9_9_9_9_9_9_9_9.0E+9_9_9_9_9_9_9_9_9 checkType { _() } +val value_16 = 9_9_9_9_9_9_9_9_9.0E+9_9_9_9_9_9_9_9_9 checkType { check() } // TESTCASE NUMBER: 17 -val value_17 = 0_________0________0_______0______0_____0____0___0__0_0.1234567890E999999999 checkType { _() } +val value_17 = 0_________0________0_______0______0_____0____0___0__0_0.1234567890E999999999 checkType { check() } // TESTCASE NUMBER: 18 -val value_18 = 123456789.23456789E+123456789 checkType { _() } +val value_18 = 123456789.23456789E+123456789 checkType { check() } // TESTCASE NUMBER: 19 -val value_19 = 2345678.345678e00000000001 checkType { _() } +val value_19 = 2345678.345678e00000000001 checkType { check() } // TESTCASE NUMBER: 20 -val value_20 = 34567.4_5__6___7E-100000000000 checkType { _() } +val value_20 = 34567.4_5__6___7E-100000000000 checkType { check() } // TESTCASE NUMBER: 21 -val value_21 = 456.5________6e-0 checkType { _() } +val value_21 = 456.5________6e-0 checkType { check() } // TESTCASE NUMBER: 22 -val value_22 = 5.65e000000000000 checkType { _() } +val value_22 = 5.65e000000000000 checkType { check() } // TESTCASE NUMBER: 23 -val value_23 = 654.7654E+0__1_0 checkType { _() } +val value_23 = 654.7654E+0__1_0 checkType { check() } // TESTCASE NUMBER: 24 -val value_24 = 76543.876543E1 checkType { _() } +val value_24 = 76543.876543E1 checkType { check() } // TESTCASE NUMBER: 25 -val value_25 = 8765432.98765432e-2 checkType { _() } +val value_25 = 8765432.98765432e-2 checkType { check() } // TESTCASE NUMBER: 26 -val value_26 = 9_8765432_1.0987654321E-3 checkType { _() } +val value_26 = 9_8765432_1.0987654321E-3 checkType { check() } // TESTCASE NUMBER: 27 -val value_27 = 0.111_1e4 checkType { _() } +val value_27 = 0.111_1e4 checkType { check() } // TESTCASE NUMBER: 28 -val value_28 = 1.2_2222E-5 checkType { _() } +val value_28 = 1.2_2222E-5 checkType { check() } // TESTCASE NUMBER: 29 -val value_29 = 9.33333e+6 checkType { _() } +val value_29 = 9.33333e+6 checkType { check() } // TESTCASE NUMBER: 30 -val value_30 = 9.444444E7 checkType { _() } +val value_30 = 9.444444E7 checkType { check() } // TESTCASE NUMBER: 31 -val value_31 = 8.5555555e8 checkType { _() } +val value_31 = 8.5555555e8 checkType { check() } // TESTCASE NUMBER: 32 -val value_32 = 2.66666666e3_0_8 checkType { _() } +val value_32 = 2.66666666e3_0_8 checkType { check() } // TESTCASE NUMBER: 33 -val value_33 = 3.7________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________77777777E-308 checkType { _() } +val value_33 = 3.7________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________77777777E-308 checkType { check() } // TESTCASE NUMBER: 34 -val value_34 = 7.8888888888e+30____9 checkType { _() } +val value_34 = 7.8888888888e+30____9 checkType { check() } // TESTCASE NUMBER: 35 -val value_35 = 6.99999999999e-309 checkType { _() } +val value_35 = 6.99999999999e-309 checkType { check() } // TESTCASE NUMBER: 36 -val value_36 = 7.888888___888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888e+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 checkType { _() } +val value_36 = 7.888888___888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888e+111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 checkType { check() } // TESTCASE NUMBER: 37 -val value_37 = 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000_0 checkType { _() } +val value_37 = 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000_0 checkType { check() } // TESTCASE NUMBER: 38 -val value_38 = 0.0_00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e-000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 checkType { _() } +val value_38 = 0.0_00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e-000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 checkType { check() } // TESTCASE NUMBER: 39 -val value_39 = 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e+000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 checkType { _() } +val value_39 = 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e+000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 checkType { check() } diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-5/pos/1.2.txt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-5/pos/1.2.txt similarity index 71% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-5/pos/1.2.txt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-5/pos/1.2.txt index d67893d4386..f1e1f8cd21e 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-5/pos/1.2.txt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-5/pos/1.2.txt @@ -39,3 +39,13 @@ public val value_6: kotlin.Unit public val value_7: kotlin.Unit public val value_8: kotlin.Unit public val value_9: kotlin.Unit +public fun checkSubtype(/*0*/ t: T): T +public fun Inv.check(): kotlin.Unit +public infix fun T.checkType(/*0*/ f: Inv.() -> kotlin.Unit): kotlin.Unit + +public final class Inv { + public constructor Inv() + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-5/pos/1.3.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-5/pos/1.3.kt similarity index 65% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-5/pos/1.3.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-5/pos/1.3.kt index f1dd72f903d..b9429a2a42e 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-5/pos/1.3.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-5/pos/1.3.kt @@ -1,97 +1,96 @@ -// !CHECK_TYPE - /* * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * * SPEC VERSION: 0.1-draft - * PLACE: constant-literals, real-literals -> paragraph 5 -> sentence 1 + * PLACE: 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 { _() } +val value_1 = .0 checkType { check() } // TESTCASE NUMBER: 2 -val value_2 = .00 checkType { _() } +val value_2 = .00 checkType { check() } // TESTCASE NUMBER: 3 -val value_3 = .000 checkType { _() } +val value_3 = .000 checkType { check() } // TESTCASE NUMBER: 4 -val value_4 = .0000 checkType { _() } +val value_4 = .0000 checkType { check() } // TESTCASE NUMBER: 5 -val value_5 = .1234567890 checkType { _() } +val value_5 = .1234567890 checkType { check() } // TESTCASE NUMBER: 6 -val value_6 = .23456789 checkType { _() } +val value_6 = .23456789 checkType { check() } // TESTCASE NUMBER: 7 -val value_7 = .345678 checkType { _() } +val value_7 = .345678 checkType { check() } // TESTCASE NUMBER: 8 -val value_8 = .4567 checkType { _() } +val value_8 = .4567 checkType { check() } // TESTCASE NUMBER: 9 -val value_9 = .56 checkType { _() } +val value_9 = .56 checkType { check() } // TESTCASE NUMBER: 10 -val value_10 = .65 checkType { _() } +val value_10 = .65 checkType { check() } // TESTCASE NUMBER: 11 -val value_11 = .7654 checkType { _() } +val value_11 = .7654 checkType { check() } // TESTCASE NUMBER: 12 -val value_12 = .876543 checkType { _() } +val value_12 = .876543 checkType { check() } // TESTCASE NUMBER: 13 -val value_13 = .98765432 checkType { _() } +val value_13 = .98765432 checkType { check() } // TESTCASE NUMBER: 14 -val value_14 = .0987654321 checkType { _() } +val value_14 = .0987654321 checkType { check() } // TESTCASE NUMBER: 15 -val value_15 = .1111 checkType { _() } +val value_15 = .1111 checkType { check() } // TESTCASE NUMBER: 16 -val value_16 = .22222 checkType { _() } +val value_16 = .22222 checkType { check() } // TESTCASE NUMBER: 17 -val value_17 = .33333 checkType { _() } +val value_17 = .33333 checkType { check() } // TESTCASE NUMBER: 18 -val value_18 = .444444 checkType { _() } +val value_18 = .444444 checkType { check() } // TESTCASE NUMBER: 19 -val value_19 = .5555555 checkType { _() } +val value_19 = .5555555 checkType { check() } // TESTCASE NUMBER: 20 -val value_20 = .66666666 checkType { _() } +val value_20 = .66666666 checkType { check() } // TESTCASE NUMBER: 21 -val value_21 = .777777777 checkType { _() } +val value_21 = .777777777 checkType { check() } // TESTCASE NUMBER: 22 -val value_22 = .8888888888 checkType { _() } +val value_22 = .8888888888 checkType { check() } // TESTCASE NUMBER: 23 -val value_23 = .99999999999 checkType { _() } +val value_23 = .99999999999 checkType { check() } // TESTCASE NUMBER: 24 -val value_24 = .00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001 checkType { _() } +val value_24 = .00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001 checkType { check() } // TESTCASE NUMBER: 25 -val value_25 = .000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001 checkType { _() } +val value_25 = .000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001 checkType { check() } // TESTCASE NUMBER: 26 -val value_26 = .0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000123456789012345678901234567890123456789012345678901234567890 checkType { _() } +val value_26 = .0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000123456789012345678901234567890123456789012345678901234567890 checkType { check() } // TESTCASE NUMBER: 27 -val value_27 = .44444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444441 checkType { _() } +val value_27 = .44444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444441 checkType { check() } // TESTCASE NUMBER: 28 -val value_28 = .777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777771 checkType { _() } +val value_28 = .777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777771 checkType { check() } // TESTCASE NUMBER: 29 -val value_29 = .9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999123456789912345678991234567899123456789912345678991234567899 checkType { _() } +val value_29 = .9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999123456789912345678991234567899123456789912345678991234567899 checkType { check() } diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-5/pos/1.3.txt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-5/pos/1.3.txt similarity index 64% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-5/pos/1.3.txt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-5/pos/1.3.txt index b03c2a487ec..e61e05a6b3d 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-5/pos/1.3.txt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-5/pos/1.3.txt @@ -29,3 +29,13 @@ public val value_6: kotlin.Unit public val value_7: kotlin.Unit public val value_8: kotlin.Unit public val value_9: kotlin.Unit +public fun checkSubtype(/*0*/ t: T): T +public fun Inv.check(): kotlin.Unit +public infix fun T.checkType(/*0*/ f: Inv.() -> kotlin.Unit): kotlin.Unit + +public final class Inv { + public constructor Inv() + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-5/pos/1.4.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-5/pos/1.4.kt similarity index 56% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-5/pos/1.4.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-5/pos/1.4.kt index 531ddfdeb58..89ce4c4c19b 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-5/pos/1.4.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-5/pos/1.4.kt @@ -1,100 +1,99 @@ -// !CHECK_TYPE - /* * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * * SPEC VERSION: 0.1-draft - * PLACE: constant-literals, real-literals -> paragraph 5 -> sentence 1 + * PLACE: 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 { _() } +val value_1 = .0e0 checkType { check() } // TESTCASE NUMBER: 2 -val value_2 = .0e-0__________________0 checkType { _() } +val value_2 = .0e-0__________________0 checkType { check() } // TESTCASE NUMBER: 3 -val value_3 = .0E000 checkType { _() } +val value_3 = .0E000 checkType { check() } // TESTCASE NUMBER: 4 -val value_4 = .0E+0___0__0_0 checkType { _() } +val value_4 = .0E+0___0__0_0 checkType { check() } // TESTCASE NUMBER: 5 -val value_5 = .0e+0 checkType { _() } +val value_5 = .0e+0 checkType { check() } // TESTCASE NUMBER: 6 -val value_6 = .0_______0e00 checkType { _() } +val value_6 = .0_______0e00 checkType { check() } // TESTCASE NUMBER: 7 -val value_7 = .00_0E-000 checkType { _() } +val value_7 = .00_0E-000 checkType { check() } // TESTCASE NUMBER: 8 -val value_8 = .0E+1 checkType { _() } +val value_8 = .0E+1 checkType { check() } // TESTCASE NUMBER: 9 -val value_9 = .00e22 checkType { _() } +val value_9 = .00e22 checkType { check() } // TESTCASE NUMBER: 10 -val value_10 = .000e-333 checkType { _() } +val value_10 = .000e-333 checkType { check() } // TESTCASE NUMBER: 12 -val value_12 = .0E-5_5_5_5_5 checkType { _() } +val value_12 = .0E-5_5_5_5_5 checkType { check() } // TESTCASE NUMBER: 15 -val value_15 = .0_0_0_0e-88888888 checkType { _() } +val value_15 = .0_0_0_0e-88888888 checkType { check() } // TESTCASE NUMBER: 19 -val value_19 = .345678e00000000001 checkType { _() } +val value_19 = .345678e00000000001 checkType { check() } // TESTCASE NUMBER: 20 -val value_20 = .4______567E-100000000000 checkType { _() } +val value_20 = .4______567E-100000000000 checkType { check() } // TESTCASE NUMBER: 21 -val value_21 = .5_6e-0 checkType { _() } +val value_21 = .5_6e-0 checkType { check() } // TESTCASE NUMBER: 22 -val value_22 = .65e000000000000 checkType { _() } +val value_22 = .65e000000000000 checkType { check() } // TESTCASE NUMBER: 23 -val value_23 = .7654E+01_____0 checkType { _() } +val value_23 = .7654E+01_____0 checkType { check() } // TESTCASE NUMBER: 24 -val value_24 = .87__65__43E1 checkType { _() } +val value_24 = .87__65__43E1 checkType { check() } // TESTCASE NUMBER: 25 -val value_25 = .98765432e-2 checkType { _() } +val value_25 = .98765432e-2 checkType { check() } // TESTCASE NUMBER: 26 -val value_26 = .0987654321E-3 checkType { _() } +val value_26 = .0987654321E-3 checkType { check() } // TESTCASE NUMBER: 27 -val value_27 = .1___1__1_1e4 checkType { _() } +val value_27 = .1___1__1_1e4 checkType { check() } // TESTCASE NUMBER: 28 -val value_28 = .22222E-5 checkType { _() } +val value_28 = .22222E-5 checkType { check() } // TESTCASE NUMBER: 29 -val value_29 = .33333e+6 checkType { _() } +val value_29 = .33333e+6 checkType { check() } // TESTCASE NUMBER: 30 -val value_30 = .44444_4E7 checkType { _() } +val value_30 = .44444_4E7 checkType { check() } // TESTCASE NUMBER: 31 -val value_31 = .5555555e8 checkType { _() } +val value_31 = .5555555e8 checkType { check() } // TESTCASE NUMBER: 33 -val value_33 = .7_77777777E-308 checkType { _() } +val value_33 = .7_77777777E-308 checkType { check() } // TESTCASE NUMBER: 35 -val value_35 = .99999999999e-3_0_9 checkType { _() } +val value_35 = .99999999999e-3_0_9 checkType { check() } // TESTCASE NUMBER: 37 -val value_37 = .0____00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 checkType { _() } +val value_37 = .0____00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 checkType { check() } // TESTCASE NUMBER: 38 -val value_38 = .000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e-00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000___0 checkType { _() } +val value_38 = .000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e-00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000___0 checkType { check() } // TESTCASE NUMBER: 39 -val value_39 = .000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e+000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 checkType { _() } +val value_39 = .000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000e+000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 checkType { check() } diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-5/pos/1.4.txt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-5/pos/1.4.txt similarity index 65% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-5/pos/1.4.txt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-5/pos/1.4.txt index 2e0ecb0f2e4..1c63ccdafc4 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-5/pos/1.4.txt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-5/pos/1.4.txt @@ -30,3 +30,13 @@ public val value_6: kotlin.Unit public val value_7: kotlin.Unit public val value_8: kotlin.Unit public val value_9: kotlin.Unit +public fun checkSubtype(/*0*/ t: T): T +public fun Inv.check(): kotlin.Unit +public infix fun T.checkType(/*0*/ f: Inv.() -> kotlin.Unit): kotlin.Unit + +public final class Inv { + public constructor Inv() + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-5/pos/1.5.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-5/pos/1.5.kt similarity index 51% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-5/pos/1.5.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-5/pos/1.5.kt index 6d748ec94d7..509d4eb8399 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-5/pos/1.5.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-5/pos/1.5.kt @@ -1,79 +1,78 @@ -// !CHECK_TYPE - /* * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * * SPEC VERSION: 0.1-draft - * PLACE: constant-literals, real-literals -> paragraph 5 -> sentence 1 + * PLACE: 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 { _() } +val value_1 = 0e0 checkType { check() } // TESTCASE NUMBER: 2 -val value_2 = 0_0e0_0 checkType { _() } +val value_2 = 0_0e0_0 checkType { check() } // TESTCASE NUMBER: 3 -val value_3 = 000E-10 checkType { _() } +val value_3 = 000E-10 checkType { check() } // TESTCASE NUMBER: 4 -val value_4 = 00______00e+00000000000 checkType { _() } +val value_4 = 00______00e+00000000000 checkType { check() } // TESTCASE NUMBER: 5 -val value_5 = 0000000000000000000000000000000000000_0E1 checkType { _() } +val value_5 = 0000000000000000000000000000000000000_0E1 checkType { check() } // TESTCASE NUMBER: 6 -val value_6 = 1e1 checkType { _() } +val value_6 = 1e1 checkType { check() } // TESTCASE NUMBER: 7 -val value_7 = 2___2E-1 checkType { _() } +val value_7 = 2___2E-1 checkType { check() } // TESTCASE NUMBER: 8 -val value_8 = 333e-00000000000 checkType { _() } +val value_8 = 333e-00000000000 checkType { check() } // TESTCASE NUMBER: 9 -val value_9 = 4444E-99999999999999999 checkType { _() } +val value_9 = 4444E-99999999999999999 checkType { check() } // TESTCASE NUMBER: 10 -val value_10 = 5_5_5_5_5e10 checkType { _() } +val value_10 = 5_5_5_5_5e10 checkType { check() } // TESTCASE NUMBER: 11 -val value_11 = 666666E0_0_0_1_0 checkType { _() } +val value_11 = 666666E0_0_0_1_0 checkType { check() } // TESTCASE NUMBER: 12 -val value_12 = 7777777e09090909090 checkType { _() } +val value_12 = 7777777e09090909090 checkType { check() } // TESTCASE NUMBER: 13 -val value_13 = 88888888e1234567890 checkType { _() } +val value_13 = 88888888e1234567890 checkType { check() } // TESTCASE NUMBER: 14 -val value_14 = 999999999E1234567890 checkType { _() } +val value_14 = 999999999E1234567890 checkType { check() } // TESTCASE NUMBER: 15 -val value_15 = 123456789e9_____87___654__32_1 checkType { _() } +val value_15 = 123456789e9_____87___654__32_1 checkType { check() } // TESTCASE NUMBER: 16 -val value_16 = 2345678E0 checkType { _() } +val value_16 = 2345678E0 checkType { check() } // TESTCASE NUMBER: 17 -val value_17 = 3____4___5__6_7E+010 checkType { _() } +val value_17 = 3____4___5__6_7E+010 checkType { check() } // TESTCASE NUMBER: 18 -val value_18 = 456e-09876543210 checkType { _() } +val value_18 = 456e-09876543210 checkType { check() } // TESTCASE NUMBER: 19 -val value_19 = 5e5_0_5 checkType { _() } +val value_19 = 5e5_0_5 checkType { check() } // TESTCASE NUMBER: 20 -val value_20 = 654e5 checkType { _() } +val value_20 = 654e5 checkType { check() } // TESTCASE NUMBER: 21 -val value_21 = 76543E-91823 checkType { _() } +val value_21 = 76543E-91823 checkType { check() } // TESTCASE NUMBER: 22 -val value_22 = 8765432e+9_______0 checkType { _() } +val value_22 = 8765432e+9_______0 checkType { check() } // TESTCASE NUMBER: 23 -val value_23 = 9_87654321e-1 checkType { _() } +val value_23 = 9_87654321e-1 checkType { check() } diff --git a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-5/pos/1.5.txt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-5/pos/1.5.txt similarity index 59% rename from compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-5/pos/1.5.txt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-5/pos/1.5.txt index 76ef490be4a..ff0ecf7a42a 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-5/pos/1.5.txt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-5/pos/1.5.txt @@ -23,3 +23,13 @@ public val value_6: kotlin.Unit public val value_7: kotlin.Unit public val value_8: kotlin.Unit public val value_9: kotlin.Unit +public fun checkSubtype(/*0*/ t: T): T +public fun Inv.check(): kotlin.Unit +public infix fun T.checkType(/*0*/ f: Inv.() -> kotlin.Unit): kotlin.Unit + +public final class Inv { + public constructor Inv() + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/testsMap.txt b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/testsMap.txt new file mode 100644 index 00000000000..3b5cf66fec4 --- /dev/null +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/testsMap.txt @@ -0,0 +1,24 @@ +/* + * This file is generated by {@link org.jetbrains.kotlin.spec.tasks.generateTests}. DO NOT MODIFY MANUALLY. + * This file is used in the HTML version of the Kotlin Specification (https://kotlin.github.io/kotlin-spec) to show tests coverage for sentences. + * + * Content format: + * + * {paragraphNumber} + * {testType: neg|pos}: {sentenceNumber}-{numberOfTests|testPathToAnotherSection}, ... + */ + +1 + pos: 1-2, 1-type-system/introduction/7/pos/1.1.kt, 3-2 + neg: 3-1, 1-1 +4 + neg: 2-3, 1-2 + pos: 1-5 +3 + neg: 2-1, 1-2 + pos: 2-3, 1-5 +2 + neg: 1-4 + pos: 1-2 +5 + pos: 1-5 diff --git a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/neg/1.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/1.1.kt similarity index 69% rename from compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/neg/1.1.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/1.1.kt index ce1605f3171..6926a1b984c 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/neg/1.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/1.1.kt @@ -1,10 +1,12 @@ +// SKIP_TXT + /* * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) * * SPEC VERSION: 0.1-draft - * PLACE: when-expression -> paragraph 11 -> sentence 1 + * PLACE: expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 1 * NUMBER: 1 - * DESCRIPTION: Checking for not exhaustive when without bound value when there is no else branch. + * DESCRIPTION: Non-exhaustive when, without bound value, without else branch. */ // TESTCASE NUMBER: 1 diff --git a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/neg/1.2.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/1.2.kt similarity index 71% rename from compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/neg/1.2.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/1.2.kt index b2969d2fff0..93673c8643e 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/neg/1.2.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/1.2.kt @@ -1,12 +1,13 @@ // !DIAGNOSTICS: -UNUSED_EXPRESSION +// SKIP_TXT /* * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) * * SPEC VERSION: 0.1-draft - * PLACE: when-expression -> paragraph 11 -> sentence 1 + * PLACE: expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 1 * NUMBER: 2 - * DESCRIPTION: Checking for not exhaustive when with bound value when there is no else branch. + * DESCRIPTION: Non-exhaustive when, with bound value, without else branch. */ // TESTCASE NUMBER: 1 diff --git a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/neg/3.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/3.1.kt similarity index 83% rename from compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/neg/3.1.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/3.1.kt index bf296c86c87..60cd453b4da 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/neg/3.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/3.1.kt @@ -1,12 +1,13 @@ // !DIAGNOSTICS: -UNUSED_EXPRESSION +// SKIP_TXT /* * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) * * SPEC VERSION: 0.1-draft - * PLACE: when-expression -> paragraph 11 -> sentence 3 + * PLACE: expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 3 * NUMBER: 1 - * DESCRIPTION: Checking for not exhaustive 'when' when not contains by all Boolean values or 'when' does not have bound value. + * DESCRIPTION: Non-exhaustive when using boolean values. */ // TESTCASE NUMBER: 1 diff --git a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/neg/6.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/6.1.kt similarity index 92% rename from compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/neg/6.1.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/6.1.kt index 9ed56f64cd3..2192920f453 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/neg/6.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/6.1.kt @@ -1,12 +1,13 @@ // !DIAGNOSTICS: -UNUSED_EXPRESSION +// SKIP_TXT /* * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) * * SPEC VERSION: 0.1-draft - * PLACE: when-expression -> paragraph 11 -> sentence 6 + * PLACE: expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 6 * NUMBER: 1 - * DESCRIPTION: Checking for not exhaustive 'when' when not covered by all possible subtypes or 'when' does not have bound value. + * DESCRIPTION: Non-exhaustive when using subclasses of the sealed class. * HELPERS: sealedClasses */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/neg/7.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/7.1.kt similarity index 89% rename from compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/neg/7.1.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/7.1.kt index 3b8ab62f3ab..fea8a75a418 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/neg/7.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/7.1.kt @@ -1,12 +1,13 @@ // !DIAGNOSTICS: -UNUSED_EXPRESSION +// SKIP_TXT /* * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) * * SPEC VERSION: 0.1-draft - * PLACE: when-expression -> paragraph 11 -> sentence 7 + * PLACE: expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 7 * NUMBER: 1 - * DESCRIPTION: Checking for not exhaustive when when not covered by all enumerated values. + * DESCRIPTION: Non-exhaustive when using enum values. * HELPERS: enumClasses */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/neg/8.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/8.1.kt similarity index 73% rename from compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/neg/8.1.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/8.1.kt index 6305bf73707..c4ad33f655f 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/neg/8.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/8.1.kt @@ -1,12 +1,13 @@ // !DIAGNOSTICS: -UNUSED_EXPRESSION +// SKIP_TXT /* * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) * * SPEC VERSION: 0.1-draft - * PLACE: when-expression -> paragraph 11 -> sentence 8 + * PLACE: expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 8 * NUMBER: 1 - * DESCRIPTION: Checking for not exhaustive 'when' on the nullable Boolean. + * DESCRIPTION: Non-exhaustive when using nullable boolean values. */ // TESTCASE NUMBER: 1 diff --git a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/neg/8.2.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/8.2.kt similarity index 91% rename from compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/neg/8.2.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/8.2.kt index 5ecd039986b..0e1a77b637f 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/neg/8.2.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/8.2.kt @@ -1,12 +1,13 @@ // !DIAGNOSTICS: -UNUSED_EXPRESSION +// SKIP_TXT /* * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) * * SPEC VERSION: 0.1-draft - * PLACE: when-expression -> paragraph 11 -> sentence 8 + * PLACE: expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 8 * NUMBER: 2 - * DESCRIPTION: Checking for not exhaustive 'when' on the nullable sealed classes (and several checks for not sealed). + * DESCRIPTION: Non-exhaustive when using subclasses of the nullable sealed class. * HELPERS: sealedClasses */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/neg/8.3.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/8.3.kt similarity index 86% rename from compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/neg/8.3.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/8.3.kt index 6bc8a5126e9..6a162430152 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/neg/8.3.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/8.3.kt @@ -1,12 +1,13 @@ // !DIAGNOSTICS: -UNUSED_EXPRESSION +// SKIP_TXT /* * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) * * SPEC VERSION: 0.1-draft - * PLACE: when-expression -> paragraph 11 -> sentence 8 + * PLACE: expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 8 * NUMBER: 3 - * DESCRIPTION: Checking for not exhaustive 'when' on the nullable enums. + * DESCRIPTION: Non-exhaustive when using nullable enum values. * HELPERS: enumClasses */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/pos/1.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/1.1.kt similarity index 71% rename from compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/pos/1.1.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/1.1.kt index 2fbf73d432c..ed968059d5b 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/pos/1.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/1.1.kt @@ -1,10 +1,12 @@ +// SKIP_TXT + /* * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * * SPEC VERSION: 0.1-draft - * PLACE: when-expression -> paragraph 11 -> sentence 1 + * PLACE: expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 1 * NUMBER: 1 - * DESCRIPTION: Check when exhaustive via else entry (when without bound value). + * DESCRIPTION: Exhaustive when, without bound value, with else branch. */ // TESTCASE NUMBER: 1 diff --git a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/pos/1.2.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/1.2.kt similarity index 77% rename from compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/pos/1.2.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/1.2.kt index 898fe94d1d3..bdc2e8bd08d 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/pos/1.2.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/1.2.kt @@ -1,12 +1,13 @@ // !DIAGNOSTICS: -UNUSED_EXPRESSION +// SKIP_TXT /* * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * * SPEC VERSION: 0.1-draft - * PLACE: when-expression -> paragraph 11 -> sentence 1 + * PLACE: expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 1 * NUMBER: 2 - * DESCRIPTION: Check when exhaustive via else entry (when with bound value). + * DESCRIPTION: Exhaustive when, with bound value, with else branch. */ // TESTCASE NUMBER: 1 diff --git a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/pos/1.3.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/1.3.kt similarity index 89% rename from compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/pos/1.3.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/1.3.kt index 1fee755ddd9..1bcb5663bde 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/pos/1.3.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/1.3.kt @@ -1,11 +1,12 @@ +// SKIP_TXT /* * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * * SPEC VERSION: 0.1-draft - * PLACE: when-expression -> paragraph 11 -> sentence 1 + * PLACE: expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 1 * NUMBER: 3 - * DESCRIPTION: Check when exhaustive via else entry (when with bound value, redundant else). + * DESCRIPTION: Exhaustive when, with bound value (sealed, enum, boolean), with redundant else branch. * HELPERS: enumClasses, sealedClasses */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/pos/3.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/3.1.kt similarity index 72% rename from compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/pos/3.1.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/3.1.kt index 5f890a47439..e5ee9438121 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/pos/3.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/3.1.kt @@ -1,10 +1,12 @@ +// SKIP_TXT + /* * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * * SPEC VERSION: 0.1-draft - * PLACE: when-expression -> paragraph 11 -> sentence 3 + * PLACE: expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 3 * NUMBER: 1 - * DESCRIPTION: Check when exhaustive via boolean bound value and evaluating to value true and false. + * DESCRIPTION: Exhaustive when using boolean values. */ // TESTCASE NUMBER: 1 diff --git a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/pos/6.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/6.1.kt similarity index 93% rename from compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/pos/6.1.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/6.1.kt index bd02d4c00d5..d2f82eb1457 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/pos/6.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/6.1.kt @@ -1,12 +1,13 @@ // !DIAGNOSTICS: -UNUSED_EXPRESSION +// SKIP_TXT /* * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * * SPEC VERSION: 0.1-draft - * PLACE: when-expression -> paragraph 11 -> sentence 6 + * PLACE: expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 6 * NUMBER: 1 - * DESCRIPTION: Check when exhaustive when possible subtypes of the sealed class are covered. + * DESCRIPTION: Exhaustive when using subclasses of the sealed class. * HELPERS: sealedClasses */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/pos/7.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/7.1.kt similarity index 72% rename from compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/pos/7.1.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/7.1.kt index b589cf3b1d7..6d0952d2109 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/pos/7.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/7.1.kt @@ -1,11 +1,12 @@ +// SKIP_TXT /* * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * * SPEC VERSION: 0.1-draft - * PLACE: when-expression -> paragraph 11 -> sentence 7 + * PLACE: expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 7 * NUMBER: 1 - * DESCRIPTION: Check when exhaustive when all enumerated values are checked. + * DESCRIPTION: Exhaustive when using enum values. * HELPERS: enumClasses */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/pos/8.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/8.1.kt similarity index 72% rename from compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/pos/8.1.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/8.1.kt index 9719e1146db..df6302a19ef 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/pos/8.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/8.1.kt @@ -1,10 +1,12 @@ +// SKIP_TXT + /* * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * * SPEC VERSION: 0.1-draft - * PLACE: when-expression -> paragraph 11 -> sentence 8 + * PLACE: expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 8 * NUMBER: 1 - * DESCRIPTION: Check when exhaustive when boolean values are checked and contains a null check. + * DESCRIPTION: Exhaustive when using nullable boolean values. */ // TESTCASE NUMBER: 1 diff --git a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/pos/8.2.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/8.2.kt similarity index 79% rename from compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/pos/8.2.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/8.2.kt index 8d1950b0d51..d9359ae5bce 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/pos/8.2.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/8.2.kt @@ -1,11 +1,12 @@ +// SKIP_TXT /* * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * * SPEC VERSION: 0.1-draft - * PLACE: when-expression -> paragraph 11 -> sentence 8 + * PLACE: expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 8 * NUMBER: 2 - * DESCRIPTION: Check when exhaustive when enumerated values are checked and contains a null check. + * DESCRIPTION: Exhaustive when using enum values. * HELPERS: enumClasses */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/pos/8.3.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/8.3.kt similarity index 91% rename from compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/pos/8.3.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/8.3.kt index a6398f68cec..6e19b91f57c 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/pos/8.3.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/8.3.kt @@ -1,11 +1,12 @@ +// SKIP_TXT /* * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * * SPEC VERSION: 0.1-draft - * PLACE: when-expression -> paragraph 11 -> sentence 8 + * PLACE: expressions, when-expression, exhaustive-when-expressions -> paragraph 2 -> sentence 8 * NUMBER: 3 - * DESCRIPTION: Check when exhaustive when possible subtypes of the sealed class are covered and contains a null check. + * DESCRIPTION: Exhaustive when using subclasses of the nullable sealed class. * HELPERS: sealedClasses */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/testsMap.txt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/testsMap.txt new file mode 100644 index 00000000000..ec9343d12d6 --- /dev/null +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/testsMap.txt @@ -0,0 +1,13 @@ +/* + * This file is generated by {@link org.jetbrains.kotlin.spec.tasks.generateTests}. DO NOT MODIFY MANUALLY. + * This file is used in the HTML version of the Kotlin Specification (https://kotlin.github.io/kotlin-spec) to show tests coverage for sentences. + * + * Content format: + * + * {paragraphNumber} + * {testType: neg|pos}: {sentenceNumber}-{numberOfTests|testPathToAnotherSection}, ... + */ + +2 + neg: 1-2, 3-1, 8-3, 6-1, 7-1 + pos: 1-3, 3-1, 8-3, 6-1, 7-1 diff --git a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-2/pos/3.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-2/pos/3.1.kt similarity index 60% rename from compiler/tests-spec/testData/diagnostics/linked/when-expression/p-2/pos/3.1.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-2/pos/3.1.kt index 403e9eb91aa..ee861aadca5 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-2/pos/3.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-2/pos/3.1.kt @@ -1,10 +1,12 @@ +// SKIP_TXT + /* * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * * SPEC VERSION: 0.1-draft - * PLACE: when-expression -> paragraph 2 -> sentence 3 + * PLACE: expressions, when-expression -> paragraph 2 -> sentence 3 * NUMBER: 1 - * DESCRIPTION: Empty 'when' with bound value. + * DESCRIPTION: Empty when with bound value. */ // TESTCASE NUMBER: 1 diff --git a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-2/pos/3.2.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-2/pos/3.2.kt similarity index 52% rename from compiler/tests-spec/testData/diagnostics/linked/when-expression/p-2/pos/3.2.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-2/pos/3.2.kt index 9399f92882b..6ca7cf89a91 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-2/pos/3.2.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-2/pos/3.2.kt @@ -1,10 +1,12 @@ +// SKIP_TXT + /* * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * * SPEC VERSION: 0.1-draft - * PLACE: when-expression -> paragraph 2 -> sentence 3 + * PLACE: expressions, when-expression -> paragraph 2 -> sentence 3 * NUMBER: 2 - * DESCRIPTION: Empty 'when' without bound value. + * DESCRIPTION: Empty when without bound value. */ // TESTCASE NUMBER: 1 diff --git a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-3/neg/1.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-3/neg/1.1.kt similarity index 72% rename from compiler/tests-spec/testData/diagnostics/linked/when-expression/p-3/neg/1.1.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-3/neg/1.1.kt index 1c7f277aee6..b166019fc01 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-3/neg/1.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-3/neg/1.1.kt @@ -1,10 +1,12 @@ +// SKIP_TXT + /* * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) * * SPEC VERSION: 0.1-draft - * PLACE: when-expression -> paragraph 3 -> sentence 1 + * PLACE: expressions, when-expression -> paragraph 3 -> sentence 1 * NUMBER: 1 - * DESCRIPTION: 'When' without bound value and not allowed break and continue expression (without labels) in the control structure body. + * DESCRIPTION: Forbidden break and continue in the control structure body of when. */ // TESTCASE NUMBER: 1 diff --git a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-3/neg/2.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-3/neg/2.1.kt similarity index 79% rename from compiler/tests-spec/testData/diagnostics/linked/when-expression/p-3/neg/2.1.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-3/neg/2.1.kt index e5c24891c54..df14b50f781 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-3/neg/2.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-3/neg/2.1.kt @@ -1,11 +1,12 @@ +// SKIP_TXT /* * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) * * SPEC VERSION: 0.1-draft - * PLACE: when-expression -> paragraph 3 -> sentence 2 + * PLACE: expressions, when-expression -> paragraph 3 -> sentence 2 * NUMBER: 1 - * DESCRIPTION: 'When' without bound value and with not boolean condition in 'when condition'. + * DESCRIPTION: When with non-boolean value in the when condition. * HELPERS: typesProvider */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-3/neg/2.2.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-3/neg/2.2.kt similarity index 83% rename from compiler/tests-spec/testData/diagnostics/linked/when-expression/p-3/neg/2.2.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-3/neg/2.2.kt index 63f52cb9973..828a19d3191 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-3/neg/2.2.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-3/neg/2.2.kt @@ -1,11 +1,12 @@ +// SKIP_TXT /* * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) * * SPEC VERSION: 0.1-draft - * PLACE: when-expression -> paragraph 3 -> sentence 2 + * PLACE: expressions, when-expression -> paragraph 3 -> sentence 2 * NUMBER: 2 - * DESCRIPTION: 'When' without bound value and not allowed comma in when entry. + * DESCRIPTION: When without bound value, forbidden comma in the when condition. * HELPERS: typesProvider, classes */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-3/pos/1.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-3/pos/1.1.kt similarity index 97% rename from compiler/tests-spec/testData/diagnostics/linked/when-expression/p-3/pos/1.1.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-3/pos/1.1.kt index 1b6828662cb..5857f0922ec 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-3/pos/1.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-3/pos/1.1.kt @@ -1,12 +1,13 @@ // !DIAGNOSTICS: -UNUSED_EXPRESSION -DEBUG_INFO_SMARTCAST +// SKIP_TXT /* * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * * SPEC VERSION: 0.1-draft - * PLACE: when-expression -> paragraph 3 -> sentence 1 + * PLACE: expressions, when-expression -> paragraph 3 -> sentence 1 * NUMBER: 1 - * DESCRIPTION: 'When' without bound value and with different variants of expressions in the control structure body. + * DESCRIPTION: When without bound value, various expressions in the control structure body. * HELPERS: typesProvider, classes, functions */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-3/pos/2.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-3/pos/2.1.kt similarity index 92% rename from compiler/tests-spec/testData/diagnostics/linked/when-expression/p-3/pos/2.1.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-3/pos/2.1.kt index 0052d41f123..0925994c9c6 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-3/pos/2.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-3/pos/2.1.kt @@ -1,11 +1,12 @@ +// SKIP_TXT /* * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * * SPEC VERSION: 0.1-draft - * PLACE: when-expression -> paragraph 3 -> sentence 2 + * PLACE: expressions, when-expression -> paragraph 3 -> sentence 2 * NUMBER: 1 - * DESCRIPTION: 'When' without bound value and different variants of the boolean conditions (logical, equality, comparison, type checking operator, containment operator). + * DESCRIPTION: When without bound value, various boolean values in the when condition. * HELPERS: typesProvider, enumClasses, sealedClasses, classes */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-3/pos/2.2.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-3/pos/2.2.kt similarity index 79% rename from compiler/tests-spec/testData/diagnostics/linked/when-expression/p-3/pos/2.2.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-3/pos/2.2.kt index 07a969ad2d9..15c4576c584 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-3/pos/2.2.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-3/pos/2.2.kt @@ -1,8 +1,10 @@ +// SKIP_TXT + /* * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * * SPEC VERSION: 0.1-draft - * PLACE: when-expression -> paragraph 3 -> sentence 2 + * PLACE: expressions, when-expression -> paragraph 3 -> sentence 2 * NUMBER: 2 * DESCRIPTION: 'When' without bound value and only one 'else' branch. */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-3/pos/2.3.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-3/pos/2.3.kt similarity index 97% rename from compiler/tests-spec/testData/diagnostics/linked/when-expression/p-3/pos/2.3.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-3/pos/2.3.kt index bf7b1891fd7..74a311c605c 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-3/pos/2.3.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-3/pos/2.3.kt @@ -1,9 +1,10 @@ +// SKIP_TXT /* * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * * SPEC VERSION: 0.1-draft - * PLACE: when-expression -> paragraph 3 -> sentence 2 + * PLACE: expressions, when-expression -> paragraph 3 -> sentence 2 * NUMBER: 3 * DESCRIPTION: 'When' without bound value and with Nothing in condition (subtype of Boolean). * DISCUSSION diff --git a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-5/neg/1.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-5/neg/1.1.kt similarity index 90% rename from compiler/tests-spec/testData/diagnostics/linked/when-expression/p-5/neg/1.1.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-5/neg/1.1.kt index c6a318a99cc..9b8a2dbeebe 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-5/neg/1.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-5/neg/1.1.kt @@ -1,8 +1,10 @@ +// SKIP_TXT + /* * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) * * SPEC VERSION: 0.1-draft - * PLACE: when-expression -> paragraph 5 -> sentence 1 + * PLACE: expressions, when-expression -> paragraph 5 -> sentence 1 * NUMBER: 1 * DESCRIPTION: 'When' without bound value and with 'else' branch not in the last position. */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-5/pos/1.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-5/pos/1.1.kt similarity index 85% rename from compiler/tests-spec/testData/diagnostics/linked/when-expression/p-5/pos/1.1.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-5/pos/1.1.kt index 6ac7938240d..3e703fb3844 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-5/pos/1.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-5/pos/1.1.kt @@ -1,8 +1,10 @@ +// SKIP_TXT + /* * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * * SPEC VERSION: 0.1-draft - * PLACE: when-expression -> paragraph 5 -> sentence 1 + * PLACE: expressions, when-expression -> paragraph 5 -> sentence 1 * NUMBER: 1 * DESCRIPTION: 'When' without bound value and with else branch in the last position. */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-6/neg/1.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg/1.1.kt similarity index 89% rename from compiler/tests-spec/testData/diagnostics/linked/when-expression/p-6/neg/1.1.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg/1.1.kt index ca412c37a60..af62f72dec1 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-6/neg/1.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg/1.1.kt @@ -1,8 +1,10 @@ +// SKIP_TXT + /* * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) * * SPEC VERSION: 0.1-draft - * PLACE: when-expression -> paragraph 6 -> sentence 1 + * PLACE: expressions, when-expression -> paragraph 6 -> sentence 1 * NUMBER: 1 * DESCRIPTION: 'When' with bound value and not allowed break and continue expression (without labels) in the control structure body. */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-6/pos/1.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/1.1.kt similarity index 98% rename from compiler/tests-spec/testData/diagnostics/linked/when-expression/p-6/pos/1.1.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/1.1.kt index 063eafbbc28..d9e3134c086 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-6/pos/1.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/1.1.kt @@ -1,10 +1,11 @@ // !DIAGNOSTICS: -UNUSED_EXPRESSION +// SKIP_TXT /* * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * * SPEC VERSION: 0.1-draft - * PLACE: when-expression -> paragraph 6 -> sentence 1 + * PLACE: expressions, when-expression -> paragraph 6 -> sentence 1 * NUMBER: 1 * DESCRIPTION: 'When' with bound value and with different variants of expressions in the control structure body. * HELPERS: typesProvider, classes, functions diff --git a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/neg/1.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/neg/1.1.kt similarity index 90% rename from compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/neg/1.1.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/neg/1.1.kt index b183421cba3..a2af8146578 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/neg/1.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/neg/1.1.kt @@ -1,9 +1,10 @@ +// SKIP_TXT /* * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) * * SPEC VERSION: 0.1-draft - * PLACE: when-expression -> paragraph 7 -> sentence 1 + * PLACE: expressions, when-expression -> paragraph 7 -> sentence 1 * NUMBER: 1 * DESCRIPTION: 'When' with bound value and type test condition (without companion object in classes), but without type checking operator. * HELPERS: classes diff --git a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/neg/1.2.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/neg/1.2.kt similarity index 84% rename from compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/neg/1.2.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/neg/1.2.kt index 57fab04ec7b..7fc4ad0a059 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/neg/1.2.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/neg/1.2.kt @@ -1,9 +1,10 @@ +// SKIP_TXT /* * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) * * SPEC VERSION: 0.1-draft - * PLACE: when-expression -> paragraph 7 -> sentence 1 + * PLACE: expressions, when-expression -> paragraph 7 -> sentence 1 * NUMBER: 2 * DESCRIPTION: 'When' with bound value and type test condition on the non-type operand of the type checking operator. * HELPERS: classes diff --git a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/neg/3.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/neg/3.1.kt similarity index 86% rename from compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/neg/3.1.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/neg/3.1.kt index 1dea19e83f4..1aaac4c87a8 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/neg/3.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/neg/3.1.kt @@ -1,9 +1,10 @@ +// SKIP_TXT /* * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) * * SPEC VERSION: 0.1-draft - * PLACE: when-expression -> paragraph 7 -> sentence 3 + * PLACE: expressions, when-expression -> paragraph 7 -> sentence 3 * NUMBER: 1 * DESCRIPTION: 'When' with bound value and 'when condition' with range expression, but without containment checking operator. * HELPERS: typesProvider diff --git a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/neg/3.2.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/neg/3.2.kt similarity index 93% rename from compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/neg/3.2.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/neg/3.2.kt index 75c9aa0480e..24889268703 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/neg/3.2.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/neg/3.2.kt @@ -1,10 +1,11 @@ // !DIAGNOSTICS: -UNUSED_EXPRESSION +// SKIP_TXT /* * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) * * SPEC VERSION: 0.1-draft - * PLACE: when-expression -> paragraph 7 -> sentence 3 + * PLACE: expressions, when-expression -> paragraph 7 -> sentence 3 * NUMBER: 2 * DESCRIPTION: 'When' with bound value and 'when condition' with contains operator and type without defined contains operator. * HELPERS: classes diff --git a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/neg/5.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/neg/5.1.kt similarity index 91% rename from compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/neg/5.1.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/neg/5.1.kt index f2989636fc0..41b74dae3de 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/neg/5.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/neg/5.1.kt @@ -1,10 +1,11 @@ // !DIAGNOSTICS: -UNUSED_VALUE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE +// SKIP_TXT /* * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) * * SPEC VERSION: 0.1-draft - * PLACE: when-expression -> paragraph 7 -> sentence 5 + * PLACE: expressions, when-expression -> paragraph 7 -> sentence 5 * NUMBER: 1 * DESCRIPTION: 'When' with bound value and non-expressions in 'when condition'. */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/neg/5.2.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/neg/5.2.kt similarity index 90% rename from compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/neg/5.2.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/neg/5.2.kt index 7a419e49f13..3d4b642a5c6 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/neg/5.2.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/neg/5.2.kt @@ -1,8 +1,10 @@ +// SKIP_TXT + /* * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) * * SPEC VERSION: 0.1-draft - * PLACE: when-expression -> paragraph 7 -> sentence 5 + * PLACE: expressions, when-expression -> paragraph 7 -> sentence 5 * NUMBER: 2 * DESCRIPTION: 'When' with bound value and not allowed break and continue expression (without labels) in 'when condition'. */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/neg/7.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/neg/7.1.kt similarity index 90% rename from compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/neg/7.1.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/neg/7.1.kt index b8b64c1a45a..4143633f708 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/neg/7.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/neg/7.1.kt @@ -1,10 +1,11 @@ // !DIAGNOSTICS: -UNUSED_EXPRESSION +// SKIP_TXT /* * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) * * SPEC VERSION: 0.1-draft - * PLACE: when-expression -> paragraph 7 -> sentence 7 + * PLACE: expressions, when-expression -> paragraph 7 -> sentence 7 * NUMBER: 1 * DESCRIPTION: 'When' with bound value and with else branch not in the last position. */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/pos/1.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/pos/1.1.kt similarity index 94% rename from compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/pos/1.1.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/pos/1.1.kt index 5939c5ff633..af3df5a06fc 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/pos/1.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/pos/1.1.kt @@ -1,9 +1,10 @@ +// SKIP_TXT /* * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * * SPEC VERSION: 0.1-draft - * PLACE: when-expression -> paragraph 7 -> sentence 1 + * PLACE: expressions, when-expression -> paragraph 7 -> sentence 1 * NUMBER: 1 * DESCRIPTION: 'When' with bound value and type test condition. * HELPERS: classes, objects diff --git a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/pos/1.2.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/pos/1.2.kt similarity index 94% rename from compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/pos/1.2.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/pos/1.2.kt index cb78aa13793..9b153920795 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/pos/1.2.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/pos/1.2.kt @@ -1,9 +1,10 @@ +// SKIP_TXT /* * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * * SPEC VERSION: 0.1-draft - * PLACE: when-expression -> paragraph 7 -> sentence 1 + * PLACE: expressions, when-expression -> paragraph 7 -> sentence 1 * NUMBER: 2 * DESCRIPTION: 'When' with bound value and type test condition (invert type checking operator). * HELPERS: classes, sealedClasses, objects diff --git a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/pos/1.3.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/pos/1.3.kt similarity index 95% rename from compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/pos/1.3.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/pos/1.3.kt index f80a65176b6..17160bb6dc5 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/pos/1.3.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/pos/1.3.kt @@ -1,9 +1,10 @@ +// SKIP_TXT /* * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * * SPEC VERSION: 0.1-draft - * PLACE: when-expression -> paragraph 7 -> sentence 1 + * PLACE: expressions, when-expression -> paragraph 7 -> sentence 1 * NUMBER: 3 * DESCRIPTION: 'When' with bound value and enumaration of type test conditions. * HELPERS: classes, sealedClasses, objects diff --git a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/pos/1.4.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/pos/1.4.kt similarity index 94% rename from compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/pos/1.4.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/pos/1.4.kt index f954141f876..0b9ff84b743 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/pos/1.4.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/pos/1.4.kt @@ -1,9 +1,10 @@ +// SKIP_TXT /* * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * * SPEC VERSION: 0.1-draft - * PLACE: when-expression -> paragraph 7 -> sentence 1 + * PLACE: expressions, when-expression -> paragraph 7 -> sentence 1 * NUMBER: 4 * DESCRIPTION: 'When' with bound value and enumaration of type test conditions (with invert type checking operator). * HELPERS: sealedClasses diff --git a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/pos/3.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/pos/3.1.kt similarity index 89% rename from compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/pos/3.1.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/pos/3.1.kt index 3885f4b6531..792bec03029 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/pos/3.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/pos/3.1.kt @@ -1,9 +1,10 @@ +// SKIP_TXT /* * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * * SPEC VERSION: 0.1-draft - * PLACE: when-expression -> paragraph 7 -> sentence 3 + * PLACE: expressions, when-expression -> paragraph 7 -> sentence 3 * NUMBER: 1 * DESCRIPTION: 'When' with bound value and containment operator. * HELPERS: typesProvider, classes diff --git a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/pos/3.2.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/pos/3.2.kt similarity index 89% rename from compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/pos/3.2.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/pos/3.2.kt index ed884d37a64..bbdcaf742d7 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/pos/3.2.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/pos/3.2.kt @@ -1,9 +1,10 @@ +// SKIP_TXT /* * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * * SPEC VERSION: 0.1-draft - * PLACE: when-expression -> paragraph 7 -> sentence 3 + * PLACE: expressions, when-expression -> paragraph 7 -> sentence 3 * NUMBER: 2 * DESCRIPTION: 'When' with bound value and enumeration of the containment operators. * HELPERS: typesProvider, classes diff --git a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/pos/5.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/pos/5.1.kt similarity index 98% rename from compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/pos/5.1.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/pos/5.1.kt index c74793fb31b..26daed597ce 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/pos/5.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/pos/5.1.kt @@ -1,9 +1,10 @@ +// SKIP_TXT /* * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * * SPEC VERSION: 0.1-draft - * PLACE: when-expression -> paragraph 7 -> sentence 5 + * PLACE: expressions, when-expression -> paragraph 7 -> sentence 5 * NUMBER: 1 * DESCRIPTION: 'When' with enumeration of the different variants of expressions in 'when condition'. * HELPERS: typesProvider, classes, functions diff --git a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/pos/5.2.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/pos/5.2.kt similarity index 98% rename from compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/pos/5.2.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/pos/5.2.kt index 5309f7fec55..1fe15a845f0 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/pos/5.2.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/pos/5.2.kt @@ -1,9 +1,10 @@ +// SKIP_TXT /* * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * * SPEC VERSION: 0.1-draft - * PLACE: when-expression -> paragraph 7 -> sentence 5 + * PLACE: expressions, when-expression -> paragraph 7 -> sentence 5 * NUMBER: 2 * DESCRIPTION: 'When' with different variants of the arithmetic expressions (additive expression and multiplicative expression) in 'when condition'. * HELPERS: typesProvider, classes, functions diff --git a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/pos/7.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/pos/7.1.kt similarity index 89% rename from compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/pos/7.1.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/pos/7.1.kt index 99c6bb4ebfa..c449e5698c5 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/pos/7.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/pos/7.1.kt @@ -2,7 +2,7 @@ * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * * SPEC VERSION: 0.1-draft - * PLACE: when-expression -> paragraph 7 -> sentence 7 + * PLACE: expressions, when-expression -> paragraph 7 -> sentence 7 * NUMBER: 1 * DESCRIPTION: 'When' with bound value and else branch. */ diff --git a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-9/neg/1.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-9/neg/1.1.kt similarity index 66% rename from compiler/tests-spec/testData/diagnostics/linked/when-expression/p-9/neg/1.1.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-9/neg/1.1.kt index f19584f8bf8..70f5361e965 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-9/neg/1.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-9/neg/1.1.kt @@ -1,13 +1,13 @@ -// !CHECK_TYPE +// SKIP_TXT /* * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) * * SPEC VERSION: 0.1-draft - * PLACE: when-expression -> paragraph 9 -> sentence 1 + * PLACE: expressions, when-expression -> paragraph 9 -> sentence 1 * NUMBER: 1 * DESCRIPTION: 'When' least upper bound of the types check (when exhaustive via else branch). - * HELPERS: classes + * HELPERS: classes, checkType */ // TESTCASE NUMBER: 1 @@ -19,10 +19,10 @@ fun case_1(value_1: Int): String { else -> ClassLevel5() } - whenValue checkType { _() } - whenValue checkType { _() } - whenValue checkType { _() } - whenValue checkType { _() } + whenValue checkType { check() } + whenValue checkType { check() } + whenValue checkType { check() } + whenValue checkType { check() } checkSubtype(whenValue) checkSubtype(whenValue) checkSubtype(whenValue) @@ -39,10 +39,10 @@ fun case_2(value_1: Int): String { else -> ClassLevel5() } - whenValue checkType { _() } - whenValue checkType { _() } - whenValue checkType { _() } - whenValue checkType { _() } + whenValue checkType { check() } + whenValue checkType { check() } + whenValue checkType { check() } + whenValue checkType { check() } checkSubtype(whenValue) checkSubtype(whenValue) checkSubtype(whenValue) @@ -61,12 +61,12 @@ fun case_3(value_1: Int): String { else -> 1 + 10.toByte() } - whenValue checkType { _() } - whenValue checkType { _() } - whenValue checkType { _() } - whenValue checkType { _() } - whenValue checkType { _() } - whenValue checkType { _() } + whenValue checkType { check() } + whenValue checkType { check() } + whenValue checkType { check() } + whenValue checkType { check() } + whenValue checkType { check() } + whenValue checkType { check() } checkSubtype(whenValue) checkSubtype(whenValue) checkSubtype(whenValue) @@ -88,12 +88,12 @@ fun case_4(value_1: Int): String { else -> 1 + 10.toByte() } - whenValue checkType { _() } - whenValue checkType { _() } - whenValue checkType { _() } - whenValue checkType { _() } - whenValue checkType { _() } - whenValue checkType { _() } + whenValue checkType { check() } + whenValue checkType { check() } + whenValue checkType { check() } + whenValue checkType { check() } + whenValue checkType { check() } + whenValue checkType { check() } checkSubtype(whenValue) checkSubtype(whenValue) checkSubtype(whenValue) @@ -113,9 +113,9 @@ fun case_5(value_1: Int): String { else -> object {} } - whenValue checkType { _() } - whenValue checkType { _() } - whenValue checkType { _<() -> Unit>() } + whenValue checkType { check() } + whenValue checkType { check() } + whenValue checkType { check<() -> Unit>() } checkSubtype(whenValue) checkSubtype(whenValue) checkSubtype<() -> Unit>(whenValue) @@ -132,9 +132,9 @@ fun case_6(value_1: Int): String { else -> object {} } - whenValue checkType { _() } - whenValue checkType { _() } - whenValue checkType { _<() -> Unit>() } + whenValue checkType { check() } + whenValue checkType { check() } + whenValue checkType { check<() -> Unit>() } checkSubtype(whenValue) checkSubtype(whenValue) checkSubtype<() -> Unit>(whenValue) diff --git a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-9/neg/1.2.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-9/neg/1.2.kt similarity index 67% rename from compiler/tests-spec/testData/diagnostics/linked/when-expression/p-9/neg/1.2.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-9/neg/1.2.kt index be0e17f4a95..9fd5cc86d65 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-9/neg/1.2.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-9/neg/1.2.kt @@ -1,13 +1,13 @@ -// !CHECK_TYPE +// SKIP_TXT /* * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) * * SPEC VERSION: 0.1-draft - * PLACE: when-expression -> paragraph 9 -> sentence 1 + * PLACE: expressions, when-expression -> paragraph 9 -> sentence 1 * NUMBER: 2 * DESCRIPTION: 'When' least upper bound of the types check (when exhaustive via enum). - * HELPERS: classes, enumClasses + * HELPERS: classes, enumClasses, checkType */ // TESTCASE NUMBER: 1 @@ -19,10 +19,10 @@ fun case_1(value_1: EnumClass): String { EnumClass.WEST -> ClassLevel5() } - whenValue checkType { _() } - whenValue checkType { _() } - whenValue checkType { _() } - whenValue checkType { _() } + whenValue checkType { check() } + whenValue checkType { check() } + whenValue checkType { check() } + whenValue checkType { check() } checkSubtype(whenValue) checkSubtype(whenValue) checkSubtype(whenValue) @@ -40,11 +40,11 @@ fun case_2(value_1: EnumClass?): String { null -> ClassLevel6() } - whenValue checkType { _() } - whenValue checkType { _() } - whenValue checkType { _() } - whenValue checkType { _() } - whenValue checkType { _() } + whenValue checkType { check() } + whenValue checkType { check() } + whenValue checkType { check() } + whenValue checkType { check() } + whenValue checkType { check() } checkSubtype(whenValue) checkSubtype(whenValue) checkSubtype(whenValue) @@ -62,9 +62,9 @@ fun case_3(value_1: EnumClass): String { EnumClass.WEST -> object {} } - whenValue checkType { _() } - whenValue checkType { _() } - whenValue checkType { _<() -> Unit>() } + whenValue checkType { check() } + whenValue checkType { check() } + whenValue checkType { check<() -> Unit>() } checkSubtype(whenValue) checkSubtype(whenValue) checkSubtype<() -> Unit>(whenValue) @@ -82,9 +82,9 @@ fun case_4(value_1: EnumClass?): String { null -> false } - whenValue checkType { _() } - whenValue checkType { _() } - whenValue checkType { _<() -> Unit>() } + whenValue checkType { check() } + whenValue checkType { check() } + whenValue checkType { check<() -> Unit>() } checkSubtype(whenValue) checkSubtype(whenValue) checkSubtype<() -> Unit>(whenValue) diff --git a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-9/neg/1.3.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-9/neg/1.3.kt similarity index 65% rename from compiler/tests-spec/testData/diagnostics/linked/when-expression/p-9/neg/1.3.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-9/neg/1.3.kt index e7816cdd3f1..980b8c651db 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-9/neg/1.3.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-9/neg/1.3.kt @@ -1,13 +1,13 @@ -// !CHECK_TYPE +// SKIP_TXT /* * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) * * SPEC VERSION: 0.1-draft - * PLACE: when-expression -> paragraph 9 -> sentence 1 + * PLACE: expressions, when-expression -> paragraph 9 -> sentence 1 * NUMBER: 3 * DESCRIPTION: 'When' least upper bound of the types check (when exhaustive via boolean bound value). - * HELPERS: classes + * HELPERS: classes, checkType */ // TESTCASE NUMBER: 1 @@ -17,9 +17,9 @@ fun case_1(value_1: Boolean): String { false -> ClassLevel3() } - whenValue checkType { _() } - whenValue checkType { _() } - whenValue checkType { _() } + whenValue checkType { check() } + whenValue checkType { check() } + whenValue checkType { check() } checkSubtype(whenValue) checkSubtype(whenValue) @@ -34,9 +34,9 @@ fun case_2(value_1: Boolean?): String { null -> ClassLevel4() } - whenValue checkType { _() } - whenValue checkType { _() } - whenValue checkType { _() } + whenValue checkType { check() } + whenValue checkType { check() } + whenValue checkType { check() } checkSubtype(whenValue) checkSubtype(whenValue) @@ -50,8 +50,8 @@ fun case_3(value_1: Boolean): String { false -> "" } - whenValue checkType { _() } - whenValue checkType { _() } + whenValue checkType { check() } + whenValue checkType { check() } checkSubtype(whenValue) checkSubtype(whenValue) @@ -67,9 +67,9 @@ fun case_4(value_1: Boolean?): String { } - whenValue checkType { _() } - whenValue checkType { _() } - whenValue checkType { _<() -> Unit>() } + whenValue checkType { check() } + whenValue checkType { check() } + whenValue checkType { check<() -> Unit>() } checkSubtype(whenValue) checkSubtype(whenValue) checkSubtype<() -> Unit>(whenValue) diff --git a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-9/neg/1.4.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-9/neg/1.4.kt similarity index 68% rename from compiler/tests-spec/testData/diagnostics/linked/when-expression/p-9/neg/1.4.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-9/neg/1.4.kt index f5eacd6ef15..3c4c5b4527a 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-9/neg/1.4.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-9/neg/1.4.kt @@ -1,13 +1,13 @@ -// !CHECK_TYPE +// SKIP_TXT /* * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) * * SPEC VERSION: 0.1-draft - * PLACE: when-expression -> paragraph 9 -> sentence 1 + * PLACE: expressions, when-expression -> paragraph 9 -> sentence 1 * NUMBER: 4 * DESCRIPTION: 'When' least upper bound of the types check (when exhaustive via sealed class). - * HELPERS: classes, sealedClasses + * HELPERS: classes, sealedClasses, checkType */ // TESTCASE NUMBER: 1 @@ -18,9 +18,9 @@ fun case_1(value_1: SealedClass): String { is SealedChild3 -> ClassLevel4() } - whenValue checkType { _() } - whenValue checkType { _() } - whenValue checkType { _() } + whenValue checkType { check() } + whenValue checkType { check() } + whenValue checkType { check() } checkSubtype(whenValue) checkSubtype(whenValue) @@ -36,10 +36,10 @@ fun case_2(value_1: SealedClass?): String { null -> ClassLevel5() } - whenValue checkType { _() } - whenValue checkType { _() } - whenValue checkType { _() } - whenValue checkType { _() } + whenValue checkType { check() } + whenValue checkType { check() } + whenValue checkType { check() } + whenValue checkType { check() } checkSubtype(whenValue) checkSubtype(whenValue) checkSubtype(whenValue) @@ -55,8 +55,8 @@ fun case_3(value_1: SealedClass): String { is SealedChild3 -> object {} } - whenValue checkType { _() } - whenValue checkType { _() } + whenValue checkType { check() } + whenValue checkType { check() } checkSubtype(whenValue) checkSubtype(whenValue) @@ -72,9 +72,9 @@ fun case_4(value_1: SealedClass?): String { null -> {{}} } - whenValue checkType { _() } - whenValue checkType { _() } - whenValue checkType { _<() -> Unit>() } + whenValue checkType { check() } + whenValue checkType { check() } + whenValue checkType { check<() -> Unit>() } checkSubtype(whenValue) checkSubtype(whenValue) checkSubtype<() -> Unit>(whenValue) @@ -90,9 +90,9 @@ fun case_5(value_1: SealedClassWithObjects): String { SealedWithObjectsChild3 -> ClassLevel4() } - whenValue checkType { _() } - whenValue checkType { _() } - whenValue checkType { _() } + whenValue checkType { check() } + whenValue checkType { check() } + whenValue checkType { check() } checkSubtype(whenValue) checkSubtype(whenValue) @@ -108,10 +108,10 @@ fun case_6(value_1: SealedClassWithObjects?): String { null -> ClassLevel5() } - whenValue checkType { _() } - whenValue checkType { _() } - whenValue checkType { _() } - whenValue checkType { _() } + whenValue checkType { check() } + whenValue checkType { check() } + whenValue checkType { check() } + whenValue checkType { check() } checkSubtype(whenValue) checkSubtype(whenValue) checkSubtype(whenValue) @@ -127,8 +127,8 @@ fun case_7(value_1: SealedClassWithObjects): String { SealedWithObjectsChild3 -> object {} } - whenValue checkType { _() } - whenValue checkType { _() } + whenValue checkType { check() } + whenValue checkType { check() } checkSubtype(whenValue) checkSubtype(whenValue) @@ -144,9 +144,9 @@ fun case_8(value_1: SealedClassWithObjects?): String { null -> {{}} } - whenValue checkType { _() } - whenValue checkType { _() } - whenValue checkType { _<() -> Unit>() } + whenValue checkType { check() } + whenValue checkType { check() } + whenValue checkType { check<() -> Unit>() } checkSubtype(whenValue) checkSubtype(whenValue) checkSubtype<() -> Unit>(whenValue) @@ -161,10 +161,10 @@ fun case_9(value_1: SealedClassWithObjects?): String { else -> ClassLevel3() } - whenValue checkType { _() } - whenValue checkType { _() } - whenValue checkType { _() } - whenValue checkType { _() } + whenValue checkType { check() } + whenValue checkType { check() } + whenValue checkType { check() } + whenValue checkType { check() } checkSubtype(whenValue) checkSubtype(whenValue) checkSubtype(whenValue) diff --git a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-9/pos/1.1.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-9/pos/1.1.kt similarity index 82% rename from compiler/tests-spec/testData/diagnostics/linked/when-expression/p-9/pos/1.1.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-9/pos/1.1.kt index ddcf4845a46..c5ac82d3864 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-9/pos/1.1.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-9/pos/1.1.kt @@ -1,13 +1,13 @@ -// !CHECK_TYPE +// SKIP_TXT /* * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * * SPEC VERSION: 0.1-draft - * PLACE: when-expression -> paragraph 9 -> sentence 1 + * PLACE: expressions, when-expression -> paragraph 9 -> sentence 1 * NUMBER: 1 * DESCRIPTION: 'When' least upper bound of the types check (when exhaustive via else branch). - * HELPERS: classes + * HELPERS: classes, checkType */ // TESTCASE NUMBER: 1 @@ -19,7 +19,7 @@ fun case_1(value_1: Int): String { else -> ClassLevel5() } - whenValue checkType { _() } + whenValue checkType { check() } checkSubtype(whenValue) return "" @@ -34,7 +34,7 @@ fun case_2(value_1: Int): String { else -> ClassLevel5() } - whenValue checkType { _() } + whenValue checkType { check() } checkSubtype(whenValue) return "" @@ -55,8 +55,8 @@ fun case_3(value_1: Int): String { else -> 1 + 10.toShort() } - whenValue checkType { _() } - whenValue checkType { _() } // unexpected behaviour! + whenValue checkType { check() } + whenValue checkType { check() } // unexpected behaviour! checkSubtype(whenValue) // unexpected behaviour! return "" @@ -77,8 +77,8 @@ fun case_4(value_1: Int): String { else -> 1 + 10.toByte() } - whenValue checkType { _() } - whenValue checkType { _() } // unexpected behaviour! + whenValue checkType { check() } + whenValue checkType { check() } // unexpected behaviour! checkSubtype(whenValue) // unexpected behaviour! return "" @@ -93,7 +93,7 @@ fun case_5(value_1: Int): String { else -> object {} } - whenValue checkType { _() } + whenValue checkType { check() } checkSubtype(whenValue) return "" @@ -108,7 +108,7 @@ fun case_6(value_1: Int): String { else -> object {} } - whenValue checkType { _() } + whenValue checkType { check() } checkSubtype(whenValue) return "" diff --git a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-9/pos/1.2.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-9/pos/1.2.kt similarity index 84% rename from compiler/tests-spec/testData/diagnostics/linked/when-expression/p-9/pos/1.2.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-9/pos/1.2.kt index f695692fb87..c104b11d621 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-9/pos/1.2.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-9/pos/1.2.kt @@ -1,13 +1,13 @@ -// !CHECK_TYPE +// SKIP_TXT /* * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * * SPEC VERSION: 0.1-draft - * PLACE: when-expression -> paragraph 9 -> sentence 1 + * PLACE: expressions, when-expression -> paragraph 9 -> sentence 1 * NUMBER: 2 * DESCRIPTION: 'When' least upper bound of the types check (when exhaustive via enum). - * HELPERS: classes, enumClasses + * HELPERS: classes, enumClasses, checkType */ // TESTCASE NUMBER: 1 @@ -19,7 +19,7 @@ fun case_1(value_1: EnumClass): String { EnumClass.WEST -> ClassLevel5() } - whenValue checkType { _() } + whenValue checkType { check() } checkSubtype(whenValue) return "" @@ -35,7 +35,7 @@ fun case_2(value_1: EnumClass?): String { null -> ClassLevel6() } - whenValue checkType { _() } + whenValue checkType { check() } checkSubtype(whenValue) return "" @@ -50,7 +50,7 @@ fun case_3(value_1: EnumClass): String { EnumClass.WEST -> object {} } - whenValue checkType { _() } + whenValue checkType { check() } checkSubtype(whenValue) return "" @@ -66,7 +66,7 @@ fun case_4(value_1: EnumClass?): String { null -> false } - whenValue checkType { _() } + whenValue checkType { check() } checkSubtype(whenValue) return "" diff --git a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-9/pos/1.3.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-9/pos/1.3.kt similarity index 81% rename from compiler/tests-spec/testData/diagnostics/linked/when-expression/p-9/pos/1.3.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-9/pos/1.3.kt index a0db2b01c74..225328ce9d0 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-9/pos/1.3.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-9/pos/1.3.kt @@ -1,13 +1,13 @@ -// !CHECK_TYPE +// SKIP_TXT /* * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * * SPEC VERSION: 0.1-draft - * PLACE: when-expression -> paragraph 9 -> sentence 1 + * PLACE: expressions, when-expression -> paragraph 9 -> sentence 1 * NUMBER: 3 * DESCRIPTION: 'When' least upper bound of the types check (when exhaustive via boolean bound value). - * HELPERS: classes + * HELPERS: classes, checkType */ // TESTCASE NUMBER: 1 @@ -17,7 +17,7 @@ fun case_1(value_1: Boolean): String { false -> ClassLevel3() } - whenValue checkType { _() } + whenValue checkType { check() } checkSubtype(whenValue) return "" @@ -31,7 +31,7 @@ fun case_2(value_1: Boolean?): String { null -> ClassLevel4() } - whenValue checkType { _() } + whenValue checkType { check() } checkSubtype(whenValue) return "" @@ -45,7 +45,7 @@ fun case_3(value_1: Boolean): String { false -> object {} } - whenValue checkType { _() } + whenValue checkType { check() } checkSubtype(whenValue) return "" @@ -60,7 +60,7 @@ fun case_4(value_1: Boolean?): String { null -> object {} } - whenValue checkType { _() } + whenValue checkType { check() } checkSubtype(whenValue) return "" diff --git a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-9/pos/1.4.kt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-9/pos/1.4.kt similarity index 86% rename from compiler/tests-spec/testData/diagnostics/linked/when-expression/p-9/pos/1.4.kt rename to compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-9/pos/1.4.kt index 38225b1e647..6ec103f22f2 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/when-expression/p-9/pos/1.4.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-9/pos/1.4.kt @@ -1,13 +1,13 @@ -// !CHECK_TYPE +// SKIP_TXT /* * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) * * SPEC VERSION: 0.1-draft - * PLACE: when-expression -> paragraph 9 -> sentence 1 + * PLACE: expressions, when-expression -> paragraph 9 -> sentence 1 * NUMBER: 4 * DESCRIPTION: 'When' least upper bound of the types check (when exhaustive via sealed class). - * HELPERS: classes, sealedClasses + * HELPERS: classes, sealedClasses, checkType */ // TESTCASE NUMBER: 1 @@ -18,7 +18,7 @@ fun case_1(value_1: SealedClass): String { is SealedChild3 -> ClassLevel4() } - whenValue checkType { _() } + whenValue checkType { check() } checkSubtype(whenValue) return "" @@ -33,7 +33,7 @@ fun case_2(value_1: SealedClass?): String { null -> ClassLevel5() } - whenValue checkType { _() } + whenValue checkType { check() } checkSubtype(whenValue) return "" @@ -47,7 +47,7 @@ fun case_3(value_1: SealedClass): String { is SealedChild3 -> object {} } - whenValue checkType { _() } + whenValue checkType { check() } checkSubtype(whenValue) return "" @@ -62,7 +62,7 @@ fun case_4(value_1: SealedClass?): String { null -> {{}} } - whenValue checkType { _() } + whenValue checkType { check() } checkSubtype(whenValue) return "" @@ -76,7 +76,7 @@ fun case_5(value_1: SealedClassWithObjects): String { SealedWithObjectsChild3 -> ClassLevel4() } - whenValue checkType { _() } + whenValue checkType { check() } checkSubtype(whenValue) return "" @@ -91,7 +91,7 @@ fun case_6(value_1: SealedClassWithObjects?): String { null -> ClassLevel5() } - whenValue checkType { _() } + whenValue checkType { check() } checkSubtype(whenValue) return "" @@ -105,7 +105,7 @@ fun case_7(value_1: SealedClassWithObjects): String { SealedWithObjectsChild3 -> object {} } - whenValue checkType { _() } + whenValue checkType { check() } checkSubtype(whenValue) return "" @@ -120,7 +120,7 @@ fun case_8(value_1: SealedClassWithObjects?): String { null -> {{}} } - whenValue checkType { _() } + whenValue checkType { check() } checkSubtype(whenValue) return "" @@ -132,7 +132,7 @@ fun case_9(value_1: SealedClassWithObjects): String { is SealedClassWithObjects -> 10 } - whenValue checkType { _() } + whenValue checkType { check() } checkSubtype(whenValue) return "" diff --git a/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/testsMap.txt b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/testsMap.txt new file mode 100644 index 00000000000..73924e9cb46 --- /dev/null +++ b/compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/testsMap.txt @@ -0,0 +1,27 @@ +/* + * This file is generated by {@link org.jetbrains.kotlin.spec.tasks.generateTests}. DO NOT MODIFY MANUALLY. + * This file is used in the HTML version of the Kotlin Specification (https://kotlin.github.io/kotlin-spec) to show tests coverage for sentences. + * + * Content format: + * + * {paragraphNumber} + * {testType: neg|pos}: {sentenceNumber}-{numberOfTests|testPathToAnotherSection}, ... + */ + +9 + neg: 1-4 + pos: 1-4 +7 + neg: 1-2, 3-2, 5-2, 7-1 + pos: 1-4, 3-2, 5-2, 7-1 +6 + neg: 1-1 + pos: 1-1 +3 + neg: 2-2, 1-1 + pos: 2-3, 1-1 +2 + pos: 3-2 +5 + neg: 1-1 + pos: 1-1 diff --git a/compiler/tests-spec/testData/diagnostics/linked/type-system/introduction-1/p-5/neg/2.1.kt b/compiler/tests-spec/testData/diagnostics/linked/type-system/introduction-1/p-5/neg/2.1.kt new file mode 100644 index 00000000000..d39039150bd --- /dev/null +++ b/compiler/tests-spec/testData/diagnostics/linked/type-system/introduction-1/p-5/neg/2.1.kt @@ -0,0 +1,69 @@ +// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER +// !LANGUAGE: +NewInference +// SKIP_TXT + +/* + * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) + * + * SPEC VERSION: 0.1-draft + * PLACE: type-system, introduction -> paragraph 5 -> sentence 2 + * NUMBER: 1 + * DESCRIPTION: The use of Boolean literals as the identifier (with backtick) in the class. + */ + +// TESTCASE NUMBER: 1 +fun case_1() { + val x: Int = null +} + +// TESTCASE NUMBER: 2 +fun case_2() { + val x: Any = null +} + +// TESTCASE NUMBER: 3 +fun case_3() { + val x: Nothing = null +} + +// TESTCASE NUMBER: 4 +fun case_4() { + var x: Int = null +} + +// TESTCASE NUMBER: 5 +fun case_5() { + var x: Any = null +} + +// TESTCASE NUMBER: 6 +fun case_6() { + var x: Nothing = null +} + +// TESTCASE NUMBER: 7 +fun case_7() { + val x: Int + x = null +} + +// TESTCASE NUMBER: 8 +fun case_8() { + var x: Int = 10 + x = null +} + +// TESTCASE NUMBER: 9 +fun case_9() { + val x = null + val y: Int = x +} + +// TESTCASE NUMBER: 10 +fun case_10(x: Int?) { + var y = 10 + y = x +} + +// TESTCASE NUMBER: 11 +fun case_11(x: Int?, y: Int = x) = null \ No newline at end of file diff --git a/compiler/tests-spec/testData/diagnostics/linked/type-system/introduction-1/p-5/neg/2.2.kt b/compiler/tests-spec/testData/diagnostics/linked/type-system/introduction-1/p-5/neg/2.2.kt new file mode 100644 index 00000000000..e15bfa3742a --- /dev/null +++ b/compiler/tests-spec/testData/diagnostics/linked/type-system/introduction-1/p-5/neg/2.2.kt @@ -0,0 +1,101 @@ +// !DIAGNOSTICS: -UNUSED_PARAMETER -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE +// !LANGUAGE: +NewInference +// SKIP_TXT + +/* + * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) + * + * SPEC VERSION: 0.1-draft + * PLACE: type-system, introduction -> paragraph 5 -> sentence 2 + * NUMBER: 2 + * DESCRIPTION: The use of Boolean literals as the identifier (with backtick) in the class. + */ + +// TESTCASE NUMBER: 1 +fun case_1(x: Int = null) { + println(x) +} + +// TESTCASE NUMBER: 2 +fun case_2(x: Any = null) { + println(x) +} + +// TESTCASE NUMBER: 3 +fun case_3(x: Nothing = null) { + println(x) +} + +// TESTCASE NUMBER: 4 +class Case4(x: Int = null) + +// TESTCASE NUMBER: 5 +class Case5 constructor(x: Any = null) + +// TESTCASE NUMBER: 6 +class Case6 { + fun foo(x: Nothing = null) {} +} + +// TESTCASE NUMBER: 7 +class Case7 { + val x: Int get() = null +} + +// TESTCASE NUMBER: 8 +class Case8 { + var x: Any = 0 + get() = 0 + set(value) { + field = null + } +} + +// TESTCASE NUMBER: 9 +fun case_9(): Any = null + +// TESTCASE NUMBER: 10 +fun case_10(x: Int, y: Boolean): Any = if (y) x else null + +// TESTCASE NUMBER: 11 +fun case_11(x: Int, y: Boolean): Any = if (y) x else null + +// TESTCASE NUMBER: 12 +class Case12 { + val x: Any + var y: Any + var z: Any + init { + x = null + y = null + z = 10 + z = null + } +} + +// TESTCASE NUMBER: 13 +open class Case13_1 { + open val x: Int = 10 +} + +class Case13: Case13_1() { + override val x = null +} + +// TESTCASE NUMBER: 14 +abstract class Case14_1 { + abstract val x: Int +} + +class Case14: Case14_1() { + override val x = null +} + +// TESTCASE NUMBER: 15 +interface Case15_1 { + fun foo(): Int = 10 +} + +class Case15(): Case15_1 { + override fun foo() = null +} diff --git a/compiler/tests-spec/testData/diagnostics/linked/type-system/introduction-1/p-5/neg/2.3.kt b/compiler/tests-spec/testData/diagnostics/linked/type-system/introduction-1/p-5/neg/2.3.kt new file mode 100644 index 00000000000..d6b24d5c5bd --- /dev/null +++ b/compiler/tests-spec/testData/diagnostics/linked/type-system/introduction-1/p-5/neg/2.3.kt @@ -0,0 +1,39 @@ +// !DIAGNOSTICS: -UNUSED_PARAMETER -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE +// !LANGUAGE: +NewInference +// SKIP_TXT + +/* + * KOTLIN DIAGNOSTICS SPEC TEST (NEGATIVE) + * + * SPEC VERSION: 0.1-draft + * PLACE: type-system, introduction -> paragraph 5 -> sentence 2 + * NUMBER: 3 + * DESCRIPTION: The use of Boolean literals as the identifier (with backtick) in the class. + */ + +// TESTCASE NUMBER: 1 +fun case_1(x: T = null) { + println(x) +} + +// TESTCASE NUMBER: 2 +fun case_2(x: T = null) { + println(x) +} + +// TESTCASE NUMBER: 3 +fun case_3() { + class Case4 (x: T = null) +} + +// TESTCASE NUMBER: 4 +fun case_4() { + class Case4(x: T = null) +} + +// TESTCASE NUMBER: 5 +fun case_5(x: T) where T: Number?, K: Number { + if (x == null) { + class Case5 constructor(y: K = x) + } +} diff --git a/compiler/tests-spec/testData/diagnostics/linked/type-system/introduction-1/p-7/pos/1.1.kt b/compiler/tests-spec/testData/diagnostics/linked/type-system/introduction-1/p-7/pos/1.1.kt new file mode 100644 index 00000000000..37ddc780529 --- /dev/null +++ b/compiler/tests-spec/testData/diagnostics/linked/type-system/introduction-1/p-7/pos/1.1.kt @@ -0,0 +1,84 @@ +// !DIAGNOSTICS: -UNUSED_VARIABLE -ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE -UNUSED_VALUE -UNUSED_PARAMETER +// !LANGUAGE: +NewInference +// SKIP_TXT + +/* + * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) + * + * SPEC VERSION: 0.1-draft + * PLACE: type-system, introduction -> paragraph 7 -> sentence 1 + * RELEVANT PLACES: expressions, constant-literals, real-literals -> paragraph 1 -> sentence 1 + * NUMBER: 1 + * DESCRIPTION: The use of Boolean literals as the identifier (with backtick) in the class. + * HELPERS: checkType + */ + +// TESTCASE NUMBER: 1 +fun case_1() { + checkSubtype(10) +} + +// TESTCASE NUMBER: 2 +fun case_2(x: String) { + checkSubtype(x) +} + +// TESTCASE NUMBER: 3 +class Case3(val x: String, val y: Any? = checkSubtype(x)) + +// TESTCASE NUMBER: 4 +class Case4(val x: String, val y: Any? = checkSubtype(throw Exception())) + +// TESTCASE NUMBER: 5 +fun case_5() { + checkSubtype(return) +} + +// TESTCASE NUMBER: 6 +fun case_6() { + while (true) { + checkSubtype(break) + } +} + +// TESTCASE NUMBER: 7 +fun case_7(x: Boolean) { + while (x) { + checkSubtype(continue) + } +} + +// TESTCASE NUMBER: 8 +fun case_8(x: Boolean) { + checkSubtype({}()) +} + +// TESTCASE NUMBER: 9 +fun case_9(x: Boolean) { + checkSubtype(kotlin.Unit) +} + +// TESTCASE NUMBER: 10 +fun case_10(x: Boolean) { + checkSubtype({while (true) {}}()) +} + +// TESTCASE NUMBER: 11 +fun case_11(x: T) { + checkSubtype(x) +} + +// TESTCASE NUMBER: 12 +class Case12 { + inline fun case_12(x: T) { + checkSubtype(x) + } +} + +// TESTCASE NUMBER: 13 +class Case13 { + inline fun case_12(x: T) { + x!! + checkSubtype(x) + } +} diff --git a/compiler/tests-spec/testData/diagnostics/linked/type-system/introduction-1/p-7/pos/2.1.kt b/compiler/tests-spec/testData/diagnostics/linked/type-system/introduction-1/p-7/pos/2.1.kt new file mode 100644 index 00000000000..0264c59e4a5 --- /dev/null +++ b/compiler/tests-spec/testData/diagnostics/linked/type-system/introduction-1/p-7/pos/2.1.kt @@ -0,0 +1,87 @@ +// !DIAGNOSTICS: -UNUSED_VARIABLE -UNREACHABLE_CODE +// !LANGUAGE: +NewInference +// SKIP_TXT + +/* + * KOTLIN DIAGNOSTICS SPEC TEST (POSITIVE) + * + * SPEC VERSION: 0.1-draft + * PLACE: type-system, introduction -> paragraph 7 -> sentence 2 + * NUMBER: 1 + * DESCRIPTION: The use of Boolean literals as the identifier (with backtick) in the class. + * HELPERS: checkType + */ + +// TESTCASE NUMBER: 1 +fun case_1() { + checkSubtype(return) +} + +// TESTCASE NUMBER: 2 +fun case_2(x: Nothing) { + checkSubtype(x) +} + +// TESTCASE NUMBER: 3 +class Case3(val x: Any? = checkSubtype(throw Exception())) + +// TESTCASE NUMBER: 4 +class Case4(val x: Nothing, val y: Any? = checkSubtype(x)) + +// TESTCASE NUMBER: 5 +fun case_5() { + checkSubtype(null!!) +} + +// TESTCASE NUMBER: 6 +fun case_6() { + while (true) { + checkSubtype>(break) + } +} + +// TESTCASE NUMBER: 7 +fun case_7(x: Boolean) { + while (x) { + checkSubtype(continue) + } +} + +// TESTCASE NUMBER: 8 +class Case8 { + inline fun case_12(x: L) { + x!! + checkSubtype(x) + } +} + +// TESTCASE NUMBER: 9 +inline fun case_9(x: L) = x!! as Int + +// TESTCASE NUMBER: 10 +fun case_10(x: Nothing) = x as Iterable + +// TESTCASE NUMBER: 11 +fun case_11() { + return as Nothing? +} + +// TESTCASE NUMBER: 12 +fun case_12() = (throw Exception()) as String + +// TESTCASE NUMBER: 13 +fun case_13() = null as Float? + +// TESTCASE NUMBER: 14 +inline fun case_14() { + while (true) { + break as Map + } +} + +// TESTCASE NUMBER: 15 +inline fun case_15() { + while (true) { + continue as T + } +} diff --git a/compiler/tests-spec/testData/diagnostics/linked/type-system/introduction-1/testsMap.txt b/compiler/tests-spec/testData/diagnostics/linked/type-system/introduction-1/testsMap.txt new file mode 100644 index 00000000000..f12d715f0df --- /dev/null +++ b/compiler/tests-spec/testData/diagnostics/linked/type-system/introduction-1/testsMap.txt @@ -0,0 +1,14 @@ +/* + * This file is generated by {@link org.jetbrains.kotlin.spec.tasks.generateTests}. DO NOT MODIFY MANUALLY. + * This file is used in the HTML version of the Kotlin Specification (https://kotlin.github.io/kotlin-spec) to show tests coverage for sentences. + * + * Content format: + * + * {paragraphNumber} + * {testType: neg|pos}: {sentenceNumber}-{numberOfTests|testPathToAnotherSection}, ... + */ + +7 + pos: 2-1, 1-1 +5 + neg: 2-3 diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractBuilder/effects/returns/pos/1.txt b/compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractBuilder/effects/returns/pos/1.txt index 833acec3170..ec5d26f33ac 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractBuilder/effects/returns/pos/1.txt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractBuilder/effects/returns/pos/1.txt @@ -48,8 +48,8 @@ public final class Class { public final val prop_11: kotlin.Int = 10 public final var prop_12: kotlin.String public final val prop_13: kotlin.Any? = "" - public final val prop_14: kotlin.Comparable<*>? = "" - public final val prop_15: kotlin.collections.Iterable<*>? = "" + public final val prop_14: kotlin.Comparable<*>? = null + public final val prop_15: kotlin.collections.Iterable<*>? = null public final val prop_2: kotlin.Int = 2 public final val prop_3: kotlin.Int = 3 public final val prop_4: kotlin.Float? = 3.0.toFloat() @@ -73,7 +73,7 @@ public final class Class { public final fun getLongArray(): kotlin.LongArray public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public final operator fun invoke(): kotlin.Unit - public final operator fun invoke(/*0*/ x: [ERROR : Type annotation was missing for parameter x]): (kotlin.Any) -> kotlin.Any + public final operator fun invoke(/*0*/ x: kotlin.Any): (kotlin.Any) -> kotlin.Any public final operator fun invoke(/*0*/ x: kotlin.Any, /*1*/ y: kotlin.Any): kotlin.Unit public final operator fun set(/*0*/ i1: kotlin.Int, /*1*/ el: kotlin.Int): kotlin.Unit public final operator fun set(/*0*/ i1: kotlin.Int, /*1*/ i2: kotlin.Int, /*2*/ el: kotlin.Int): kotlin.Unit @@ -243,7 +243,7 @@ public open class ClassWithTwoTypeParameters { public constructor ClassWithTwoTypeParameters() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public final fun test1(): [ERROR : T]? + public final fun test1(): L? public final fun test2(): K? public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } @@ -258,7 +258,7 @@ public final class EmptyClass { public final class In { public constructor In() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public final fun getWithUpperBoundT(): K + public final fun getWithUpperBoundT(/*0*/ x: T): K public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public final fun put(/*0*/ x: T): kotlin.Unit public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String @@ -282,7 +282,7 @@ public final class Inv { public final class Out { public constructor Out(/*0*/ x: T = ...) - public final val prop_1: Inv? = null + public final val prop_1: Inv? = null public final val prop_2: T? = null public final val x: T public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractBuilder/effects/returns/pos/2.txt b/compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractBuilder/effects/returns/pos/2.txt index 250abd74670..852efaddc9b 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractBuilder/effects/returns/pos/2.txt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractBuilder/effects/returns/pos/2.txt @@ -24,8 +24,8 @@ public final class Class { public final val prop_11: kotlin.Int = 10 public final var prop_12: kotlin.String public final val prop_13: kotlin.Any? = "" - public final val prop_14: kotlin.Comparable<*>? = "" - public final val prop_15: kotlin.collections.Iterable<*>? = "" + public final val prop_14: kotlin.Comparable<*>? = null + public final val prop_15: kotlin.collections.Iterable<*>? = null public final val prop_2: kotlin.Int = 2 public final val prop_3: kotlin.Int = 3 public final val prop_4: kotlin.Float? = 3.0.toFloat() @@ -49,7 +49,7 @@ public final class Class { public final fun getLongArray(): kotlin.LongArray public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public final operator fun invoke(): kotlin.Unit - public final operator fun invoke(/*0*/ x: [ERROR : Type annotation was missing for parameter x]): (kotlin.Any) -> kotlin.Any + public final operator fun invoke(/*0*/ x: kotlin.Any): (kotlin.Any) -> kotlin.Any public final operator fun invoke(/*0*/ x: kotlin.Any, /*1*/ y: kotlin.Any): kotlin.Unit public final operator fun set(/*0*/ i1: kotlin.Int, /*1*/ el: kotlin.Int): kotlin.Unit public final operator fun set(/*0*/ i1: kotlin.Int, /*1*/ i2: kotlin.Int, /*2*/ el: kotlin.Int): kotlin.Unit @@ -219,7 +219,7 @@ public open class ClassWithTwoTypeParameters { public constructor ClassWithTwoTypeParameters() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public final fun test1(): [ERROR : T]? + public final fun test1(): L? public final fun test2(): K? public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } @@ -234,7 +234,7 @@ public final class EmptyClass { public final class In { public constructor In() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public final fun getWithUpperBoundT(): K + public final fun getWithUpperBoundT(/*0*/ x: T): K public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public final fun put(/*0*/ x: T): kotlin.Unit public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String @@ -258,7 +258,7 @@ public final class Inv { public final class Out { public constructor Out(/*0*/ x: T = ...) - public final val prop_1: Inv? = null + public final val prop_1: Inv? = null public final val prop_2: T? = null public final val x: T public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractFunction/neg/2.txt b/compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractFunction/neg/2.txt index 28efde1b5d2..553572e9f34 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractFunction/neg/2.txt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/contracts/declarations/contractFunction/neg/2.txt @@ -14,8 +14,8 @@ public final class Class { public final val prop_11: kotlin.Int = 10 public final var prop_12: kotlin.String public final val prop_13: kotlin.Any? = "" - public final val prop_14: kotlin.Comparable<*>? = "" - public final val prop_15: kotlin.collections.Iterable<*>? = "" + public final val prop_14: kotlin.Comparable<*>? = null + public final val prop_15: kotlin.collections.Iterable<*>? = null public final val prop_2: kotlin.Int = 2 public final val prop_3: kotlin.Int = 3 public final val prop_4: kotlin.Float? = 3.0.toFloat() @@ -39,7 +39,7 @@ public final class Class { public final fun getLongArray(): kotlin.LongArray public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public final operator fun invoke(): kotlin.Unit - public final operator fun invoke(/*0*/ x: [ERROR : Type annotation was missing for parameter x]): (kotlin.Any) -> kotlin.Any + public final operator fun invoke(/*0*/ x: kotlin.Any): (kotlin.Any) -> kotlin.Any public final operator fun invoke(/*0*/ x: kotlin.Any, /*1*/ y: kotlin.Any): kotlin.Unit public final operator fun set(/*0*/ i1: kotlin.Int, /*1*/ el: kotlin.Int): kotlin.Unit public final operator fun set(/*0*/ i1: kotlin.Int, /*1*/ i2: kotlin.Int, /*2*/ el: kotlin.Int): kotlin.Unit @@ -209,7 +209,7 @@ public open class ClassWithTwoTypeParameters { public constructor ClassWithTwoTypeParameters() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - public final fun test1(): [ERROR : T]? + public final fun test1(): L? public final fun test2(): K? public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } @@ -224,7 +224,7 @@ public final class EmptyClass { public final class In { public constructor In() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - public final fun getWithUpperBoundT(): K + public final fun getWithUpperBoundT(/*0*/ x: T): K public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public final fun put(/*0*/ x: T): kotlin.Unit public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String @@ -248,7 +248,7 @@ public final class Inv { public final class Out { public constructor Out(/*0*/ x: T = ...) - public final val prop_1: Inv? = null + public final val prop_1: Inv? = null public final val prop_2: T? = null public final val x: T public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/29.kt b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/29.kt index 135694f621d..a8826729658 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/29.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/29.kt @@ -90,10 +90,13 @@ fun case_8(x: Inv?) { } } -// TESTCASE NUMBER: 9 +/* + * TESTCASE NUMBER: 9 + * UNEXPECTED BEHAVIOUR + */ inline fun case_9(x: Out?) { if (x?.prop_1?.prop_1?.prop_1?.prop_1 != null) { - & Inv?")!>x.prop_1.prop_1.prop_1.prop_1 - "), DEBUG_INFO_SMARTCAST!>x.prop_1.prop_1.prop_1.prop_1.equals(10) + ?")!>x.prop_1.prop_1.prop_1.prop_1 + ?")!>x.prop_1.prop_1.prop_1.prop_1.equals(10) } } diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/30.kt b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/30.kt index 3eb34dcc535..0dbcde1bffa 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/30.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/30.kt @@ -181,7 +181,7 @@ fun case_12(x: Inv?) { */ inline fun case_13(x: Out?) { if (x?.prop_1?.prop_1!!.prop_1?.prop_1 != null) { - ?")!>x.prop_1.prop_1.prop_1.prop_1 - ?")!>x.prop_1.prop_1.prop_1.prop_1.equals(10) + ?")!>x.prop_1.prop_1.prop_1.prop_1 + ?")!>x.prop_1.prop_1.prop_1.prop_1.equals(10) } } diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/31.kt b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/31.kt index 23b300ad076..ea1c28943d2 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/31.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/31.kt @@ -132,10 +132,13 @@ fun case_8(x: Inv?) { } } -// TESTCASE NUMBER: 9 +/* + * TESTCASE NUMBER: 9 + * UNEXPECTED BEHAVIOUR + */ inline fun case_9(x: Out?) { if (x?.prop_1?.prop_1?.prop_1?.prop_1 != null) { - & Inv?")!>x.prop_1.prop_1.prop_1.prop_1 - "), DEBUG_INFO_SMARTCAST!>x.prop_1.prop_1.prop_1.prop_1.equals(10) + ?")!>x.prop_1.prop_1.prop_1.prop_1 + ?")!>x.prop_1.prop_1.prop_1.prop_1.equals(10) } } \ No newline at end of file diff --git a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/9.kt b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/9.kt index ba8e133e7e1..8e3bfc36dc9 100644 --- a/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/9.kt +++ b/compiler/tests-spec/testData/diagnostics/notLinked/dfa/pos/9.kt @@ -628,7 +628,7 @@ fun case_29(a: Inv) { // TESTCASE NUMBER: 30 fun case_30() { val a = In() - val b = a.getWithUpperBoundT() + val b = a.getWithUpperBoundT(10) if (b != null) { b diff --git a/compiler/tests-spec/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestSpecGenerated.java b/compiler/tests-spec/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestSpecGenerated.java index 8c5094d7be0..be7cf3821e3 100644 --- a/compiler/tests-spec/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestSpecGenerated.java +++ b/compiler/tests-spec/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestSpecGenerated.java @@ -41,110 +41,43 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/constant-literals") + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class Constant_literals extends AbstractDiagnosticsTestSpec { + public static class Expressions extends AbstractDiagnosticsTestSpec { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - public void testAllFilesPresentInConstant_literals() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/constant-literals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + public void testAllFilesPresentInExpressions() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/constant-literals/boolean-literals") + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class Boolean_literals extends AbstractDiagnosticsTestSpec { + public static class Constant_literals extends AbstractDiagnosticsTestSpec { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - public void testAllFilesPresentInBoolean_literals() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/constant-literals/boolean-literals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + public void testAllFilesPresentInConstant_literals() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/constant-literals/boolean-literals/p-1") + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/boolean-literals") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class P_1 extends AbstractDiagnosticsTestSpec { + public static class Boolean_literals extends AbstractDiagnosticsTestSpec { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - public void testAllFilesPresentInP_1() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/constant-literals/boolean-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + public void testAllFilesPresentInBoolean_literals() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/boolean-literals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/constant-literals/boolean-literals/p-1/neg") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Neg extends AbstractDiagnosticsTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - @TestMetadata("3.1.kt") - public void test3_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/constant-literals/boolean-literals/p-1/neg/3.1.kt"); - } - - public void testAllFilesPresentInNeg() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/constant-literals/boolean-literals/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - } - - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/constant-literals/boolean-literals/p-1/pos") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Pos extends AbstractDiagnosticsTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - @TestMetadata("3.1.kt") - public void test3_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/constant-literals/boolean-literals/p-1/pos/3.1.kt"); - } - - @TestMetadata("3.2.kt") - public void test3_2() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/constant-literals/boolean-literals/p-1/pos/3.2.kt"); - } - - public void testAllFilesPresentInPos() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/constant-literals/boolean-literals/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - } - } - } - - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Integer_literals extends AbstractDiagnosticsTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInInteger_literals() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/binary-integer-literals") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Binary_integer_literals extends AbstractDiagnosticsTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInBinary_integer_literals() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/binary-integer-literals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/binary-integer-literals/p-1") + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/boolean-literals/p-1") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class P_1 extends AbstractDiagnosticsTestSpec { @@ -153,10 +86,10 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_1() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/binary-integer-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/boolean-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/binary-integer-literals/p-1/neg") + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/boolean-literals/p-1/neg") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Neg extends AbstractDiagnosticsTestSpec { @@ -164,219 +97,17 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - @TestMetadata("1.1.kt") - public void test1_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/binary-integer-literals/p-1/neg/1.1.kt"); - } - - @TestMetadata("2.1.kt") - public void test2_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/binary-integer-literals/p-1/neg/2.1.kt"); - } - - @TestMetadata("2.2.kt") - public void test2_2() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/binary-integer-literals/p-1/neg/2.2.kt"); - } - - @TestMetadata("2.3.kt") - public void test2_3() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/binary-integer-literals/p-1/neg/2.3.kt"); + @TestMetadata("3.1.kt") + public void test3_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/boolean-literals/p-1/neg/3.1.kt"); } public void testAllFilesPresentInNeg() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/binary-integer-literals/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - } - } - } - - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/decimal-integer-literals") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Decimal_integer_literals extends AbstractDiagnosticsTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInDecimal_integer_literals() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/decimal-integer-literals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/decimal-integer-literals/p-1") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class P_1 extends AbstractDiagnosticsTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInP_1() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/decimal-integer-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/decimal-integer-literals/p-1/neg") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Neg extends AbstractDiagnosticsTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - @TestMetadata("2.1.kt") - public void test2_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/decimal-integer-literals/p-1/neg/2.1.kt"); - } - - @TestMetadata("2.2.kt") - public void test2_2() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/decimal-integer-literals/p-1/neg/2.2.kt"); - } - - public void testAllFilesPresentInNeg() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/decimal-integer-literals/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - } - } - } - - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/hexadecimal-integer-literals") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Hexadecimal_integer_literals extends AbstractDiagnosticsTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInHexadecimal_integer_literals() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/hexadecimal-integer-literals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/hexadecimal-integer-literals/p-1") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class P_1 extends AbstractDiagnosticsTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInP_1() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/hexadecimal-integer-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Neg extends AbstractDiagnosticsTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - @TestMetadata("1.1.kt") - public void test1_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg/1.1.kt"); - } - - @TestMetadata("2.1.kt") - public void test2_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg/2.1.kt"); - } - - @TestMetadata("2.2.kt") - public void test2_2() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg/2.2.kt"); - } - - @TestMetadata("2.3.kt") - public void test2_3() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg/2.3.kt"); - } - - public void testAllFilesPresentInNeg() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - } - } - } - - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Long_integer_literals extends AbstractDiagnosticsTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInLong_integer_literals() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals/p-1") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class P_1 extends AbstractDiagnosticsTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInP_1() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals/p-1/neg") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Neg extends AbstractDiagnosticsTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - @TestMetadata("1.1.kt") - public void test1_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals/p-1/neg/1.1.kt"); - } - - @TestMetadata("1.2.kt") - public void test1_2() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals/p-1/neg/1.2.kt"); - } - - @TestMetadata("1.3.kt") - public void test1_3() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals/p-1/neg/1.3.kt"); - } - - @TestMetadata("2.1.kt") - public void test2_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals/p-1/neg/2.1.kt"); - } - - @TestMetadata("2.2.kt") - public void test2_2() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals/p-1/neg/2.2.kt"); - } - - @TestMetadata("2.3.kt") - public void test2_3() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals/p-1/neg/2.3.kt"); - } - - @TestMetadata("2.4.kt") - public void test2_4() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals/p-1/neg/2.4.kt"); - } - - @TestMetadata("2.5.kt") - public void test2_5() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals/p-1/neg/2.5.kt"); - } - - public void testAllFilesPresentInNeg() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/boolean-literals/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } } - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals/p-1/pos") + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/boolean-literals/p-1/pos") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Pos extends AbstractDiagnosticsTestSpec { @@ -384,121 +115,856 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } + @TestMetadata("3.1.kt") + public void test3_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/boolean-literals/p-1/pos/3.1.kt"); + } + + @TestMetadata("3.2.kt") + public void test3_2() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/boolean-literals/p-1/pos/3.2.kt"); + } + + public void testAllFilesPresentInPos() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/boolean-literals/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + } + } + } + + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Integer_literals extends AbstractDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInInteger_literals() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/binary-integer-literals") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Binary_integer_literals extends AbstractDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInBinary_integer_literals() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/binary-integer-literals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class P_1 extends AbstractDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInP_1() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1/neg") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Neg extends AbstractDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + @TestMetadata("1.1.kt") + public void test1_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1/neg/1.1.kt"); + } + + @TestMetadata("2.1.kt") + public void test2_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1/neg/2.1.kt"); + } + + @TestMetadata("2.2.kt") + public void test2_2() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1/neg/2.2.kt"); + } + + @TestMetadata("2.3.kt") + public void test2_3() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1/neg/2.3.kt"); + } + + public void testAllFilesPresentInNeg() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/binary-integer-literals/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + } + } + } + + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/decimal-integer-literals") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Decimal_integer_literals extends AbstractDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInDecimal_integer_literals() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/decimal-integer-literals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/p-1") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class P_1 extends AbstractDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInP_1() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/p-1/neg") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Neg extends AbstractDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + @TestMetadata("2.1.kt") + public void test2_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/p-1/neg/2.1.kt"); + } + + @TestMetadata("2.2.kt") + public void test2_2() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/p-1/neg/2.2.kt"); + } + + public void testAllFilesPresentInNeg() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/decimal-integer-literals/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + } + } + } + + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Hexadecimal_integer_literals extends AbstractDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInHexadecimal_integer_literals() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class P_1 extends AbstractDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInP_1() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Neg extends AbstractDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + @TestMetadata("1.1.kt") + public void test1_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg/1.1.kt"); + } + + @TestMetadata("2.1.kt") + public void test2_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg/2.1.kt"); + } + + @TestMetadata("2.2.kt") + public void test2_2() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg/2.2.kt"); + } + + @TestMetadata("2.3.kt") + public void test2_3() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg/2.3.kt"); + } + + public void testAllFilesPresentInNeg() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/hexadecimal-integer-literals/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + } + } + } + + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Long_integer_literals extends AbstractDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInLong_integer_literals() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class P_1 extends AbstractDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInP_1() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/neg") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Neg extends AbstractDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + @TestMetadata("1.1.kt") + public void test1_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/neg/1.1.kt"); + } + + @TestMetadata("1.2.kt") + public void test1_2() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/neg/1.2.kt"); + } + + @TestMetadata("1.3.kt") + public void test1_3() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/neg/1.3.kt"); + } + + @TestMetadata("2.1.kt") + public void test2_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/neg/2.1.kt"); + } + + @TestMetadata("2.2.kt") + public void test2_2() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/neg/2.2.kt"); + } + + @TestMetadata("2.3.kt") + public void test2_3() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/neg/2.3.kt"); + } + + @TestMetadata("2.4.kt") + public void test2_4() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/neg/2.4.kt"); + } + + @TestMetadata("2.5.kt") + public void test2_5() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/neg/2.5.kt"); + } + + public void testAllFilesPresentInNeg() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/pos") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Pos extends AbstractDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + @TestMetadata("2.1.kt") + public void test2_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/pos/2.1.kt"); + } + + @TestMetadata("2.2.kt") + public void test2_2() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/pos/2.2.kt"); + } + + @TestMetadata("2.3.kt") + public void test2_3() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/pos/2.3.kt"); + } + + @TestMetadata("2.4.kt") + public void test2_4() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/pos/2.4.kt"); + } + + @TestMetadata("2.5.kt") + public void test2_5() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/pos/2.5.kt"); + } + + public void testAllFilesPresentInPos() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/integer-literals/long-integer-literals/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + } + } + } + } + + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Real_literals extends AbstractDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInReal_literals() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-1") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class P_1 extends AbstractDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInP_1() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-1/neg") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Neg extends AbstractDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + @TestMetadata("1.1.kt") + public void test1_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-1/neg/1.1.kt"); + } + + @TestMetadata("3.1.kt") + public void test3_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-1/neg/3.1.kt"); + } + + public void testAllFilesPresentInNeg() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-1/pos") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Pos extends AbstractDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + @TestMetadata("1.1.kt") + public void test1_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-1/pos/1.1.kt"); + } + + @TestMetadata("1.2.kt") + public void test1_2() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-1/pos/1.2.kt"); + } + + @TestMetadata("3.1.kt") + public void test3_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-1/pos/3.1.kt"); + } + + @TestMetadata("3.2.kt") + public void test3_2() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-1/pos/3.2.kt"); + } + + public void testAllFilesPresentInPos() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + } + } + + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class P_2 extends AbstractDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInP_2() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/neg") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Neg extends AbstractDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + @TestMetadata("1.1.kt") + public void test1_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/neg/1.1.kt"); + } + + @TestMetadata("1.2.kt") + public void test1_2() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/neg/1.2.kt"); + } + + @TestMetadata("1.3.kt") + public void test1_3() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/neg/1.3.kt"); + } + + @TestMetadata("1.4.kt") + public void test1_4() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/neg/1.4.kt"); + } + + public void testAllFilesPresentInNeg() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/pos") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Pos extends AbstractDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + @TestMetadata("1.1.kt") + public void test1_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/pos/1.1.kt"); + } + + @TestMetadata("1.2.kt") + public void test1_2() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/pos/1.2.kt"); + } + + public void testAllFilesPresentInPos() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + } + } + + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class P_3 extends AbstractDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInP_3() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/neg") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Neg extends AbstractDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + @TestMetadata("1.1.kt") + public void test1_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/neg/1.1.kt"); + } + + @TestMetadata("1.2.kt") + public void test1_2() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/neg/1.2.kt"); + } + @TestMetadata("2.1.kt") public void test2_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals/p-1/pos/2.1.kt"); + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/neg/2.1.kt"); + } + + public void testAllFilesPresentInNeg() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/pos") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Pos extends AbstractDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + @TestMetadata("1.1.kt") + public void test1_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/pos/1.1.kt"); + } + + @TestMetadata("1.2.kt") + public void test1_2() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/pos/1.2.kt"); + } + + @TestMetadata("1.3.kt") + public void test1_3() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/pos/1.3.kt"); + } + + @TestMetadata("1.4.kt") + public void test1_4() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/pos/1.4.kt"); + } + + @TestMetadata("1.5.kt") + public void test1_5() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/pos/1.5.kt"); + } + + @TestMetadata("2.1.kt") + public void test2_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/pos/2.1.kt"); } @TestMetadata("2.2.kt") public void test2_2() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals/p-1/pos/2.2.kt"); + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/pos/2.2.kt"); } @TestMetadata("2.3.kt") public void test2_3() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals/p-1/pos/2.3.kt"); - } - - @TestMetadata("2.4.kt") - public void test2_4() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals/p-1/pos/2.4.kt"); - } - - @TestMetadata("2.5.kt") - public void test2_5() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals/p-1/pos/2.5.kt"); + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/pos/2.3.kt"); } public void testAllFilesPresentInPos() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/constant-literals/integer-literals/long-integer-literals/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-3/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + } + } + + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class P_4 extends AbstractDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInP_4() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/neg") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Neg extends AbstractDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + @TestMetadata("1.1.kt") + public void test1_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/neg/1.1.kt"); + } + + @TestMetadata("1.2.kt") + public void test1_2() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/neg/1.2.kt"); + } + + @TestMetadata("2.1.kt") + public void test2_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/neg/2.1.kt"); + } + + @TestMetadata("2.2.kt") + public void test2_2() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/neg/2.2.kt"); + } + + @TestMetadata("2.3.kt") + public void test2_3() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/neg/2.3.kt"); + } + + public void testAllFilesPresentInNeg() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/pos") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Pos extends AbstractDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + @TestMetadata("1.1.kt") + public void test1_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/pos/1.1.kt"); + } + + @TestMetadata("1.2.kt") + public void test1_2() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/pos/1.2.kt"); + } + + @TestMetadata("1.3.kt") + public void test1_3() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/pos/1.3.kt"); + } + + @TestMetadata("1.4.kt") + public void test1_4() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/pos/1.4.kt"); + } + + @TestMetadata("1.5.kt") + public void test1_5() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/pos/1.5.kt"); + } + + public void testAllFilesPresentInPos() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-4/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + } + } + + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-5") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class P_5 extends AbstractDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInP_5() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-5"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-5/pos") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Pos extends AbstractDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + @TestMetadata("1.1.kt") + public void test1_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-5/pos/1.1.kt"); + } + + @TestMetadata("1.2.kt") + public void test1_2() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-5/pos/1.2.kt"); + } + + @TestMetadata("1.3.kt") + public void test1_3() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-5/pos/1.3.kt"); + } + + @TestMetadata("1.4.kt") + public void test1_4() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-5/pos/1.4.kt"); + } + + @TestMetadata("1.5.kt") + public void test1_5() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-5/pos/1.5.kt"); + } + + public void testAllFilesPresentInPos() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/constant-literals/real-literals/p-5/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } } } } } - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals") + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class Real_literals extends AbstractDiagnosticsTestSpec { + public static class When_expression extends AbstractDiagnosticsTestSpec { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - public void testAllFilesPresentInReal_literals() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + public void testAllFilesPresentInWhen_expression() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-1") + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class P_1 extends AbstractDiagnosticsTestSpec { + public static class Exhaustive_when_expressions extends AbstractDiagnosticsTestSpec { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - public void testAllFilesPresentInP_1() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-1"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + public void testAllFilesPresentInExhaustive_when_expressions() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-1/neg") + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class Neg extends AbstractDiagnosticsTestSpec { + public static class P_2 extends AbstractDiagnosticsTestSpec { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - @TestMetadata("1.1.kt") - public void test1_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-1/neg/1.1.kt"); + public void testAllFilesPresentInP_2() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } - @TestMetadata("3.1.kt") - public void test3_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-1/neg/3.1.kt"); + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Neg extends AbstractDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + @TestMetadata("1.1.kt") + public void test1_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/1.1.kt"); + } + + @TestMetadata("1.2.kt") + public void test1_2() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/1.2.kt"); + } + + @TestMetadata("3.1.kt") + public void test3_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/3.1.kt"); + } + + @TestMetadata("6.1.kt") + public void test6_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/6.1.kt"); + } + + @TestMetadata("7.1.kt") + public void test7_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/7.1.kt"); + } + + @TestMetadata("8.1.kt") + public void test8_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/8.1.kt"); + } + + @TestMetadata("8.2.kt") + public void test8_2() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/8.2.kt"); + } + + @TestMetadata("8.3.kt") + public void test8_3() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg/8.3.kt"); + } + + public void testAllFilesPresentInNeg() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } } - public void testAllFilesPresentInNeg() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-1/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - } + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Pos extends AbstractDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-1/pos") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Pos extends AbstractDiagnosticsTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } + @TestMetadata("1.1.kt") + public void test1_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/1.1.kt"); + } - @TestMetadata("1.1.kt") - public void test1_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-1/pos/1.1.kt"); - } + @TestMetadata("1.2.kt") + public void test1_2() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/1.2.kt"); + } - @TestMetadata("1.2.kt") - public void test1_2() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-1/pos/1.2.kt"); - } + @TestMetadata("1.3.kt") + public void test1_3() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/1.3.kt"); + } - @TestMetadata("3.1.kt") - public void test3_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-1/pos/3.1.kt"); - } + @TestMetadata("3.1.kt") + public void test3_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/3.1.kt"); + } - @TestMetadata("3.2.kt") - public void test3_2() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-1/pos/3.2.kt"); - } + @TestMetadata("6.1.kt") + public void test6_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/6.1.kt"); + } - public void testAllFilesPresentInPos() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + @TestMetadata("7.1.kt") + public void test7_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/7.1.kt"); + } + + @TestMetadata("8.1.kt") + public void test8_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/8.1.kt"); + } + + @TestMetadata("8.2.kt") + public void test8_2() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/8.2.kt"); + } + + @TestMetadata("8.3.kt") + public void test8_3() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos/8.3.kt"); + } + + public void testAllFilesPresentInPos() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/exhaustive-when-expressions/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } } } } - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-2") + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-2") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class P_2 extends AbstractDiagnosticsTestSpec { @@ -507,43 +973,10 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_2() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-2"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-2"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-2/neg") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Neg extends AbstractDiagnosticsTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - @TestMetadata("1.1.kt") - public void test1_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-2/neg/1.1.kt"); - } - - @TestMetadata("1.2.kt") - public void test1_2() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-2/neg/1.2.kt"); - } - - @TestMetadata("1.3.kt") - public void test1_3() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-2/neg/1.3.kt"); - } - - @TestMetadata("1.4.kt") - public void test1_4() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-2/neg/1.4.kt"); - } - - public void testAllFilesPresentInNeg() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-2/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - } - - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-2/pos") + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-2/pos") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Pos extends AbstractDiagnosticsTestSpec { @@ -551,23 +984,23 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - @TestMetadata("1.1.kt") - public void test1_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-2/pos/1.1.kt"); + @TestMetadata("3.1.kt") + public void test3_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-2/pos/3.1.kt"); } - @TestMetadata("1.2.kt") - public void test1_2() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-2/pos/1.2.kt"); + @TestMetadata("3.2.kt") + public void test3_2() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-2/pos/3.2.kt"); } public void testAllFilesPresentInPos() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } } } - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3") + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-3") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class P_3 extends AbstractDiagnosticsTestSpec { @@ -576,10 +1009,10 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_3() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-3"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/neg") + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-3/neg") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Neg extends AbstractDiagnosticsTestSpec { @@ -589,25 +1022,25 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { @TestMetadata("1.1.kt") public void test1_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/neg/1.1.kt"); - } - - @TestMetadata("1.2.kt") - public void test1_2() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/neg/1.2.kt"); + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-3/neg/1.1.kt"); } @TestMetadata("2.1.kt") public void test2_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/neg/2.1.kt"); + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-3/neg/2.1.kt"); + } + + @TestMetadata("2.2.kt") + public void test2_2() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-3/neg/2.2.kt"); } public void testAllFilesPresentInNeg() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-3/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } } - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/pos") + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-3/pos") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Pos extends AbstractDiagnosticsTestSpec { @@ -617,140 +1050,31 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { @TestMetadata("1.1.kt") public void test1_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/pos/1.1.kt"); - } - - @TestMetadata("1.2.kt") - public void test1_2() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/pos/1.2.kt"); - } - - @TestMetadata("1.3.kt") - public void test1_3() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/pos/1.3.kt"); - } - - @TestMetadata("1.4.kt") - public void test1_4() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/pos/1.4.kt"); - } - - @TestMetadata("1.5.kt") - public void test1_5() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/pos/1.5.kt"); + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-3/pos/1.1.kt"); } @TestMetadata("2.1.kt") public void test2_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/pos/2.1.kt"); + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-3/pos/2.1.kt"); } @TestMetadata("2.2.kt") public void test2_2() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/pos/2.2.kt"); + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-3/pos/2.2.kt"); } @TestMetadata("2.3.kt") public void test2_3() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/pos/2.3.kt"); + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-3/pos/2.3.kt"); } public void testAllFilesPresentInPos() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-3/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-3/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } } } - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-4") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class P_4 extends AbstractDiagnosticsTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInP_4() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-4"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-4/neg") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Neg extends AbstractDiagnosticsTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - @TestMetadata("1.1.kt") - public void test1_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-4/neg/1.1.kt"); - } - - @TestMetadata("1.2.kt") - public void test1_2() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-4/neg/1.2.kt"); - } - - @TestMetadata("2.1.kt") - public void test2_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-4/neg/2.1.kt"); - } - - @TestMetadata("2.2.kt") - public void test2_2() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-4/neg/2.2.kt"); - } - - @TestMetadata("2.3.kt") - public void test2_3() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-4/neg/2.3.kt"); - } - - public void testAllFilesPresentInNeg() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-4/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - } - - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-4/pos") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Pos extends AbstractDiagnosticsTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - @TestMetadata("1.1.kt") - public void test1_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-4/pos/1.1.kt"); - } - - @TestMetadata("1.2.kt") - public void test1_2() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-4/pos/1.2.kt"); - } - - @TestMetadata("1.3.kt") - public void test1_3() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-4/pos/1.3.kt"); - } - - @TestMetadata("1.4.kt") - public void test1_4() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-4/pos/1.4.kt"); - } - - @TestMetadata("1.5.kt") - public void test1_5() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-4/pos/1.5.kt"); - } - - public void testAllFilesPresentInPos() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-4/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - } - } - - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-5") + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-5") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class P_5 extends AbstractDiagnosticsTestSpec { @@ -759,10 +1083,28 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { } public void testAllFilesPresentInP_5() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-5"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-5"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-5/pos") + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-5/neg") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Neg extends AbstractDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + @TestMetadata("1.1.kt") + public void test1_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-5/neg/1.1.kt"); + } + + public void testAllFilesPresentInNeg() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-5/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-5/pos") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) public static class Pos extends AbstractDiagnosticsTestSpec { @@ -772,575 +1114,414 @@ public class DiagnosticsTestSpecGenerated extends AbstractDiagnosticsTestSpec { @TestMetadata("1.1.kt") public void test1_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-5/pos/1.1.kt"); + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-5/pos/1.1.kt"); + } + + public void testAllFilesPresentInPos() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-5/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + } + } + + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class P_6 extends AbstractDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInP_6() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Neg extends AbstractDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + @TestMetadata("1.1.kt") + public void test1_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg/1.1.kt"); + } + + public void testAllFilesPresentInNeg() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Pos extends AbstractDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + @TestMetadata("1.1.kt") + public void test1_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos/1.1.kt"); + } + + public void testAllFilesPresentInPos() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-6/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + } + } + + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class P_7 extends AbstractDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInP_7() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/neg") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Neg extends AbstractDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + @TestMetadata("1.1.kt") + public void test1_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/neg/1.1.kt"); } @TestMetadata("1.2.kt") public void test1_2() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-5/pos/1.2.kt"); + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/neg/1.2.kt"); + } + + @TestMetadata("3.1.kt") + public void test3_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/neg/3.1.kt"); + } + + @TestMetadata("3.2.kt") + public void test3_2() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/neg/3.2.kt"); + } + + @TestMetadata("5.1.kt") + public void test5_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/neg/5.1.kt"); + } + + @TestMetadata("5.2.kt") + public void test5_2() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/neg/5.2.kt"); + } + + @TestMetadata("7.1.kt") + public void test7_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/neg/7.1.kt"); + } + + public void testAllFilesPresentInNeg() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/pos") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Pos extends AbstractDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + @TestMetadata("1.1.kt") + public void test1_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/pos/1.1.kt"); + } + + @TestMetadata("1.2.kt") + public void test1_2() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/pos/1.2.kt"); } @TestMetadata("1.3.kt") public void test1_3() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-5/pos/1.3.kt"); + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/pos/1.3.kt"); } @TestMetadata("1.4.kt") public void test1_4() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-5/pos/1.4.kt"); + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/pos/1.4.kt"); } - @TestMetadata("1.5.kt") - public void test1_5() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-5/pos/1.5.kt"); + @TestMetadata("3.1.kt") + public void test3_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/pos/3.1.kt"); + } + + @TestMetadata("3.2.kt") + public void test3_2() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/pos/3.2.kt"); + } + + @TestMetadata("5.1.kt") + public void test5_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/pos/5.1.kt"); + } + + @TestMetadata("5.2.kt") + public void test5_2() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/pos/5.2.kt"); + } + + @TestMetadata("7.1.kt") + public void test7_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/pos/7.1.kt"); } public void testAllFilesPresentInPos() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/constant-literals/real-literals/p-5/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-7/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + } + } + + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-9") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class P_9 extends AbstractDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInP_9() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-9"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-9/neg") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Neg extends AbstractDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + @TestMetadata("1.1.kt") + public void test1_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-9/neg/1.1.kt"); + } + + @TestMetadata("1.2.kt") + public void test1_2() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-9/neg/1.2.kt"); + } + + @TestMetadata("1.3.kt") + public void test1_3() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-9/neg/1.3.kt"); + } + + @TestMetadata("1.4.kt") + public void test1_4() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-9/neg/1.4.kt"); + } + + public void testAllFilesPresentInNeg() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-9/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + } + + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-9/pos") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Pos extends AbstractDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + @TestMetadata("1.1.kt") + public void test1_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-9/pos/1.1.kt"); + } + + @TestMetadata("1.2.kt") + public void test1_2() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-9/pos/1.2.kt"); + } + + @TestMetadata("1.3.kt") + public void test1_3() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-9/pos/1.3.kt"); + } + + @TestMetadata("1.4.kt") + public void test1_4() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-9/pos/1.4.kt"); + } + + public void testAllFilesPresentInPos() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/expressions/when-expression/p-9/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } } } } } - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/when-expression") + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-inference") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class When_expression extends AbstractDiagnosticsTestSpec { + public static class Type_inference extends AbstractDiagnosticsTestSpec { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - public void testAllFilesPresentInWhen_expression() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/when-expression"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + public void testAllFilesPresentInType_inference() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-inference"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11") + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-inference/smart-casts") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class P_11 extends AbstractDiagnosticsTestSpec { + public static class Smart_casts extends AbstractDiagnosticsTestSpec { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - public void testAllFilesPresentInP_11() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + public void testAllFilesPresentInSmart_casts() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-inference/smart-casts"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/neg") + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-inference/smart-casts/smart-casts-sources") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class Neg extends AbstractDiagnosticsTestSpec { + public static class Smart_casts_sources extends AbstractDiagnosticsTestSpec { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - @TestMetadata("1.1.kt") - public void test1_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/neg/1.1.kt"); + public void testAllFilesPresentInSmart_casts_sources() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-inference/smart-casts/smart-casts-sources"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } - @TestMetadata("1.2.kt") - public void test1_2() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/neg/1.2.kt"); - } + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-inference/smart-casts/smart-casts-sources/p-4") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class P_4 extends AbstractDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } - @TestMetadata("3.1.kt") - public void test3_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/neg/3.1.kt"); - } - - @TestMetadata("6.1.kt") - public void test6_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/neg/6.1.kt"); - } - - @TestMetadata("7.1.kt") - public void test7_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/neg/7.1.kt"); - } - - @TestMetadata("8.1.kt") - public void test8_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/neg/8.1.kt"); - } - - @TestMetadata("8.2.kt") - public void test8_2() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/neg/8.2.kt"); - } - - @TestMetadata("8.3.kt") - public void test8_3() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/neg/8.3.kt"); - } - - public void testAllFilesPresentInNeg() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - } - - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/pos") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Pos extends AbstractDiagnosticsTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - @TestMetadata("1.1.kt") - public void test1_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/pos/1.1.kt"); - } - - @TestMetadata("1.2.kt") - public void test1_2() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/pos/1.2.kt"); - } - - @TestMetadata("1.3.kt") - public void test1_3() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/pos/1.3.kt"); - } - - @TestMetadata("3.1.kt") - public void test3_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/pos/3.1.kt"); - } - - @TestMetadata("6.1.kt") - public void test6_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/pos/6.1.kt"); - } - - @TestMetadata("7.1.kt") - public void test7_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/pos/7.1.kt"); - } - - @TestMetadata("8.1.kt") - public void test8_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/pos/8.1.kt"); - } - - @TestMetadata("8.2.kt") - public void test8_2() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/pos/8.2.kt"); - } - - @TestMetadata("8.3.kt") - public void test8_3() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/pos/8.3.kt"); - } - - public void testAllFilesPresentInPos() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-11/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + public void testAllFilesPresentInP_4() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-inference/smart-casts/smart-casts-sources/p-4"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } } } } + } - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-2") + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-system") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Type_system extends AbstractDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInType_system() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-system/introduction") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class P_2 extends AbstractDiagnosticsTestSpec { + public static class Introduction extends AbstractDiagnosticsTestSpec { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - public void testAllFilesPresentInP_2() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-2"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + public void testAllFilesPresentInIntroduction() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/introduction"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-2/pos") + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-system/introduction/p-5") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class Pos extends AbstractDiagnosticsTestSpec { + public static class P_5 extends AbstractDiagnosticsTestSpec { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - @TestMetadata("3.1.kt") - public void test3_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-2/pos/3.1.kt"); + public void testAllFilesPresentInP_5() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/introduction/p-5"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } - @TestMetadata("3.2.kt") - public void test3_2() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-2/pos/3.2.kt"); - } + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-system/introduction/p-5/neg") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Neg extends AbstractDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } - public void testAllFilesPresentInPos() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-2/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + @TestMetadata("2.1.kt") + public void test2_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/type-system/introduction/p-5/neg/2.1.kt"); + } + + @TestMetadata("2.2.kt") + public void test2_2() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/type-system/introduction/p-5/neg/2.2.kt"); + } + + @TestMetadata("2.3.kt") + public void test2_3() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/type-system/introduction/p-5/neg/2.3.kt"); + } + + public void testAllFilesPresentInNeg() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/introduction/p-5/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } } } - } - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-3") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class P_3 extends AbstractDiagnosticsTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInP_3() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-3"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-3/neg") + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-system/introduction/p-7") @TestDataPath("$PROJECT_ROOT") @RunWith(JUnit3RunnerWithInners.class) - public static class Neg extends AbstractDiagnosticsTestSpec { + public static class P_7 extends AbstractDiagnosticsTestSpec { private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); } - @TestMetadata("1.1.kt") - public void test1_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-3/neg/1.1.kt"); + public void testAllFilesPresentInP_7() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/introduction/p-7"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); } - @TestMetadata("2.1.kt") - public void test2_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-3/neg/2.1.kt"); - } + @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/type-system/introduction/p-7/pos") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Pos extends AbstractDiagnosticsTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } - @TestMetadata("2.2.kt") - public void test2_2() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-3/neg/2.2.kt"); - } + @TestMetadata("1.1.kt") + public void test1_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/type-system/introduction/p-7/pos/1.1.kt"); + } - public void testAllFilesPresentInNeg() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-3/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - } + @TestMetadata("2.1.kt") + public void test2_1() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/type-system/introduction/p-7/pos/2.1.kt"); + } - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-3/pos") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Pos extends AbstractDiagnosticsTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - @TestMetadata("1.1.kt") - public void test1_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-3/pos/1.1.kt"); - } - - @TestMetadata("2.1.kt") - public void test2_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-3/pos/2.1.kt"); - } - - @TestMetadata("2.2.kt") - public void test2_2() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-3/pos/2.2.kt"); - } - - @TestMetadata("2.3.kt") - public void test2_3() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-3/pos/2.3.kt"); - } - - public void testAllFilesPresentInPos() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-3/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - } - } - - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-5") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class P_5 extends AbstractDiagnosticsTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInP_5() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-5"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-5/neg") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Neg extends AbstractDiagnosticsTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - @TestMetadata("1.1.kt") - public void test1_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-5/neg/1.1.kt"); - } - - public void testAllFilesPresentInNeg() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-5/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - } - - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-5/pos") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Pos extends AbstractDiagnosticsTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - @TestMetadata("1.1.kt") - public void test1_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-5/pos/1.1.kt"); - } - - public void testAllFilesPresentInPos() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-5/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - } - } - - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-6") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class P_6 extends AbstractDiagnosticsTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInP_6() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-6"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-6/neg") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Neg extends AbstractDiagnosticsTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - @TestMetadata("1.1.kt") - public void test1_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-6/neg/1.1.kt"); - } - - public void testAllFilesPresentInNeg() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-6/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - } - - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-6/pos") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Pos extends AbstractDiagnosticsTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - @TestMetadata("1.1.kt") - public void test1_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-6/pos/1.1.kt"); - } - - public void testAllFilesPresentInPos() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-6/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - } - } - - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class P_7 extends AbstractDiagnosticsTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInP_7() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/neg") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Neg extends AbstractDiagnosticsTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - @TestMetadata("1.1.kt") - public void test1_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/neg/1.1.kt"); - } - - @TestMetadata("1.2.kt") - public void test1_2() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/neg/1.2.kt"); - } - - @TestMetadata("3.1.kt") - public void test3_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/neg/3.1.kt"); - } - - @TestMetadata("3.2.kt") - public void test3_2() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/neg/3.2.kt"); - } - - @TestMetadata("5.1.kt") - public void test5_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/neg/5.1.kt"); - } - - @TestMetadata("5.2.kt") - public void test5_2() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/neg/5.2.kt"); - } - - @TestMetadata("7.1.kt") - public void test7_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/neg/7.1.kt"); - } - - public void testAllFilesPresentInNeg() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - } - - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/pos") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Pos extends AbstractDiagnosticsTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - @TestMetadata("1.1.kt") - public void test1_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/pos/1.1.kt"); - } - - @TestMetadata("1.2.kt") - public void test1_2() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/pos/1.2.kt"); - } - - @TestMetadata("1.3.kt") - public void test1_3() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/pos/1.3.kt"); - } - - @TestMetadata("1.4.kt") - public void test1_4() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/pos/1.4.kt"); - } - - @TestMetadata("3.1.kt") - public void test3_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/pos/3.1.kt"); - } - - @TestMetadata("3.2.kt") - public void test3_2() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/pos/3.2.kt"); - } - - @TestMetadata("5.1.kt") - public void test5_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/pos/5.1.kt"); - } - - @TestMetadata("5.2.kt") - public void test5_2() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/pos/5.2.kt"); - } - - @TestMetadata("7.1.kt") - public void test7_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/pos/7.1.kt"); - } - - public void testAllFilesPresentInPos() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-7/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - } - } - - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-9") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class P_9 extends AbstractDiagnosticsTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - public void testAllFilesPresentInP_9() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-9"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-9/neg") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Neg extends AbstractDiagnosticsTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - @TestMetadata("1.1.kt") - public void test1_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-9/neg/1.1.kt"); - } - - @TestMetadata("1.2.kt") - public void test1_2() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-9/neg/1.2.kt"); - } - - @TestMetadata("1.3.kt") - public void test1_3() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-9/neg/1.3.kt"); - } - - @TestMetadata("1.4.kt") - public void test1_4() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-9/neg/1.4.kt"); - } - - public void testAllFilesPresentInNeg() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-9/neg"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); - } - } - - @TestMetadata("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-9/pos") - @TestDataPath("$PROJECT_ROOT") - @RunWith(JUnit3RunnerWithInners.class) - public static class Pos extends AbstractDiagnosticsTestSpec { - private void runTest(String testDataFilePath) throws Exception { - KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); - } - - @TestMetadata("1.1.kt") - public void test1_1() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-9/pos/1.1.kt"); - } - - @TestMetadata("1.2.kt") - public void test1_2() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-9/pos/1.2.kt"); - } - - @TestMetadata("1.3.kt") - public void test1_3() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-9/pos/1.3.kt"); - } - - @TestMetadata("1.4.kt") - public void test1_4() throws Exception { - runTest("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-9/pos/1.4.kt"); - } - - public void testAllFilesPresentInPos() throws Exception { - KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/when-expression/p-9/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + public void testAllFilesPresentInPos() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/type-system/introduction/p-7/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } } } } diff --git a/compiler/tests-spec/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestSpecGenerated.java b/compiler/tests-spec/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestSpecGenerated.java index ae716d2c94d..441cb210cf7 100644 --- a/compiler/tests-spec/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestSpecGenerated.java +++ b/compiler/tests-spec/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestSpecGenerated.java @@ -1,6 +1,6 @@ /* - * Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + * Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license + * that can be found in the license/LICENSE.txt file. */ package org.jetbrains.kotlin.codegen; @@ -633,6 +633,63 @@ public class BlackBoxCodegenTestSpecGenerated extends AbstractBlackBoxCodegenTes } } } + + @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/type-system") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Type_system extends AbstractBlackBoxCodegenTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInType_system() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/type-system"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/type-system/introduction") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Introduction extends AbstractBlackBoxCodegenTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInIntroduction() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/type-system/introduction"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/type-system/introduction/p-5") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class P_5 extends AbstractBlackBoxCodegenTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + public void testAllFilesPresentInP_5() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/type-system/introduction/p-5"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + + @TestMetadata("compiler/tests-spec/testData/codegen/box/linked/type-system/introduction/p-5/pos") + @TestDataPath("$PROJECT_ROOT") + @RunWith(JUnit3RunnerWithInners.class) + public static class Pos extends AbstractBlackBoxCodegenTestSpec { + private void runTest(String testDataFilePath) throws Exception { + KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath); + } + + @TestMetadata("2.1.kt") + public void test2_1() throws Exception { + runTest("compiler/tests-spec/testData/codegen/box/linked/type-system/introduction/p-5/pos/2.1.kt"); + } + + public void testAllFilesPresentInPos() throws Exception { + KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/tests-spec/testData/codegen/box/linked/type-system/introduction/p-5/pos"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true); + } + } + } + } + } } @TestMetadata("compiler/tests-spec/testData/codegen/box/notLinked") diff --git a/compiler/tests-spec/tests/org/jetbrains/kotlin/parsing/ParsingTestSpecGenerated.java b/compiler/tests-spec/tests/org/jetbrains/kotlin/parsing/ParsingTestSpecGenerated.java index 087e47dc88e..cb2c7e15350 100644 --- a/compiler/tests-spec/tests/org/jetbrains/kotlin/parsing/ParsingTestSpecGenerated.java +++ b/compiler/tests-spec/tests/org/jetbrains/kotlin/parsing/ParsingTestSpecGenerated.java @@ -1,6 +1,6 @@ /* - * Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + * Copyright 2010-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license + * that can be found in the license/LICENSE.txt file. */ package org.jetbrains.kotlin.parsing; diff --git a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/models/LinkedSpecTest.kt b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/models/LinkedSpecTest.kt index 4d7f3972a02..0ce29285e76 100644 --- a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/models/LinkedSpecTest.kt +++ b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/models/LinkedSpecTest.kt @@ -40,7 +40,7 @@ class LinkedSpecTest( testArea: TestArea, testType: TestType, val place: SpecPlace, - private val relevantPlaces: List?, + val relevantPlaces: List?, testNumber: Int, description: String, cases: SpecTestCasesSet, diff --git a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/parsers/CommonParser.kt b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/parsers/CommonParser.kt index 2e400fab151..d82f30e1a56 100644 --- a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/parsers/CommonParser.kt +++ b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/parsers/CommonParser.kt @@ -28,7 +28,13 @@ object CommonParser { fun String.withSpaces() = replace("_", " ") private fun isPathMatched(pathPartRegex: String, testFilePath: String) = - Pattern.compile(testPathBaseRegexTemplate.format(pathPartRegex)).matcher(testFilePath).find() + parseBasePath(pathPartRegex, testFilePath).find() + + private fun parseBasePath(pathPartRegex: String, testFilePath: String) = + Pattern.compile(testPathBaseRegexTemplate.format(pathPartRegex)).matcher(testFilePath) + + fun parsePath(pathPartRegex: String, testFilePath: String) = + Pattern.compile(testPathBaseRegexTemplate.format(pathPartRegex)).matcher(testFilePath) fun parseSpecTest(testFilePath: String, files: TestFiles) = when { isPathMatched(LinkedSpecTestPatterns.pathPartRegex, testFilePath) -> diff --git a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/parsers/Patterns.kt b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/parsers/Patterns.kt index 20f1ee5c5b1..2bd90f6188e 100644 --- a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/parsers/Patterns.kt +++ b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/parsers/Patterns.kt @@ -65,7 +65,7 @@ object NotLinkedSpecTestPatterns : BasePatterns { } object LinkedSpecTestPatterns : BasePatterns { - private const val FILENAME_REGEX = """(?$INTEGER_REGEX)\.(?$INTEGER_REGEX)\.kt""" + const val FILENAME_REGEX = """(?$INTEGER_REGEX)\.(?$INTEGER_REGEX)\.kt""" override val pathPartRegex = """${SpecTestLinkedType.LINKED.testDataPath}$ps$sectionsInPathRegex${ps}p-(?$INTEGER_REGEX)""" diff --git a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/tasks/GenerateFeatureInteractionSpecTestData.kt b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/tasks/GenerateFeatureInteractionSpecTestData.kt index 65d0a59aae3..210ec244eec 100644 --- a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/tasks/GenerateFeatureInteractionSpecTestData.kt +++ b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/tasks/GenerateFeatureInteractionSpecTestData.kt @@ -11,7 +11,7 @@ import org.jetbrains.kotlin.spec.generators.templates.Feature import org.jetbrains.kotlin.spec.generators.templates.generationLinkedSpecTestDataConfig import org.jetbrains.kotlin.spec.generators.templates.generationSpecTestDataConfigGroup -fun main(args: Array) { +fun main() { generationSpecTestDataConfigGroup(regenerateTests = true) { generationLinkedSpecTestDataConfig { testArea = TestArea.PSI diff --git a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/tasks/GenerateJsonTestsMap.kt b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/tasks/GenerateJsonTestsMap.kt index ec88548b705..ff69d6aed85 100644 --- a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/tasks/GenerateJsonTestsMap.kt +++ b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/tasks/GenerateJsonTestsMap.kt @@ -16,7 +16,7 @@ import java.io.File private const val OUT_DIR = "out" private const val OUT_FILENAME = "testsMap.json" -fun main(args: Array) { +fun main() { val testsMap = JsonObject() File(TESTDATA_PATH).walkTopDown().forEach { diff --git a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/tasks/GenerateSpecTests.kt b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/tasks/GenerateSpecTests.kt index 09f48940cdb..756c10721c0 100644 --- a/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/tasks/GenerateSpecTests.kt +++ b/compiler/tests-spec/tests/org/jetbrains/kotlin/spec/tasks/GenerateSpecTests.kt @@ -5,14 +5,118 @@ package org.jetbrains.kotlin.spec.tasks -import org.jetbrains.kotlin.generators.tests.generator.testGroup import org.jetbrains.kotlin.checkers.AbstractDiagnosticsTestSpec import org.jetbrains.kotlin.codegen.AbstractBlackBoxCodegenTestSpec +import org.jetbrains.kotlin.generators.tests.generator.testGroup import org.jetbrains.kotlin.parsing.AbstractParsingTestSpec -import org.jetbrains.kotlin.spec.utils.GeneralConfiguration.TEST_PATH +import org.jetbrains.kotlin.spec.models.LinkedSpecTest +import org.jetbrains.kotlin.spec.parsers.CommonParser import org.jetbrains.kotlin.spec.utils.GeneralConfiguration.TESTDATA_PATH +import org.jetbrains.kotlin.spec.utils.GeneralConfiguration.TEST_PATH +import java.io.File +import java.lang.StringBuilder -fun generateTests() { +private data class TestReferences(var testsRelevant: MutableSet? = null, var testNumber: Int = 0) + +private typealias TestsBySections = MutableMap +private typealias TestsByParagraph = MutableMap +private typealias TestsByType = MutableMap +private typealias TestsBySentence = MutableMap + +private object TestsMapGenerator { + private const val TESTS_MAP_FILE_HEADER = """/* + * This file is generated by {@link org.jetbrains.kotlin.spec.tasks.generateTests}. DO NOT MODIFY MANUALLY. + * This file is used in the HTML version of the Kotlin Specification (https://kotlin.github.io/kotlin-spec) to show tests coverage for sentences. + * + * Content format: + * + * {paragraphNumber} + * {testType: neg|pos}: {sentenceNumber}-{numberOfTests|testPathToAnotherSection}, ... + */ +""" + private const val LINKED_TESTS_PATH = "$TESTDATA_PATH/diagnostics/linked" + private const val TESTS_MAP_FILENAME = "testsMap.txt" + private val lineBreak = System.lineSeparator() + + private fun createObjectsPath(specTest: LinkedSpecTest, testsMap: TestsBySections): TestReferences { + val sections = specTest.place.sections.joinToString("/") + val testsBySection = testsMap.getOrPut(sections) { mutableMapOf() } + val testsByParagraph = testsBySection.getOrPut(specTest.place.paragraphNumber) { mutableMapOf() } + val testsByType = testsByParagraph.getOrPut(specTest.testType.type) { mutableMapOf() } + + return testsByType.getOrPut(specTest.place.sentenceNumber) { TestReferences() } + } + + private fun appendRelevantTests(specTest: LinkedSpecTest, testsMap: TestsBySections) { + if (specTest.relevantPlaces == null) return + + specTest.relevantPlaces.forEach { + val sections = it.sections.joinToString("/") + val testsBySection = testsMap.getOrPut(sections) { mutableMapOf() } + val testsByParagraph = testsBySection.getOrPut(it.paragraphNumber) { mutableMapOf() } + val testsByType = testsByParagraph.getOrPut(specTest.testType.type) { mutableMapOf() } + val testReferences = testsByType.getOrPut(it.sentenceNumber) { TestReferences() } + + if (testReferences.testsRelevant == null) { + testReferences.testsRelevant = mutableSetOf() + } + testReferences.testsRelevant!!.add( + "${specTest.sections.joinToString("/")}/${specTest.place.paragraphNumber}/${specTest.testType.type}/${specTest.place.sentenceNumber}.${specTest.testNumber}.kt" + ) + } + } + + private fun buildTestsMapAsText(testsMap: TestsByParagraph): String { + val testsMapAsText = StringBuilder() + + testsMap.forEach { (paragraphNumber, testsByType) -> + testsMapAsText.append("$paragraphNumber$lineBreak") + + testsByType.forEach { (testType, testsBySentence) -> + val sentenceTests = mutableListOf() + + testsMapAsText.append(" $testType: ") + testsBySentence.forEach { (sentenceNumber, tests) -> + if (tests.testNumber != 0) { + sentenceTests.add("$sentenceNumber-${tests.testNumber}") + } + if (tests.testsRelevant != null) { + tests.testsRelevant!!.forEach { + sentenceTests.add("$sentenceNumber-$it") + } + } + } + testsMapAsText.append(sentenceTests.joinToString(", ") + lineBreak) + } + } + + return testsMapAsText.toString() + } + + fun buildTestsMapPerSection() { + val testsMap: TestsBySections = mutableMapOf() + + File(LINKED_TESTS_PATH).walkTopDown().forEach { + if (!it.isFile || it.extension != "kt") return@forEach + + val (specTest, _) = CommonParser.parseSpecTest(it.canonicalPath, mapOf("main.kt" to it.readText())) + + if (specTest is LinkedSpecTest) { + val testReferences = createObjectsPath(specTest, testsMap) + testReferences.testNumber++ + appendRelevantTests(specTest, testsMap) + } + } + testsMap.forEach { (sections, testsByParagraph) -> + val testsMapFile = File("$LINKED_TESTS_PATH/$sections/$TESTS_MAP_FILENAME") + val testsMapAsText = buildTestsMapAsText(testsByParagraph) + + testsMapFile.writeText(TESTS_MAP_FILE_HEADER + lineBreak + testsMapAsText) + } + } +} + +private fun generateTests() { testGroup(TEST_PATH, TESTDATA_PATH) { testClass { model("diagnostics", excludeDirs = listOf("helpers")) @@ -26,4 +130,7 @@ fun generateTests() { } } -fun main(args: Array) = generateTests() +fun main() { + TestsMapGenerator.buildTestsMapPerSection() + generateTests() +}