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

Side by Side Diff: pkg/analyzer/test/src/summary/summary_common.dart

Issue 1651653002: Verify AST instead of constant values. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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 library analyzer.test.src.summary.summary_common; 5 library analyzer.test.src.summary.summary_common;
6 6
7 import 'package:analyzer/analyzer.dart'; 7 import 'package:analyzer/analyzer.dart';
8 import 'package:analyzer/dart/ast/ast.dart'; 8 import 'package:analyzer/dart/ast/ast.dart';
9 import 'package:analyzer/dart/element/element.dart'; 9 import 'package:analyzer/dart/element/element.dart';
10 import 'package:analyzer/src/generated/engine.dart'; 10 import 'package:analyzer/src/generated/engine.dart';
(...skipping 1404 matching lines...) Expand 10 before | Expand all | Expand 10 after
1415 1, 1415 1,
1416 2 1416 2
1417 ]); 1417 ]);
1418 } 1418 }
1419 1419
1420 test_constExpr_binary_equal_not() { 1420 test_constExpr_binary_equal_not() {
1421 UnlinkedVariable variable = serializeVariableText('const v = 1 != 2;'); 1421 UnlinkedVariable variable = serializeVariableText('const v = 1 != 2;');
1422 _assertUnlinkedConst(variable.constExpr, operators: [ 1422 _assertUnlinkedConst(variable.constExpr, operators: [
1423 UnlinkedConstOperation.pushInt, 1423 UnlinkedConstOperation.pushInt,
1424 UnlinkedConstOperation.pushInt, 1424 UnlinkedConstOperation.pushInt,
1425 UnlinkedConstOperation.equal, 1425 UnlinkedConstOperation.notEqual
1426 UnlinkedConstOperation.not
1427 ], ints: [ 1426 ], ints: [
1428 1, 1427 1,
1429 2 1428 2
1430 ]); 1429 ]);
1431 } 1430 }
1432 1431
1433 test_constExpr_binary_floorDivide() { 1432 test_constExpr_binary_floorDivide() {
1434 UnlinkedVariable variable = serializeVariableText('const v = 1 ~/ 2;'); 1433 UnlinkedVariable variable = serializeVariableText('const v = 1 ~/ 2;');
1435 _assertUnlinkedConst(variable.constExpr, operators: [ 1434 _assertUnlinkedConst(variable.constExpr, operators: [
1436 UnlinkedConstOperation.pushInt, 1435 UnlinkedConstOperation.pushInt,
(...skipping 3532 matching lines...) Expand 10 before | Expand all | Expand 10 after
4969 final String absoluteUri; 4968 final String absoluteUri;
4970 final String relativeUri; 4969 final String relativeUri;
4971 final int numTypeParameters; 4970 final int numTypeParameters;
4972 4971
4973 _PrefixExpectation(this.kind, this.name, 4972 _PrefixExpectation(this.kind, this.name,
4974 {this.inLibraryDefiningUnit: false, 4973 {this.inLibraryDefiningUnit: false,
4975 this.absoluteUri, 4974 this.absoluteUri,
4976 this.relativeUri, 4975 this.relativeUri,
4977 this.numTypeParameters: 0}); 4976 this.numTypeParameters: 0});
4978 } 4977 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/src/summary/resynthesize_test.dart ('k') | pkg/analyzer/tool/summary/idl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698