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

Unified Diff: tools/testing/frogpad/frogpad.dart

Issue 9610002: remove node.js dependency by running the frog compiler in (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: fix frog html 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
Index: tools/testing/frogpad/frogpad.dart
diff --git a/tools/testing/frogpad/frogpad.dart b/tools/testing/frogpad/frogpad.dart
index 1749438d62148919aa56a2da8fff09c40edf8f49..d2f43cb49287ed1fafaa2663cfd0d8da46d8d78f 100644
--- a/tools/testing/frogpad/frogpad.dart
+++ b/tools/testing/frogpad/frogpad.dart
@@ -27,7 +27,12 @@ void main() {
setText("input", fs.readAll(mainFile));
int time1 = new Date.now().value;
- List<String> args = ["dummy_arg1", "dummy_arg2", mainFile];
+ List<String> args = [
+ "dummy_arg1",
+ "dummy_arg2",
+ "--enable_type_checks",
+ "--enable_asserts",
+ mainFile];
parseOptions("dummy_home_dir", args, fs);
options.useColors = false;
@@ -43,14 +48,14 @@ void main() {
};
bool success = world.compile();
int time2 = new Date.now().value;
- String output = world.getGeneratedCode();
+ String output = "throw 'frogpad compilation error';\n";
if (success) {
- setText("output", output);
+ output = world.getGeneratedCode();
}
+ setText("output", output);
setText("warnings", warnings);
- ((time2 - time1) / 1000).toStringAsPrecision(3);
- String timing = "generated ${output.length} characters in " +
+ String timing = "generated ${output.length} characters in " +
"${((time2 - time1) / 1000).toStringAsPrecision(3)} seconds";
setText("timing", timing);
}
@@ -128,7 +133,7 @@ class HtmlFileSystem implements FileSystem {
bool fileExists(String filename) {
// frog calls this to check if files exist before reading them. We return
// true here for all files, and let it fail later if frog attempts to read
- // the contents of a non-existant file.
+ // the contents of a non-existent file.
return true;
}

Powered by Google App Engine
This is Rietveld 408576698