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: dart/tests/try/poi/source_update_test.dart

Issue 799403005: Avoid repeating common parts of ProgramResults. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merged with r42384. Created 6 years 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/tests/try/poi/source_update.dart ('k') | dart/tests/try/web/incremental_compilation_update_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/tests/try/poi/source_update_test.dart
diff --git a/dart/tests/try/poi/source_update_test.dart b/dart/tests/try/poi/source_update_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..0f98ce838c818b068f17b6ab89bbab913ac45761
--- /dev/null
+++ b/dart/tests/try/poi/source_update_test.dart
@@ -0,0 +1,30 @@
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/// Test [source_update.dart].
+library trydart.source_update_test;
+
+import 'package:expect/expect.dart' show
+ Expect;
+
+import 'source_update.dart' show
+ expandUpdates;
+
+main() {
+ Expect.listEquals(
+ ["head v1 tail", "head v2 tail"],
+ expandUpdates(["head ", ["v1", "v2"], " tail"]));
+
+ Expect.listEquals(
+ ["head v1 tail v2", "head v2 tail v1"],
+ expandUpdates(["head ", ["v1", "v2"], " tail ", ["v2", "v1"]]));
+
+ Expect.throws(() {
+ expandUpdates(["head ", ["v1", "v2"], " tail ", ["v1"]]);
+ });
+
+ Expect.throws(() {
+ expandUpdates(["head ", ["v1", "v2"], " tail ", ["v1", "v2", "v3"]]);
+ });
+}
« no previous file with comments | « dart/tests/try/poi/source_update.dart ('k') | dart/tests/try/web/incremental_compilation_update_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698