//>>built define("dojox/widget/DocTester",["dijit","dojo","dojox","dojo/require!dojo/string,dijit/_Widget,dijit/_Templated,dojox/form/BusyButton,dojox/testing/DocTest"],function(_1,_2,_3){ _2.provide("dojox.widget.DocTester"); _2.require("dojo.string"); _2.require("dijit._Widget"); _2.require("dijit._Templated"); _2.require("dojox.form.BusyButton"); _2.require("dojox.testing.DocTest"); _2.declare("dojox.widget.DocTester",[_1._Widget,_1._Templated],{templateString:_2.cache("dojox.widget","DocTester/DocTester.html","
\n\t
\n\t\n\t\n\t\n\t\t0 tests,\n\t\t0 passed,\n\t\t0 failed\n\t\n
"),widgetsInTemplate:true,_fillContent:function(_4){ var _5=_4.innerHTML; this.doctests=new _3.testing.DocTest(); this.tests=this.doctests.getTestsFromString(this._unescapeHtml(_5)); var _6=_2.map(this.tests,"return item.line-1"); var _7=_5.split("\n"); var _8="
FAILED, actual result was:
"; var _9="
";
for(var i=0;i<_7.length;i++){
var _a=_2.indexOf(_6,i);
if(_a>0&&_a!=-1){
var _b=_a%2?"even":"odd";
_9+=_8;
_9+="
";
}
_9+=_7[i].replace(/^\s+/,"")+"\n";
}
_9+=_8+"
"; this.containerNode.innerHTML=_9; },postCreate:function(){ this.inherited("postCreate",arguments); _2.connect(this.runButtonNode,"onClick",_2.hitch(this,"runTests")); _2.connect(this.resetButtonNode,"onClick",_2.hitch(this,"reset")); this.numTestsNode.innerHTML=this.tests.length; },runTests:function(){ var _c={ok:0,nok:0}; for(var i=0;i").replace(/"/gm,"\""); return _f; }}); });