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

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

Issue 1881013002: Expand ResolvedAst to handle synthetic constructors. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments + fix test, cps and compilation units for injected members. 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
« no previous file with comments | « tests/compiler/dart2js/serialization_test.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/serialization_test_helper.dart
diff --git a/tests/compiler/dart2js/serialization_test_helper.dart b/tests/compiler/dart2js/serialization_test_helper.dart
index 97d5134952b05c7bdb0c00f5867be557775455fb..deab6cecb89d3890a57ff511b66bc4dc491efb5d 100644
--- a/tests/compiler/dart2js/serialization_test_helper.dart
+++ b/tests/compiler/dart2js/serialization_test_helper.dart
@@ -104,9 +104,9 @@ class CheckStrategy implements TestStrategy {
bool check(var object1, var object2, String property, var value1, var value2,
[bool equivalence(a, b) = equality]) {
if (!equivalence(value1, value2)) {
- throw "property='$property' "
- "object1=$object1 (${object1.runtimeType}), value='${value1}' <> "
- "object2=$object2 (${object2.runtimeType}), value='${value2}'";
+ throw "property='$property'\n "
+ "object1=$object1 (${object1.runtimeType})\n value='${value1}' <>\n "
+ "object2=$object2 (${object2.runtimeType})\n value='${value2}'";
}
return true;
}
@@ -212,12 +212,8 @@ bool checkElementIdentities(
Object object1, Object object2, String property,
Element element1, Element element2) {
if (identical(element1, element2)) return true;
- if (element1 == null || element2 == null) {
- return check(object1, object2, property, element1, element2);
- } else {
- return const ElementIdentityEquivalence(const CheckStrategy())
- .visit(element1, element2);
- }
+ return check(object1, object2,
+ property, element1, element2, areElementsEquivalent);
}
/// Checks the pair-wise equivalence of the identity (but not properties) of the
« no previous file with comments | « tests/compiler/dart2js/serialization_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698