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

Side by Side Diff: tests/compiler/dart2js/semantic_visitor_test_send_data.dart

Issue 2669703003: Refactor ConstantExpression/ConstantConstructor to use entities. (Closed)
Patch Set: Created 3 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of dart2js.semantics_visitor_test; 5 part of dart2js.semantics_visitor_test;
6 6
7 const Map<String, List<Test>> SEND_TESTS = const { 7 const Map<String, List<Test>> SEND_TESTS = const {
8 'Parameters': const [ 8 'Parameters': const [
9 // Parameters 9 // Parameters
10 const Test('m(o) => o;', 10 const Test('m(o) => o;',
(...skipping 1528 matching lines...) Expand 10 before | Expand all | Expand 10 after
1539 operator: '--')), 1539 operator: '--')),
1540 ], 1540 ],
1541 'Dynamic type literals': const [ 1541 'Dynamic type literals': const [
1542 // Dynamic type literals 1542 // Dynamic type literals
1543 const Test( 1543 const Test(
1544 ''' 1544 '''
1545 m() => dynamic; 1545 m() => dynamic;
1546 ''', 1546 ''',
1547 const Visit(VisitKind.VISIT_DYNAMIC_TYPE_LITERAL_GET, 1547 const Visit(VisitKind.VISIT_DYNAMIC_TYPE_LITERAL_GET,
1548 constant: 'dynamic')), 1548 constant: 'dynamic')),
1549 // TODO(johnniwinther): Update these to expect the constant to be `dynamic`
1550 // instead of `Type`. Currently the compile time constant evaluator cannot
1551 // detect `dynamic` as a constant subexpression.
1552 const Test( 1549 const Test(
1553 ''' 1550 '''
1554 m() { dynamic(null, 42); } 1551 m() { dynamic(null, 42); }
1555 ''', 1552 ''',
1556 const Visit(VisitKind.VISIT_DYNAMIC_TYPE_LITERAL_INVOKE, 1553 const Visit(VisitKind.VISIT_DYNAMIC_TYPE_LITERAL_INVOKE,
1557 constant: 'Type', arguments: '(null,42)')), 1554 constant: 'dynamic', arguments: '(null,42)')),
1558 const Test( 1555 const Test(
1559 ''' 1556 '''
1560 m() => dynamic = 42; 1557 m() => dynamic = 42;
1561 ''', 1558 ''',
1562 const Visit(VisitKind.VISIT_DYNAMIC_TYPE_LITERAL_SET, 1559 const Visit(VisitKind.VISIT_DYNAMIC_TYPE_LITERAL_SET,
1563 constant: 'dynamic', rhs: '42')), 1560 constant: 'dynamic', rhs: '42')),
1564 const Test( 1561 const Test(
1565 ''' 1562 '''
1566 m() => dynamic += 42; 1563 m() => dynamic += 42;
1567 ''', 1564 ''',
(...skipping 2731 matching lines...) Expand 10 before | Expand all | Expand 10 after
4299 element: 'field(a)', rhs: '42')), 4296 element: 'field(a)', rhs: '42')),
4300 4297
4301 const Test( 4298 const Test(
4302 ''' 4299 '''
4303 m() => unresolved ??= 42; 4300 m() => unresolved ??= 42;
4304 ''', 4301 ''',
4305 const Visit(VisitKind.VISIT_UNRESOLVED_SET_IF_NULL, 4302 const Visit(VisitKind.VISIT_UNRESOLVED_SET_IF_NULL,
4306 name: 'unresolved', rhs: '42')), 4303 name: 'unresolved', rhs: '42')),
4307 ], 4304 ],
4308 }; 4305 };
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/constant_expression_test.dart ('k') | tests/compiler/dart2js/serialization/equivalence_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698