-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[cfe] Add test to verify legacy main method requirements
Change-Id: I3173d85ffe1d92840458fb28fcf2073bec3899ad Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166241 Reviewed-by: Jens Johansen <jensj@google.com> Commit-Queue: Johnni Winther <johnniwinther@google.com>
- Loading branch information
1 parent
f122752
commit a49217b
Showing
13 changed files
with
106 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// Copyright (c) 2020, 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. | ||
|
||
import 'main_declaration_lib.dart'; | ||
|
||
main() {} |
14 changes: 14 additions & 0 deletions
14
pkg/front_end/testcases/general/main_declaration.dart.outline.expect
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
library; | ||
import self as self; | ||
|
||
import "org-dartlang-testcase:///main_declaration_lib.dart"; | ||
|
||
static method main() → dynamic | ||
; | ||
|
||
library; | ||
import self as self2; | ||
import "dart:core" as core; | ||
|
||
static method main(core::String* args) → dynamic | ||
; |
12 changes: 12 additions & 0 deletions
12
pkg/front_end/testcases/general/main_declaration.dart.strong.expect
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
library; | ||
import self as self; | ||
|
||
import "org-dartlang-testcase:///main_declaration_lib.dart"; | ||
|
||
static method main() → dynamic {} | ||
|
||
library; | ||
import self as self2; | ||
import "dart:core" as core; | ||
|
||
static method main(core::String* args) → dynamic {} |
12 changes: 12 additions & 0 deletions
12
pkg/front_end/testcases/general/main_declaration.dart.strong.transformed.expect
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
library; | ||
import self as self; | ||
|
||
import "org-dartlang-testcase:///main_declaration_lib.dart"; | ||
|
||
static method main() → dynamic {} | ||
|
||
library; | ||
import self as self2; | ||
import "dart:core" as core; | ||
|
||
static method main(core::String* args) → dynamic {} |
3 changes: 3 additions & 0 deletions
3
pkg/front_end/testcases/general/main_declaration.dart.textual_outline.expect
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import 'main_declaration_lib.dart'; | ||
|
||
main() {} |
3 changes: 3 additions & 0 deletions
3
pkg/front_end/testcases/general/main_declaration.dart.textual_outline_modelled.expect
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import 'main_declaration_lib.dart'; | ||
|
||
main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// Copyright (c) 2020, 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. | ||
|
||
// This would be an invalid main declaration in a null safe library. | ||
main(String args) {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// Copyright (c) 2020, 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. | ||
|
||
// @dart=2.8 | ||
|
||
import 'main_declaration_lib.dart'; | ||
|
||
main() {} |
4 changes: 4 additions & 0 deletions
4
pkg/front_end/testcases/nnbd_mixed/main_declaration.dart.textual_outline.expect
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
// @dart = 2.8 | ||
import 'main_declaration_lib.dart'; | ||
|
||
main() {} |
4 changes: 4 additions & 0 deletions
4
pkg/front_end/testcases/nnbd_mixed/main_declaration.dart.textual_outline_modelled.expect
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
// @dart = 2.8 | ||
import 'main_declaration_lib.dart'; | ||
|
||
main() {} |
12 changes: 12 additions & 0 deletions
12
pkg/front_end/testcases/nnbd_mixed/main_declaration.dart.weak.expect
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
library; | ||
import self as self; | ||
|
||
import "org-dartlang-testcase:///main_declaration_lib.dart"; | ||
|
||
static method main() → dynamic {} | ||
|
||
library; | ||
import self as self2; | ||
import "dart:core" as core; | ||
|
||
static method main(core::String* args) → dynamic {} |
12 changes: 12 additions & 0 deletions
12
pkg/front_end/testcases/nnbd_mixed/main_declaration.dart.weak.transformed.expect
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
library; | ||
import self as self; | ||
|
||
import "org-dartlang-testcase:///main_declaration_lib.dart"; | ||
|
||
static method main() → dynamic {} | ||
|
||
library; | ||
import self as self2; | ||
import "dart:core" as core; | ||
|
||
static method main(core::String* args) → dynamic {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// Copyright (c) 2020, 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. | ||
|
||
// @dart=2.8 | ||
|
||
// This would be an invalid main declaration in a null safe library. | ||
main(String args) {} |