initial release
This commit is contained in:
parent
554e8358cf
commit
70b2489539
81 changed files with 6702 additions and 2 deletions
13
tests/test.js
Normal file
13
tests/test.js
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
function test(condition) {
|
||||
try {if (!condition()) throw new Error}
|
||||
catch (e) {test.failures.push(condition)}
|
||||
test.total++
|
||||
}
|
||||
test.total = 0
|
||||
test.failures = []
|
||||
test.print = function(print) {
|
||||
for (var i = 0; i < test.failures.length; i++) {
|
||||
print(test.failures[i].toString())
|
||||
}
|
||||
print("tests: " + test.total + "\nfailures: " + test.failures.length)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue