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

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

Issue 1916053003: Add toStructuredText to ConstantExpression and align method names with ConstantValue (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: dartfmt Created 4 years, 8 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 e028ac6655336e9aa343c5c057805ad4bf46a9f6..c24868fbb94b8bc30b72bad22e228d5232337b07 100644
--- a/tests/compiler/dart2js/constant_expression_test.dart
+++ b/tests/compiler/dart2js/constant_expression_test.dart
@@ -218,28 +218,28 @@ Future testData(TestData data) async {
var constant = field.constant;
Expect.equals(data.kind, constant.kind,
"Unexpected kind '${constant.kind}' for contant "
- "`${constant.getText()}`, expected '${data.kind}'.");
- Expect.equals(data.text, constant.getText(),
- "Unexpected text '${constant.getText()}' for contant, "
+ "`${constant.toDartText()}`, expected '${data.kind}'.");
+ Expect.equals(data.text, constant.toDartText(),
+ "Unexpected text '${constant.toDartText()}' for contant, "
"expected '${data.text}'.");
if (data.type != null) {
String instanceType = constant.computeInstanceType().toString();
Expect.equals(data.type, instanceType,
"Unexpected type '$instanceType' for contant "
- "`${constant.getText()}`, expected '${data.type}'.");
+ "`${constant.toDartText()}`, expected '${data.type}'.");
}
if (data.fields != null) {
Map instanceFields = constant.computeInstanceFields();
Expect.equals(data.fields.length, instanceFields.length,
"Unexpected field count ${instanceFields.length} for contant "
- "`${constant.getText()}`, expected '${data.fields.length}'.");
+ "`${constant.toDartText()}`, expected '${data.fields.length}'.");
instanceFields.forEach((field, expression) {
String name = '$field';
- String expression = instanceFields[field].getText();
+ String expression = instanceFields[field].toDartText();
String expected = data.fields[name];
Expect.equals(expected, expression,
"Unexpected field expression ${expression} for field '$name' in "
- "contant `${constant.getText()}`, expected '${expected}'.");
+ "contant `${constant.toDartText()}`, expected '${expected}'.");
});
}
});
« no previous file with comments | « tests/compiler/dart2js/constant_expression_evaluate_test.dart ('k') | tests/compiler/dart2js/mirrors_used_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698