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

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

Issue 12225118: Fix typo and add a regression test. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/ssa/types.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/type_combination_test.dart
===================================================================
--- tests/compiler/dart2js/type_combination_test.dart (revision 18311)
+++ tests/compiler/dart2js/type_combination_test.dart (working copy)
@@ -2022,6 +2022,13 @@
FIXED_ARRAY.intersection(FIXED_ARRAY, compiler));
}
+void testRegressions(Compiler compiler) {
+ HType nonNullPotentialString = new HBoundedPotentialPrimitiveString(
+ compiler.stringClass.computeType(compiler), canBeNull: false);
+ Expect.equals(
+ potentialString, STRING_OR_NULL.union(nonNullPotentialString, compiler));
+}
+
void main() {
MockCompiler compiler = new MockCompiler();
nonPrimitive1 = new HBoundedType(
@@ -2034,4 +2041,5 @@
compiler.stringClass.computeType(compiler));
testUnion(compiler);
testIntersection(compiler);
+ testRegressions(compiler);
}
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/ssa/types.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698