-// script.aculo.us unittest.js v1.8.1, Thu Jan 03 22:07:12 -0500 2008
+// script.aculo.us unittest.js v1.9.0, Thu Dec 23 16:54:48 -0500 2010
-// Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
-// (c) 2005-2007 Jon Tirsen (http://www.tirsen.com)
-// (c) 2005-2007 Michael Schuerig (http://www.schuerig.de/michael/)
+// Copyright (c) 2005-2010 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
+// (c) 2005-2010 Jon Tirsen (http://www.tirsen.com)
+// (c) 2005-2010 Michael Schuerig (http://www.schuerig.de/michael/)
//
// script.aculo.us is freely distributable under the terms of an MIT-style license.
// For details, see the script.aculo.us web site: http://script.aculo.us/
this.mark.style.left = options.pointerX + "px";
this.mark.style.width = "5px";
this.mark.style.height = "5px;";
- this.mark.style.borderTop = "1px solid red;"
- this.mark.style.borderLeft = "1px solid red;"
+ this.mark.style.borderTop = "1px solid red;";
+ this.mark.style.borderLeft = "1px solid red;";
if(this.step)
alert('['+new Date().getTime().toString()+'] '+eventName+'/'+Test.Unit.inspect(options));
}
};
-var Test = {}
+var Test = {};
Test.Unit = {};
// security exception workaround
'<thead><tr><th>Status</th><th>Test</th><th>Message</th></tr></thead>' +
'<tbody id="loglines"></tbody>' +
'</table>';
- this.logsummary = $('logsummary')
+ this.logsummary = $('logsummary');
this.loglines = $('loglines');
},
_toHTML: function(txt) {
- return txt.escapeHTML().replace(/\n/g,"<br/>");
+ return txt.escapeHTML().replace(/\n/g,"<br>");
},
addLinksToResults: function(){
$$("tr.failed .nameCell").each( function(td){ // todo: limit to children of this.log
- td.title = "Run only this test"
+ td.title = "Run only this test";
Event.observe(td, 'click', function(){ window.location.search = "?tests=" + td.innerHTML;});
});
$$("tr.passed .nameCell").each( function(td){ // todo: limit to children of this.log
- td.title = "Run all tests"
+ td.title = "Run all tests";
Event.observe(td, 'click', function(){ window.location.search = "";});
});
}
-}
+};
Test.Unit.Runner = Class.create();
Test.Unit.Runner.prototype = {
failures + " failures, " +
errors + " errors");
}
-}
+};
Test.Unit.Assertions = Class.create();
Test.Unit.Assertions.prototype = {
catch(e) { this.error(e); }
},
assertNull: function(obj) {
- var message = arguments[1] || 'assertNull'
+ var message = arguments[1] || 'assertNull';
try { (obj==null) ? this.pass() :
this.fail(message + ': got "' + Test.Unit.inspect(obj) + '"'); }
catch(e) { this.error(e); }
iterations + ' iterations in ' + (timeTaken/1000)+'s' );
return timeTaken;
}
-}
+};
Test.Unit.Testcase = Class.create();
Object.extend(Object.extend(Test.Unit.Testcase.prototype, Test.Unit.Assertions.prototype), {
};
var makeAssertion = function(assertion, args, object) {
this[assertion].apply(this,(args || []).concat([object]));
- }
+ };
Test.BDDMethods = {};
$H(METHODMAP).each(function(pair) {
[Array.prototype, String.prototype, Number.prototype, Boolean.prototype].each(
function(p){ Object.extend(p, Test.BDDMethods) }
);
-}
+};
Test.context = function(name, spec, log){
Test.setupBDDExtensionMethods();
}
}
new Test.Unit.Runner(compiledSpec, { titles: titles, testLog: log || 'testlog', context: name });
-};
\ No newline at end of file
+};