From 645f959a13935bb7c2e7df6c92f8e6e4bd82728f Mon Sep 17 00:00:00 2001 From: sgrekhov Date: Thu, 31 Aug 2023 12:25:42 +0300 Subject: [PATCH] #2145. Rename Local Variable declaration tests. Delete duplicates --- ...ax_t14.dart => declared_type_A02_t01.dart} | 0 ...ax_t15.dart => declared_type_A02_t02.dart} | 0 ..._t11.dart => reference_error_A01_t01.dart} | 0 .../{syntax_t01.dart => syntax_A01_t01.dart} | 0 .../{syntax_t02.dart => syntax_A01_t02.dart} | 0 .../{syntax_t03.dart => syntax_A01_t03.dart} | 0 .../{syntax_t04.dart => syntax_A01_t04.dart} | 0 .../{syntax_t12.dart => syntax_A01_t05.dart} | 0 .../{syntax_t13.dart => syntax_A01_t06.dart} | 0 .../{syntax_t05.dart => syntax_A02_t01.dart} | 14 +++++++++-- .../{syntax_t06.dart => syntax_A02_t02.dart} | 16 +++++++++--- .../{syntax_t07.dart => syntax_A02_t03.dart} | 0 .../{syntax_t08.dart => syntax_A02_t04.dart} | 0 .../syntax_t18.dart | 21 ---------------- .../syntax_t19.dart | 25 ------------------- .../syntax_t20.dart | 21 ---------------- 16 files changed, 25 insertions(+), 72 deletions(-) rename Language/Statements/Local_Variable_Declaration/{syntax_t14.dart => declared_type_A02_t01.dart} (100%) rename Language/Statements/Local_Variable_Declaration/{syntax_t15.dart => declared_type_A02_t02.dart} (100%) rename Language/Statements/Local_Variable_Declaration/{syntax_t11.dart => reference_error_A01_t01.dart} (100%) rename Language/Statements/Local_Variable_Declaration/{syntax_t01.dart => syntax_A01_t01.dart} (100%) rename Language/Statements/Local_Variable_Declaration/{syntax_t02.dart => syntax_A01_t02.dart} (100%) rename Language/Statements/Local_Variable_Declaration/{syntax_t03.dart => syntax_A01_t03.dart} (100%) rename Language/Statements/Local_Variable_Declaration/{syntax_t04.dart => syntax_A01_t04.dart} (100%) rename Language/Statements/Local_Variable_Declaration/{syntax_t12.dart => syntax_A01_t05.dart} (100%) rename Language/Statements/Local_Variable_Declaration/{syntax_t13.dart => syntax_A01_t06.dart} (100%) rename Language/Statements/Local_Variable_Declaration/{syntax_t05.dart => syntax_A02_t01.dart} (78%) rename Language/Statements/Local_Variable_Declaration/{syntax_t06.dart => syntax_A02_t02.dart} (78%) rename Language/Statements/Local_Variable_Declaration/{syntax_t07.dart => syntax_A02_t03.dart} (100%) rename Language/Statements/Local_Variable_Declaration/{syntax_t08.dart => syntax_A02_t04.dart} (100%) delete mode 100644 Language/Statements/Local_Variable_Declaration/syntax_t18.dart delete mode 100644 Language/Statements/Local_Variable_Declaration/syntax_t19.dart delete mode 100644 Language/Statements/Local_Variable_Declaration/syntax_t20.dart diff --git a/Language/Statements/Local_Variable_Declaration/syntax_t14.dart b/Language/Statements/Local_Variable_Declaration/declared_type_A02_t01.dart similarity index 100% rename from Language/Statements/Local_Variable_Declaration/syntax_t14.dart rename to Language/Statements/Local_Variable_Declaration/declared_type_A02_t01.dart diff --git a/Language/Statements/Local_Variable_Declaration/syntax_t15.dart b/Language/Statements/Local_Variable_Declaration/declared_type_A02_t02.dart similarity index 100% rename from Language/Statements/Local_Variable_Declaration/syntax_t15.dart rename to Language/Statements/Local_Variable_Declaration/declared_type_A02_t02.dart diff --git a/Language/Statements/Local_Variable_Declaration/syntax_t11.dart b/Language/Statements/Local_Variable_Declaration/reference_error_A01_t01.dart similarity index 100% rename from Language/Statements/Local_Variable_Declaration/syntax_t11.dart rename to Language/Statements/Local_Variable_Declaration/reference_error_A01_t01.dart diff --git a/Language/Statements/Local_Variable_Declaration/syntax_t01.dart b/Language/Statements/Local_Variable_Declaration/syntax_A01_t01.dart similarity index 100% rename from Language/Statements/Local_Variable_Declaration/syntax_t01.dart rename to Language/Statements/Local_Variable_Declaration/syntax_A01_t01.dart diff --git a/Language/Statements/Local_Variable_Declaration/syntax_t02.dart b/Language/Statements/Local_Variable_Declaration/syntax_A01_t02.dart similarity index 100% rename from Language/Statements/Local_Variable_Declaration/syntax_t02.dart rename to Language/Statements/Local_Variable_Declaration/syntax_A01_t02.dart diff --git a/Language/Statements/Local_Variable_Declaration/syntax_t03.dart b/Language/Statements/Local_Variable_Declaration/syntax_A01_t03.dart similarity index 100% rename from Language/Statements/Local_Variable_Declaration/syntax_t03.dart rename to Language/Statements/Local_Variable_Declaration/syntax_A01_t03.dart diff --git a/Language/Statements/Local_Variable_Declaration/syntax_t04.dart b/Language/Statements/Local_Variable_Declaration/syntax_A01_t04.dart similarity index 100% rename from Language/Statements/Local_Variable_Declaration/syntax_t04.dart rename to Language/Statements/Local_Variable_Declaration/syntax_A01_t04.dart diff --git a/Language/Statements/Local_Variable_Declaration/syntax_t12.dart b/Language/Statements/Local_Variable_Declaration/syntax_A01_t05.dart similarity index 100% rename from Language/Statements/Local_Variable_Declaration/syntax_t12.dart rename to Language/Statements/Local_Variable_Declaration/syntax_A01_t05.dart diff --git a/Language/Statements/Local_Variable_Declaration/syntax_t13.dart b/Language/Statements/Local_Variable_Declaration/syntax_A01_t06.dart similarity index 100% rename from Language/Statements/Local_Variable_Declaration/syntax_t13.dart rename to Language/Statements/Local_Variable_Declaration/syntax_A01_t06.dart diff --git a/Language/Statements/Local_Variable_Declaration/syntax_t05.dart b/Language/Statements/Local_Variable_Declaration/syntax_A02_t01.dart similarity index 78% rename from Language/Statements/Local_Variable_Declaration/syntax_t05.dart rename to Language/Statements/Local_Variable_Declaration/syntax_A02_t01.dart index 6f0d075d1d..b280884561 100644 --- a/Language/Statements/Local_Variable_Declaration/syntax_t05.dart +++ b/Language/Statements/Local_Variable_Declaration/syntax_A02_t01.dart @@ -16,10 +16,20 @@ main() { { - int? id; + int? id1; + var id2; + final id3 = 1; } - id = null; + id1 = null; //^ // [analyzer] unspecified +// [cfe] unspecified + print(id2); +// ^^^ +// [analyzer] unspecified +// [cfe] unspecified + print(id3); +// ^^^ +// [analyzer] unspecified // [cfe] unspecified } diff --git a/Language/Statements/Local_Variable_Declaration/syntax_t06.dart b/Language/Statements/Local_Variable_Declaration/syntax_A02_t02.dart similarity index 78% rename from Language/Statements/Local_Variable_Declaration/syntax_t06.dart rename to Language/Statements/Local_Variable_Declaration/syntax_A02_t02.dart index 415aca2aca..3def696f20 100644 --- a/Language/Statements/Local_Variable_Declaration/syntax_t06.dart +++ b/Language/Statements/Local_Variable_Declaration/syntax_A02_t02.dart @@ -16,11 +16,21 @@ main() { { - int id; + int id1; + var id2; + final id3 = 1; } { - id = null; -// ^ + id1 = null; +// ^^^ +// [analyzer] unspecified +// [cfe] unspecified + print(id2); +// ^^^ +// [analyzer] unspecified +// [cfe] unspecified + print(id3); +// ^^^ // [analyzer] unspecified // [cfe] unspecified } diff --git a/Language/Statements/Local_Variable_Declaration/syntax_t07.dart b/Language/Statements/Local_Variable_Declaration/syntax_A02_t03.dart similarity index 100% rename from Language/Statements/Local_Variable_Declaration/syntax_t07.dart rename to Language/Statements/Local_Variable_Declaration/syntax_A02_t03.dart diff --git a/Language/Statements/Local_Variable_Declaration/syntax_t08.dart b/Language/Statements/Local_Variable_Declaration/syntax_A02_t04.dart similarity index 100% rename from Language/Statements/Local_Variable_Declaration/syntax_t08.dart rename to Language/Statements/Local_Variable_Declaration/syntax_A02_t04.dart diff --git a/Language/Statements/Local_Variable_Declaration/syntax_t18.dart b/Language/Statements/Local_Variable_Declaration/syntax_t18.dart deleted file mode 100644 index 69d535b0c1..0000000000 --- a/Language/Statements/Local_Variable_Declaration/syntax_t18.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -/// @assertion A variable declaration statement declares a new local variable. -/// localVariableDeclaration: -/// initializedVariableDeclaration ’;’ -/// ; -/// @description Checks that the variable 'var id;' declared in a block is not -/// available in a scope that encloses this block. -/// @author iefremov - -main() { - { - var id; - } - id = null; -//^ -// [analyzer] unspecified -// [cfe] unspecified -} diff --git a/Language/Statements/Local_Variable_Declaration/syntax_t19.dart b/Language/Statements/Local_Variable_Declaration/syntax_t19.dart deleted file mode 100644 index c0c71ab851..0000000000 --- a/Language/Statements/Local_Variable_Declaration/syntax_t19.dart +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -/// @assertion A variable declaration statement declares a new local variable. -/// localVariableDeclaration: -/// initializedVariableDeclaration ’;’ -/// ; -/// @description Checks that the variable declared 'var id;' in a block is not -/// available in another block that isn't included in the first one. -/// @author iefremov - - -main() { - { - var id; - } - - { - id = null; -// ^ -// [analyzer] unspecified -// [cfe] unspecified - } -} diff --git a/Language/Statements/Local_Variable_Declaration/syntax_t20.dart b/Language/Statements/Local_Variable_Declaration/syntax_t20.dart deleted file mode 100644 index 1096dee738..0000000000 --- a/Language/Statements/Local_Variable_Declaration/syntax_t20.dart +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file -// for details. All rights reserved. Use of this source code is governed by a -// BSD-style license that can be found in the LICENSE file. - -/// @assertion A variable declaration statement declares a new local variable. -/// localVariableDeclaration: -/// initializedVariableDeclaration ’;’ -/// ;. -/// @description Checks that a variable is introduced into the scope after a -/// variable declaration statement is evaluated, and the name of this variable -/// cannot be used in its initialization. -/// @author iefremov - - -main() { - var x; - var f = () { x = f; }; -// ^ -// [analyzer] unspecified -// [cfe] unspecified -}