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

Unified Diff: dart/tests/try/poi/library_updater_test.dart

Issue 747933002: Quick fixes to broken tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 1 month 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 | « dart/pkg/dart2js_incremental/lib/library_updater.dart ('k') | dart/tests/try/poi/serialize_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/tests/try/poi/library_updater_test.dart
diff --git a/dart/tests/try/poi/library_updater_test.dart b/dart/tests/try/poi/library_updater_test.dart
index 34a4022a00de8e9df31bd0c2361299a917e813f1..5bcff7c730fe1bee6194052db85d88a7ea2a8381 100644
--- a/dart/tests/try/poi/library_updater_test.dart
+++ b/dart/tests/try/poi/library_updater_test.dart
@@ -42,12 +42,18 @@ class LibraryUpdaterTestCase extends CompilerTestCase {
Expect.setEquals(
expectedUpdates.toSet(),
- updater.updates.map((Update update) => update.before.name).toSet());
+ updater.updates.map(nameOfUpdate).toSet());
});
String toString() => 'Before:\n$source\n\n\nAfter:\n$newSource';
}
+String nameOfUpdate(Update update) {
+ var element = update.before;
+ if (element == null) element = update.after;
+ return element.name;
+}
+
void main() {
runTests(
[
@@ -63,8 +69,8 @@ void main() {
new LibraryUpdaterTestCase(
before: 'main() { print("Hello, World!"); }',
after: 'void main() { print("Hello, World!"); }',
- canReuse: false,
- updates: []),
+ canReuse: true,
+ updates: ['main']),
// Only whitespace changes. Can be reused; no updates/patches needed.
new LibraryUpdaterTestCase(
« no previous file with comments | « dart/pkg/dart2js_incremental/lib/library_updater.dart ('k') | dart/tests/try/poi/serialize_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698