Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(104)

Unified Diff: tests/compiler/dart2js/constant_expression_test.dart

Issue 2990223002: Reformat untouched files. (Closed)
Patch Set: Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tests/compiler/dart2js/constant_expression_test.dart
diff --git a/tests/compiler/dart2js/constant_expression_test.dart b/tests/compiler/dart2js/constant_expression_test.dart
index 8be001ea3527ce69a03e88c6a534b55b78653ef4..196d5391170d61f266a0e428c94dfef1ed65abc2 100644
--- a/tests/compiler/dart2js/constant_expression_test.dart
+++ b/tests/compiler/dart2js/constant_expression_test.dart
@@ -80,8 +80,7 @@ const List<TestData> DATA = const [
'const String.fromEnvironment("foo", defaultValue: "bar")',
ConstantExpressionKind.STRING_FROM_ENVIRONMENT),
]),
- const TestData(
- '''
+ const TestData('''
class A {
const A();
}
@@ -94,54 +93,49 @@ class C extends B {
const C({field1: 42, this.field2: false}) : super(field1);
const C.named([field = false]) : this(field1: field, field2: field);
}
-''',
- const [
- const ConstantData('const Object()', ConstantExpressionKind.CONSTRUCTED,
- type: 'Object', fields: const {}),
- const ConstantData('const A()', ConstantExpressionKind.CONSTRUCTED,
- type: 'A', fields: const {}),
- const ConstantData('const B(0)', ConstantExpressionKind.CONSTRUCTED,
- type: 'B', fields: const {'field(B#field1)': '0'}),
- const ConstantData(
- 'const B(const A())', ConstantExpressionKind.CONSTRUCTED,
- type: 'B', fields: const {'field(B#field1)': 'const A()'}),
- const ConstantData('const C()', ConstantExpressionKind.CONSTRUCTED,
- type: 'C',
- fields: const {
- 'field(B#field1)': '42',
- 'field(C#field2)': 'false',
- }),
- const ConstantData(
- 'const C(field1: 87)', ConstantExpressionKind.CONSTRUCTED,
- type: 'C',
- fields: const {
- 'field(B#field1)': '87',
- 'field(C#field2)': 'false',
- }),
- const ConstantData(
- 'const C(field2: true)', ConstantExpressionKind.CONSTRUCTED,
- type: 'C',
- fields: const {
- 'field(B#field1)': '42',
- 'field(C#field2)': 'true',
- }),
- const ConstantData(
- 'const C.named()', ConstantExpressionKind.CONSTRUCTED,
- type: 'C',
- fields: const {
- 'field(B#field1)': 'false',
- 'field(C#field2)': 'false',
- }),
- const ConstantData(
- 'const C.named(87)', ConstantExpressionKind.CONSTRUCTED,
- type: 'C',
- fields: const {
- 'field(B#field1)': '87',
- 'field(C#field2)': '87',
- }),
- ]),
- const TestData(
- '''
+''', const [
+ const ConstantData('const Object()', ConstantExpressionKind.CONSTRUCTED,
+ type: 'Object', fields: const {}),
+ const ConstantData('const A()', ConstantExpressionKind.CONSTRUCTED,
+ type: 'A', fields: const {}),
+ const ConstantData('const B(0)', ConstantExpressionKind.CONSTRUCTED,
+ type: 'B', fields: const {'field(B#field1)': '0'}),
+ const ConstantData('const B(const A())', ConstantExpressionKind.CONSTRUCTED,
+ type: 'B', fields: const {'field(B#field1)': 'const A()'}),
+ const ConstantData('const C()', ConstantExpressionKind.CONSTRUCTED,
+ type: 'C',
+ fields: const {
+ 'field(B#field1)': '42',
+ 'field(C#field2)': 'false',
+ }),
+ const ConstantData(
+ 'const C(field1: 87)', ConstantExpressionKind.CONSTRUCTED,
+ type: 'C',
+ fields: const {
+ 'field(B#field1)': '87',
+ 'field(C#field2)': 'false',
+ }),
+ const ConstantData(
+ 'const C(field2: true)', ConstantExpressionKind.CONSTRUCTED,
+ type: 'C',
+ fields: const {
+ 'field(B#field1)': '42',
+ 'field(C#field2)': 'true',
+ }),
+ const ConstantData('const C.named()', ConstantExpressionKind.CONSTRUCTED,
+ type: 'C',
+ fields: const {
+ 'field(B#field1)': 'false',
+ 'field(C#field2)': 'false',
+ }),
+ const ConstantData('const C.named(87)', ConstantExpressionKind.CONSTRUCTED,
+ type: 'C',
+ fields: const {
+ 'field(B#field1)': '87',
+ 'field(C#field2)': '87',
+ }),
+ ]),
+ const TestData('''
class A<T> implements B {
final field1;
const A({this.field1:42});
@@ -153,42 +147,41 @@ class B<S> implements C {
class C<U> {
const factory C({field1}) = A<B<double>>;
}
-''',
- const [
- const ConstantData('const A()', ConstantExpressionKind.CONSTRUCTED,
- type: 'A<dynamic>', fields: const {'field(A#field1)': '42'}),
- const ConstantData(
- 'const A<int>(field1: 87)', ConstantExpressionKind.CONSTRUCTED,
- type: 'A<int>', fields: const {'field(A#field1)': '87'}),
- const ConstantData('const B()', ConstantExpressionKind.CONSTRUCTED,
- type: 'A<B<dynamic>>',
- fields: const {
- 'field(A#field1)': '42',
- }),
- const ConstantData('const B<int>()', ConstantExpressionKind.CONSTRUCTED,
- type: 'A<B<int>>',
- fields: const {
- 'field(A#field1)': '42',
- }),
- const ConstantData(
- 'const B<int>(field1: 87)', ConstantExpressionKind.CONSTRUCTED,
- type: 'A<B<int>>',
- fields: const {
- 'field(A#field1)': '87',
- }),
- const ConstantData(
- 'const C<int>(field1: 87)', ConstantExpressionKind.CONSTRUCTED,
- type: 'A<B<double>>',
- fields: const {
- 'field(A#field1)': '87',
- }),
- const ConstantData(
- 'const B<int>.named()', ConstantExpressionKind.CONSTRUCTED,
- type: 'A<int>',
- fields: const {
- 'field(A#field1)': '42',
- }),
- ]),
+''', const [
+ const ConstantData('const A()', ConstantExpressionKind.CONSTRUCTED,
+ type: 'A<dynamic>', fields: const {'field(A#field1)': '42'}),
+ const ConstantData(
+ 'const A<int>(field1: 87)', ConstantExpressionKind.CONSTRUCTED,
+ type: 'A<int>', fields: const {'field(A#field1)': '87'}),
+ const ConstantData('const B()', ConstantExpressionKind.CONSTRUCTED,
+ type: 'A<B<dynamic>>',
+ fields: const {
+ 'field(A#field1)': '42',
+ }),
+ const ConstantData('const B<int>()', ConstantExpressionKind.CONSTRUCTED,
+ type: 'A<B<int>>',
+ fields: const {
+ 'field(A#field1)': '42',
+ }),
+ const ConstantData(
+ 'const B<int>(field1: 87)', ConstantExpressionKind.CONSTRUCTED,
+ type: 'A<B<int>>',
+ fields: const {
+ 'field(A#field1)': '87',
+ }),
+ const ConstantData(
+ 'const C<int>(field1: 87)', ConstantExpressionKind.CONSTRUCTED,
+ type: 'A<B<double>>',
+ fields: const {
+ 'field(A#field1)': '87',
+ }),
+ const ConstantData(
+ 'const B<int>.named()', ConstantExpressionKind.CONSTRUCTED,
+ type: 'A<int>',
+ fields: const {
+ 'field(A#field1)': '42',
+ }),
+ ]),
];
main() {
« no previous file with comments | « tests/compiler/dart2js/constant_expression_evaluate_test.dart ('k') | tests/compiler/dart2js/error_token_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698