| exports.print = typeof print !== "undefined" ? print : function () { | |
| var system = require("system"); | |
| var stdio = system.stdio; | |
| stdio.print.apply(stdio, arguments); | |
| }; | |
| exports.assert = function (guard, message) { | |
| if (guard) { | |
| exports.print('PASS ' + message, 'pass'); | |
| } else { | |
| exports.print('FAIL ' + message, 'fail'); | |
| } | |
| }; | |