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

Unified Diff: dart/tests/utils/src/DummyCompilerTest.dart

Issue 9808019: Make dartdoc compile. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 9 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 | « dart/frog/leg/lib/mock.dart ('k') | dart/tests/utils/utils.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/tests/utils/src/DummyCompilerTest.dart
diff --git a/dart/tests/utils/src/DummyCompilerTest.dart b/dart/tests/utils/src/DummyCompilerTest.dart
new file mode 100644
index 0000000000000000000000000000000000000000..90be461ced09fec3532833e6352d8621fbc315b5
--- /dev/null
+++ b/dart/tests/utils/src/DummyCompilerTest.dart
@@ -0,0 +1,30 @@
+// Copyright (c) 2012, 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.
ngeoffray 2012/03/23 08:08:40 What is this test about? Please add a comment.
ahe 2012/03/23 11:56:40 Done.
+
+#import('../../../frog/leg/api.dart');
+#import('../../../lib/uri/uri.dart');
+
+Future<String> provider(Uri uri) {
+ Completer<String> completer = new Completer<String>();
+ String source;
+ if (uri.scheme == "main") {
+ source = "main() {}";
+ } else {
+ source = "";
+ }
+ completer.complete(source);
+ return completer.future;
+}
+
+void handler(Uri uri, int begin, int end, String message, bool fatal) {
+ print(message);
+}
+
+main() {
+ String code = compile(new Uri(scheme: 'main'), new Uri(scheme: 'lib'),
+ provider, handler).value;
+ if (code === null) {
+ throw 'Compilation failed';
+ }
+}
« no previous file with comments | « dart/frog/leg/lib/mock.dart ('k') | dart/tests/utils/utils.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698