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

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

Issue 1371193004: Add bool value types to type inference. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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/concrete_type_inference_test.dart
diff --git a/tests/compiler/dart2js/concrete_type_inference_test.dart b/tests/compiler/dart2js/concrete_type_inference_test.dart
index 6c8cb9f09aa24850263b9772ca0a0a114520b883..5e154c4aa4af95b27bf50774ef0f64593014ca9b 100644
--- a/tests/compiler/dart2js/concrete_type_inference_test.dart
+++ b/tests/compiler/dart2js/concrete_type_inference_test.dart
@@ -51,28 +51,23 @@ void checkPrintType(String expression, checkType(compiler, type)) {
void testBasicTypes() {
checkPrintType('true', (compiler, type) {
- var inferrer = compiler.typesTask.typesInferrer;
+ if (type.isForwarding) type = type.forwardTo;
Expect.identical(compiler.typesTask.boolType, type);
});
checkPrintType('1.5', (compiler, type) {
- var inferrer = compiler.typesTask.typesInferrer;
Expect.identical(compiler.typesTask.doubleType, type);
});
checkPrintType('1', (compiler, type) {
- var inferrer = compiler.typesTask.typesInferrer;
Expect.identical(compiler.typesTask.uint31Type, type);
});
checkPrintType('[]', (compiler, type) {
- var inferrer = compiler.typesTask.typesInferrer;
if (type.isForwarding) type = type.forwardTo;
Expect.identical(compiler.typesTask.growableListType, type);
});
checkPrintType('null', (compiler, type) {
- var inferrer = compiler.typesTask.typesInferrer;
Expect.identical(compiler.typesTask.nullType, type);
});
checkPrintType('"foo"', (compiler, type) {
- var inferrer = compiler.typesTask.typesInferrer;
Expect.isTrue(
compiler.typesTask.stringType.containsOnlyString(compiler.world));
});
@@ -90,7 +85,6 @@ void testOptionalParameters() {
var thirdParameter =
fiskElement.computeSignature(compiler).optionalParameters[1];
var typesTask = compiler.typesTask;
- var inferrer = typesTask.typesInferrer;
Expect.identical(
typesTask.uint31Type,
typesTask.getGuaranteedTypeOfElement(firstParameter));

Powered by Google App Engine
This is Rietveld 408576698