Skip to content

Commit

Permalink
Enable tests for a fixed issue
Browse files Browse the repository at this point in the history
#41976

Change-Id: Ia294b421f52a9cccd98198e16fd17d3eff7e9238
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153941
Reviewed-by: Johnni Winther <[email protected]>
Commit-Queue: Anna Gringauze <[email protected]>
  • Loading branch information
Anna Gringauze authored and [email protected] committed Jul 10, 2020
1 parent cf57f88 commit 57cf6eb
Showing 1 changed file with 20 additions and 9 deletions.
29 changes: 20 additions & 9 deletions pkg/frontend_server/test/src/expression_compiler_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1129,9 +1129,10 @@ int main() {
var k = Key('t');
MyClass c = MyClass(0);
int p = 1;
const t = 1;
/* evaluation placeholder */
print('\$c, \$k');
print('\$c, \$k, \$t');
}
''';

Expand All @@ -1158,7 +1159,7 @@ int main() {
''');
});

test('evaluate const expression', () async {
test('evaluate new const expression', () async {
await driver.check(
scope: <String, String>{'p': '1'},
expression: 'const MyClass(1)',
Expand All @@ -1171,6 +1172,20 @@ int main() {
''');
});

test('evaluate optimized const expression', () async {
await driver.check(
scope: <String, String>{},
expression: 't',
expectedResult: '''
(function() {
return 1;
}(
))
''');
},
skip:
'Cannot compile constants optimized away by the frontend'); // https://github.com/dart-lang/sdk/issues/41999

test('evaluate factory constructor call', () async {
await driver.check(
scope: <String, String>{'p': '1'},
Expand All @@ -1182,24 +1197,20 @@ int main() {
1
))
''');
},
skip:
'Incorrect kernel for factory constructor call'); // https://github.com/dart-lang/sdk/issues/41976
});

test('evaluate const factory constructor call', () async {
await driver.check(
scope: <String, String>{'p': '1'},
expression: "const Key('t')",
expectedResult: '''
(function(p) {
return dart.const(new foo.ValueKey.new("t"));
return C0 || CT.C0;
}(
1
))
''');
},
skip:
'Incorrect kernel for factory constructor call'); // https://github.com/dart-lang/sdk/issues/41976
});
});

return 0;
Expand Down

0 comments on commit 57cf6eb

Please sign in to comment.