Created
February 23, 2010 14:45
-
-
Save TBD/312231 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// --- functions required | |
function require(arg) { | |
var ret = load(arg+".js") | |
//print(ret + ": loading " + arg + "\n") | |
} | |
var module = "" | |
require("rewriter") | |
require("scope") | |
require("nodes") | |
require("lexer") | |
require("parser") | |
require("coffee-script") | |
require("command_line") | |
require("optparse") | |
// --- tests | |
var path = "../test/" | |
var x = system.files(path+"*.coffee") | |
var f; | |
var tests = 0; | |
function ok(args) {if (args){tests += 1}} | |
function throws(args) {if (args){tests += 1}} | |
var start_time = new Date() | |
for (var i in x) { | |
print(x[i]+"\n") | |
f = new Stream(path + x[i]).read() | |
eval(CoffeeScript.compile(f)) | |
} | |
var time = ((new Date() - start_time) / 1000).toFixed(2) | |
print("passed " + tests + " tests in " + time + "seconds\n") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment