SUnit.deploy.js 44 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067
  1. smalltalk.addClass('TestCase', smalltalk.Object, ['testedClass'], 'SUnit');
  2. smalltalk.addMethod(
  3. '_testedClass',
  4. smalltalk.method({
  5. selector: 'testedClass',
  6. category: 'accessing',
  7. fn: function (){
  8. var self=this;
  9. return self['@testedClass'];
  10. return self;},
  11. source: unescape('testedClass%0A%09%5EtestedClass'),
  12. messageSends: [],
  13. referencedClasses: []
  14. }),
  15. smalltalk.TestCase);
  16. smalltalk.addMethod(
  17. '_testedClass_',
  18. smalltalk.method({
  19. selector: 'testedClass:',
  20. category: 'accessing',
  21. fn: function (aClass){
  22. var self=this;
  23. self['@testedClass']=aClass;
  24. return self;},
  25. source: unescape('testedClass%3A%20aClass%0A%09testedClass%20%3A%3D%20aClass'),
  26. messageSends: [],
  27. referencedClasses: []
  28. }),
  29. smalltalk.TestCase);
  30. smalltalk.addMethod(
  31. '_cleanUpInstanceVariables',
  32. smalltalk.method({
  33. selector: 'cleanUpInstanceVariables',
  34. category: 'private',
  35. fn: function (){
  36. var self=this;
  37. smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "_instanceVariableNames", []), "_do_", [(function(name){return smalltalk.send(smalltalk.send(name, "__eq", ["testSelector"]), "_ifFalse_", [(function(){return smalltalk.send(self, "_instVarAt_put_", [name, nil]);})]);})]);
  38. return self;},
  39. source: unescape('cleanUpInstanceVariables%0A%09self%20class%20instanceVariableNames%20do%3A%20%5B%20%3Aname%20%7C%0A%09%09name%20%3D%20%27testSelector%27%20ifFalse%3A%20%5B%0A%09%09%09self%20instVarAt%3A%20name%20put%3A%20nil%20%5D%5D'),
  40. messageSends: ["do:", "instanceVariableNames", "class", "ifFalse:", unescape("%3D"), "instVarAt:put:"],
  41. referencedClasses: []
  42. }),
  43. smalltalk.TestCase);
  44. smalltalk.addMethod(
  45. '_signalFailure_',
  46. smalltalk.method({
  47. selector: 'signalFailure:',
  48. category: 'private',
  49. fn: function (aString){
  50. var self=this;
  51. (function($rec){smalltalk.send($rec, "_messageText_", [aString]);return smalltalk.send($rec, "_signal", []);})(smalltalk.send(smalltalk.TestFailure, "_new", []));
  52. return self;},
  53. source: unescape('signalFailure%3A%20aString%0A%09TestFailure%20new%0A%09%09messageText%3A%20aString%3B%0A%09%09signal'),
  54. messageSends: ["messageText:", "signal", "new"],
  55. referencedClasses: [smalltalk.nil]
  56. }),
  57. smalltalk.TestCase);
  58. smalltalk.addMethod(
  59. '_setUp',
  60. smalltalk.method({
  61. selector: 'setUp',
  62. category: 'running',
  63. fn: function (){
  64. var self=this;
  65. return self;},
  66. source: unescape('setUp'),
  67. messageSends: [],
  68. referencedClasses: []
  69. }),
  70. smalltalk.TestCase);
  71. smalltalk.addMethod(
  72. '_tearDown',
  73. smalltalk.method({
  74. selector: 'tearDown',
  75. category: 'running',
  76. fn: function (){
  77. var self=this;
  78. return self;},
  79. source: unescape('tearDown'),
  80. messageSends: [],
  81. referencedClasses: []
  82. }),
  83. smalltalk.TestCase);
  84. smalltalk.addMethod(
  85. '_methods',
  86. smalltalk.method({
  87. selector: 'methods',
  88. category: 'running',
  89. fn: function (){
  90. var self=this;
  91. return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "_methodDictionary", []), "_keys", []), "_select_", [(function(each){return smalltalk.send(each, "_match_", [unescape("%5Etest")]);})]);
  92. return self;},
  93. source: unescape('methods%0A%09%5Eself%20class%20methodDictionary%20keys%20select%3A%20%5B%3Aeach%20%7C%20each%20match%3A%20%27%5Etest%27%5D'),
  94. messageSends: ["select:", "keys", "methodDictionary", "class", "match:"],
  95. referencedClasses: []
  96. }),
  97. smalltalk.TestCase);
  98. smalltalk.addMethod(
  99. '_runCaseFor_',
  100. smalltalk.method({
  101. selector: 'runCaseFor:',
  102. category: 'running',
  103. fn: function (aTestResult){
  104. var self=this;
  105. smalltalk.send((function(){smalltalk.send(self, "_setUp", []);return smalltalk.send(self, "_performTestFor_", [aTestResult]);}), "_on_do_", [smalltalk.Error, (function(ex){smalltalk.send(self, "_tearDown", []);smalltalk.send(self, "_cleanUpInstanceVariables", []);return smalltalk.send(ex, "_signal", []);})]);
  106. smalltalk.send(self, "_tearDown", []);
  107. smalltalk.send(self, "_cleanUpInstanceVariables", []);
  108. return self;},
  109. source: unescape('runCaseFor%3A%20aTestResult%0A%09%5Bself%20setUp.%0A%09self%20performTestFor%3A%20aTestResult%5D%0A%09%09on%3A%20Error%0A%09%09do%3A%20%5B%3Aex%20%7C%0A%09%09%09self%20tearDown.%0A%09%09%09self%20cleanUpInstanceVariables.%0A%09%09%09ex%20signal%5D.%0A%09self%20tearDown.%0A%09self%20cleanUpInstanceVariables'),
  110. messageSends: ["on:do:", "setUp", "performTestFor:", "tearDown", "cleanUpInstanceVariables", "signal"],
  111. referencedClasses: [smalltalk.Error]
  112. }),
  113. smalltalk.TestCase);
  114. smalltalk.addMethod(
  115. '_performTestFor_',
  116. smalltalk.method({
  117. selector: 'performTestFor:',
  118. category: 'running',
  119. fn: function (aResult){
  120. var self=this;
  121. smalltalk.send(smalltalk.send(self, "_methods", []), "_do_", [(function(each){smalltalk.send((function(){return smalltalk.send((function(){return smalltalk.send(self, "_perform_", [each]);}), "_on_do_", [smalltalk.TestFailure, (function(ex){return smalltalk.send(aResult, "_addFailure_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "_name", []), "__comma", [unescape("%3E%3E")]), "__comma", [each])]);})]);}), "_on_do_", [smalltalk.Error, (function(ex){return smalltalk.send(aResult, "_addError_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "_name", []), "__comma", [unescape("%3E%3E")]), "__comma", [each])]);})]);return smalltalk.send(aResult, "_increaseRuns", []);})]);
  122. return self;},
  123. source: unescape('performTestFor%3A%20aResult%0A%09self%20methods%20do%3A%20%5B%3Aeach%20%7C%20%0A%09%09%5B%5Bself%20perform%3A%20each%5D%0A%09%09%09on%3A%20TestFailure%20do%3A%20%5B%3Aex%20%7C%20aResult%20addFailure%3A%20self%20class%20name%2C%20%27%3E%3E%27%2C%20each%5D%5D%0A%09%09%09on%3A%20Error%20do%3A%20%5B%3Aex%20%7C%20aResult%20addError%3A%20self%20class%20name%2C%20%27%3E%3E%27%2C%20each%5D.%0A%09%09aResult%20increaseRuns%5D'),
  124. messageSends: ["do:", "methods", "on:do:", "perform:", "addFailure:", unescape("%2C"), "name", "class", "addError:", "increaseRuns"],
  125. referencedClasses: [smalltalk.nil,smalltalk.Error]
  126. }),
  127. smalltalk.TestCase);
  128. smalltalk.addMethod(
  129. '_assert_',
  130. smalltalk.method({
  131. selector: 'assert:',
  132. category: 'testing',
  133. fn: function (aBoolean){
  134. var self=this;
  135. smalltalk.send(aBoolean, "_ifFalse_", [(function(){return smalltalk.send(self, "_signalFailure_", ["Assertion failed"]);})]);
  136. return self;},
  137. source: unescape('assert%3A%20aBoolean%0A%09aBoolean%20ifFalse%3A%20%5Bself%20signalFailure%3A%20%27Assertion%20failed%27%5D'),
  138. messageSends: ["ifFalse:", "signalFailure:"],
  139. referencedClasses: []
  140. }),
  141. smalltalk.TestCase);
  142. smalltalk.addMethod(
  143. '_deny_',
  144. smalltalk.method({
  145. selector: 'deny:',
  146. category: 'testing',
  147. fn: function (aBoolean){
  148. var self=this;
  149. smalltalk.send(self, "_assert_", [smalltalk.send(aBoolean, "_not", [])]);
  150. return self;},
  151. source: unescape('deny%3A%20aBoolean%0A%09self%20assert%3A%20aBoolean%20not'),
  152. messageSends: ["assert:", "not"],
  153. referencedClasses: []
  154. }),
  155. smalltalk.TestCase);
  156. smalltalk.setup(smalltalk.TestCase);
  157. smalltalk.addClass('ExampleTest', smalltalk.TestCase, ['test'], 'SUnit');
  158. smalltalk.addMethod(
  159. '_testFailure',
  160. smalltalk.method({
  161. selector: 'testFailure',
  162. category: 'not yet classified',
  163. fn: function (){
  164. var self=this;
  165. smalltalk.send(self, "_deny_", [true]);
  166. return self;},
  167. source: unescape('testFailure%0A%09self%20deny%3A%20true'),
  168. messageSends: ["deny:"],
  169. referencedClasses: []
  170. }),
  171. smalltalk.ExampleTest);
  172. smalltalk.addMethod(
  173. '_testPasses',
  174. smalltalk.method({
  175. selector: 'testPasses',
  176. category: 'not yet classified',
  177. fn: function (){
  178. var self=this;
  179. smalltalk.send((100000), "_timesRepeat_", [(function(){return smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send((1), "__plus", [(1)]), "__eq", [(2)])]);})]);
  180. return self;},
  181. source: unescape('testPasses%0A%09100000%20timesRepeat%3A%20%5Bself%20assert%3A%201%20+%201%20%3D%202%5D'),
  182. messageSends: ["timesRepeat:", "assert:", unescape("%3D"), unescape("+")],
  183. referencedClasses: []
  184. }),
  185. smalltalk.ExampleTest);
  186. smalltalk.addMethod(
  187. '_testError',
  188. smalltalk.method({
  189. selector: 'testError',
  190. category: 'not yet classified',
  191. fn: function (){
  192. var self=this;
  193. smalltalk.send(self, "_assert_", [smalltalk.send((1), "_foo", [])]);
  194. return self;},
  195. source: unescape('testError%0A%09self%20assert%3A%201%20foo'),
  196. messageSends: ["assert:", "foo"],
  197. referencedClasses: []
  198. }),
  199. smalltalk.ExampleTest);
  200. smalltalk.setup(smalltalk.ExampleTest);
  201. smalltalk.addClass('ProgressBar', smalltalk.TabWidget, ['percent', 'progressDiv', 'div'], 'SUnit');
  202. smalltalk.addMethod(
  203. '_percent',
  204. smalltalk.method({
  205. selector: 'percent',
  206. category: 'accessing',
  207. fn: function (){
  208. var self=this;
  209. return smalltalk.send(self['@percent'], "_ifNil_", [(function(){return (0);})]);
  210. return self;},
  211. source: unescape('percent%0A%09%5Epercent%20ifNil%3A%20%5B0%5D'),
  212. messageSends: ["ifNil:"],
  213. referencedClasses: []
  214. }),
  215. smalltalk.ProgressBar);
  216. smalltalk.addMethod(
  217. '_percent_',
  218. smalltalk.method({
  219. selector: 'percent:',
  220. category: 'accessing',
  221. fn: function (aNumber){
  222. var self=this;
  223. self['@percent']=aNumber;
  224. return self;},
  225. source: unescape('percent%3A%20aNumber%0A%09percent%20%3A%3D%20aNumber'),
  226. messageSends: [],
  227. referencedClasses: []
  228. }),
  229. smalltalk.ProgressBar);
  230. smalltalk.addMethod(
  231. '_renderOn_',
  232. smalltalk.method({
  233. selector: 'renderOn:',
  234. category: 'rendering',
  235. fn: function (html){
  236. var self=this;
  237. self['@div']=(function($rec){smalltalk.send($rec, "_class_", ["progress_bar"]);return smalltalk.send($rec, "_yourself", []);})(smalltalk.send(html, "_div", []));
  238. smalltalk.send(self, "_renderProgressBar", []);
  239. return self;},
  240. source: unescape('renderOn%3A%20html%20%0A%09div%20%3A%3D%20html%20div%20%0A%09%09class%3A%20%27progress_bar%27%3B%0A%09%09yourself.%0A%09self%20renderProgressBar'),
  241. messageSends: ["class:", "yourself", "div", "renderProgressBar"],
  242. referencedClasses: []
  243. }),
  244. smalltalk.ProgressBar);
  245. smalltalk.addMethod(
  246. '_updatePercent_',
  247. smalltalk.method({
  248. selector: 'updatePercent:',
  249. category: 'updating',
  250. fn: function (aNumber){
  251. var self=this;
  252. smalltalk.send(self, "_percent_", [aNumber]);
  253. smalltalk.send(self, "_renderProgressBar", []);
  254. return self;},
  255. source: unescape('updatePercent%3A%20aNumber%0A%09self%20percent%3A%20aNumber.%0A%09self%20renderProgressBar'),
  256. messageSends: ["percent:", "renderProgressBar"],
  257. referencedClasses: []
  258. }),
  259. smalltalk.ProgressBar);
  260. smalltalk.addMethod(
  261. '_renderProgressBar',
  262. smalltalk.method({
  263. selector: 'renderProgressBar',
  264. category: 'rendering',
  265. fn: function (){
  266. var self=this;
  267. smalltalk.send(self['@div'], "_contents_", [(function(html){return (function($rec){smalltalk.send($rec, "_class_", ["progress"]);return smalltalk.send($rec, "_style_", [smalltalk.send(smalltalk.send("width:", "__comma", [smalltalk.send(smalltalk.send(self, "_percent", []), "_asString", [])]), "__comma", [unescape("%25")])]);})(smalltalk.send(html, "_div", []));})]);
  268. return self;},
  269. source: unescape('renderProgressBar%0A%09div%20contents%3A%20%5B%3Ahtml%20%7C%0A%09%09html%20div%20%0A%09%09%09class%3A%20%27progress%27%3B%0A%09%09%09style%3A%20%27width%3A%27%2C%20self%20percent%20asString%2C%20%27%25%27%5D'),
  270. messageSends: ["contents:", "class:", "style:", unescape("%2C"), "asString", "percent", "div"],
  271. referencedClasses: []
  272. }),
  273. smalltalk.ProgressBar);
  274. smalltalk.setup(smalltalk.ProgressBar);
  275. smalltalk.addClass('TestFailure', smalltalk.Error, [], 'SUnit');
  276. smalltalk.setup(smalltalk.TestFailure);
  277. smalltalk.addClass('TestRunner', smalltalk.TabWidget, ['selectedCategories', 'categoriesList', 'selectedClasses', 'classesList', 'selectedMethods', 'progressBar', 'methodsList', 'result', 'statusDiv'], 'SUnit');
  278. smalltalk.addMethod(
  279. '_label',
  280. smalltalk.method({
  281. selector: 'label',
  282. category: 'accessing',
  283. fn: function (){
  284. var self=this;
  285. return unescape("%5BTest%20runner%5D");
  286. return self;},
  287. source: unescape('label%0A%20%20%20%20%5E%27%5BTest%20runner%5D%27'),
  288. messageSends: [],
  289. referencedClasses: []
  290. }),
  291. smalltalk.TestRunner);
  292. smalltalk.addMethod(
  293. '_categories',
  294. smalltalk.method({
  295. selector: 'categories',
  296. category: 'accessing',
  297. fn: function (){
  298. var self=this;
  299. var categories=nil;
  300. categories=smalltalk.send(smalltalk.Array, "_new", []);
  301. smalltalk.send(smalltalk.send(self, "_allClasses", []), "_do_", [(function(each){return smalltalk.send(smalltalk.send(categories, "_includes_", [smalltalk.send(each, "_category", [])]), "_ifFalse_", [(function(){return smalltalk.send(categories, "_add_", [smalltalk.send(each, "_category", [])]);})]);})]);
  302. return smalltalk.send(categories, "_sort", []);
  303. return self;},
  304. source: unescape('categories%0A%20%20%20%20%7C%20categories%20%7C%0A%20%20%20%20categories%20%3A%3D%20Array%20new.%0A%20%20%20%20self%20allClasses%20do%3A%20%5B%3Aeach%20%7C%0A%09%28categories%20includes%3A%20each%20category%29%20ifFalse%3A%20%5B%0A%09%20%20%20%20categories%20add%3A%20each%20category%5D%5D.%0A%20%20%20%20%5Ecategories%20sort'),
  305. messageSends: ["new", "do:", "allClasses", "ifFalse:", "includes:", "category", "add:", "sort"],
  306. referencedClasses: [smalltalk.Array]
  307. }),
  308. smalltalk.TestRunner);
  309. smalltalk.addMethod(
  310. '_classes',
  311. smalltalk.method({
  312. selector: 'classes',
  313. category: 'accessing',
  314. fn: function (){
  315. var self=this;
  316. return smalltalk.send(smalltalk.send(smalltalk.send(self, "_allClasses", []), "_select_", [(function(each){return smalltalk.send(smalltalk.send(self, "_selectedCategories", []), "_includes_", [smalltalk.send(each, "_category", [])]);})]), "_sort_", [(function(a, b){return smalltalk.send(smalltalk.send(a, "_name", []), "__gt", [smalltalk.send(b, "_name", [])]);})]);
  317. return self;},
  318. source: unescape('classes%0A%20%20%20%20%5E%28self%20allClasses%20%0A%09select%3A%20%5B%3Aeach%20%7C%20self%20selectedCategories%20includes%3A%20each%20category%5D%29%0A%09sort%3A%20%5B%3Aa%20%3Ab%20%7C%20a%20name%20%3E%20b%20name%5D'),
  319. messageSends: ["sort:", "select:", "allClasses", "includes:", "selectedCategories", "category", unescape("%3E"), "name"],
  320. referencedClasses: []
  321. }),
  322. smalltalk.TestRunner);
  323. smalltalk.addMethod(
  324. '_selectedCategories',
  325. smalltalk.method({
  326. selector: 'selectedCategories',
  327. category: 'accessing',
  328. fn: function (){
  329. var self=this;
  330. return smalltalk.send(self['@selectedCategories'], "_ifNil_", [(function(){return self['@selectedCategories']=smalltalk.send(smalltalk.Array, "_new", []);})]);
  331. return self;},
  332. source: unescape('selectedCategories%0A%09%5EselectedCategories%20ifNil%3A%20%5BselectedCategories%20%3A%3D%20Array%20new%5D'),
  333. messageSends: ["ifNil:", "new"],
  334. referencedClasses: [smalltalk.Array]
  335. }),
  336. smalltalk.TestRunner);
  337. smalltalk.addMethod(
  338. '_allClasses',
  339. smalltalk.method({
  340. selector: 'allClasses',
  341. category: 'accessing',
  342. fn: function (){
  343. var self=this;
  344. return smalltalk.send(smalltalk.TestCase, "_allSubclasses", []);
  345. return self;},
  346. source: unescape('allClasses%0A%09%5ETestCase%20allSubclasses'),
  347. messageSends: ["allSubclasses"],
  348. referencedClasses: [smalltalk.TestCase]
  349. }),
  350. smalltalk.TestRunner);
  351. smalltalk.addMethod(
  352. '_selectedClasses',
  353. smalltalk.method({
  354. selector: 'selectedClasses',
  355. category: 'accessing',
  356. fn: function (){
  357. var self=this;
  358. return smalltalk.send(self['@selectedClasses'], "_ifNil_", [(function(){return self['@selectedClasses']=smalltalk.send(smalltalk.Array, "_new", []);})]);
  359. return self;},
  360. source: unescape('selectedClasses%0A%09%5EselectedClasses%20%20ifNil%3A%20%5BselectedClasses%20%3A%3D%20Array%20new%5D'),
  361. messageSends: ["ifNil:", "new"],
  362. referencedClasses: [smalltalk.Array]
  363. }),
  364. smalltalk.TestRunner);
  365. smalltalk.addMethod(
  366. '_progressBar',
  367. smalltalk.method({
  368. selector: 'progressBar',
  369. category: 'accessing',
  370. fn: function (){
  371. var self=this;
  372. return smalltalk.send(self['@progressBar'], "_ifNil_", [(function(){return self['@progressBar']=smalltalk.send(smalltalk.ProgressBar, "_new", []);})]);
  373. return self;},
  374. source: unescape('progressBar%0A%09%5EprogressBar%20ifNil%3A%20%5BprogressBar%20%3A%3D%20ProgressBar%20new%5D'),
  375. messageSends: ["ifNil:", "new"],
  376. referencedClasses: [smalltalk.ProgressBar]
  377. }),
  378. smalltalk.TestRunner);
  379. smalltalk.addMethod(
  380. '_selectedMethods',
  381. smalltalk.method({
  382. selector: 'selectedMethods',
  383. category: 'accessing',
  384. fn: function (){
  385. var self=this;
  386. return smalltalk.send(self['@selectedMethods'], "_ifNil_", [(function(){return smalltalk.send(smalltalk.send(self, "_selectedClasses", []), "_collect_", [(function(each){return smalltalk.send(smalltalk.send(smalltalk.send(each, "_methodDictionary", []), "_keys", []), "_select_", [(function(key){return smalltalk.send(key, "_beginsWith_", ["test"]);})]);})]);})]);
  387. return self;},
  388. source: unescape('selectedMethods%0A%09%5EselectedMethods%20ifNil%3A%20%5Bself%20selectedClasses%20collect%3A%20%5B%3Aeach%20%7C%0A%09%09each%20methodDictionary%20keys%20select%3A%20%5B%3Akey%20%7C%20%20key%20beginsWith%3A%20%27test%27%20%5D%5D%5D'),
  389. messageSends: ["ifNil:", "collect:", "selectedClasses", "select:", "keys", "methodDictionary", "beginsWith:"],
  390. referencedClasses: []
  391. }),
  392. smalltalk.TestRunner);
  393. smalltalk.addMethod(
  394. '_statusInfo',
  395. smalltalk.method({
  396. selector: 'statusInfo',
  397. category: 'accessing',
  398. fn: function (){
  399. var self=this;
  400. return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_printTotal", []), "__comma", [smalltalk.send(self, "_printPasses", [])]), "__comma", [smalltalk.send(self, "_printErrors", [])]), "__comma", [smalltalk.send(self, "_printFailures", [])]);
  401. return self;},
  402. source: unescape('statusInfo%0A%09%5Eself%20printTotal%2C%20self%20printPasses%2C%20self%20printErrors%2C%20self%20printFailures'),
  403. messageSends: [unescape("%2C"), "printTotal", "printPasses", "printErrors", "printFailures"],
  404. referencedClasses: []
  405. }),
  406. smalltalk.TestRunner);
  407. smalltalk.addMethod(
  408. '_result',
  409. smalltalk.method({
  410. selector: 'result',
  411. category: 'accessing',
  412. fn: function (){
  413. var self=this;
  414. return self['@result'];
  415. return self;},
  416. source: unescape('result%0A%09%5Eresult'),
  417. messageSends: [],
  418. referencedClasses: []
  419. }),
  420. smalltalk.TestRunner);
  421. smalltalk.addMethod(
  422. '_failedMethods',
  423. smalltalk.method({
  424. selector: 'failedMethods',
  425. category: 'accessing',
  426. fn: function (){
  427. var self=this;
  428. smalltalk.send(smalltalk.send(smalltalk.send(self, "_result", []), "_failures", []), "_collect_", [(function(each){return (function($rec){smalltalk.send($rec, "_class_", ["failures"]);return smalltalk.send($rec, "_with_", [each]);})(smalltalk.send(html, "_li", []));})]);
  429. return self;},
  430. source: unescape('failedMethods%0A%09self%20result%20failures%20collect%3A%20%5B%3Aeach%20%7C%0A%09%09html%20li%20%0A%09%09%09class%3A%20%27failures%27%3B%0A%09%09%09with%3A%20each%5D'),
  431. messageSends: ["collect:", "failures", "result", "class:", "with:", "li"],
  432. referencedClasses: []
  433. }),
  434. smalltalk.TestRunner);
  435. smalltalk.addMethod(
  436. '_selectAllCategories',
  437. smalltalk.method({
  438. selector: 'selectAllCategories',
  439. category: 'actions',
  440. fn: function (){
  441. var self=this;
  442. smalltalk.send(smalltalk.send(self, "_categories", []), "_do_", [(function(each){return smalltalk.send(smalltalk.send(self['@selectedCategories'], "_includes_", [each]), "_ifFalse_", [(function(){return smalltalk.send(smalltalk.send(self, "_selectedCategories", []), "_add_", [each]);})]);})]);
  443. (function($rec){smalltalk.send($rec, "_updateCategoriesList", []);return smalltalk.send($rec, "_updateClassesList", []);})(self);
  444. return self;},
  445. source: unescape('selectAllCategories%0A%09self%20categories%20do%3A%20%5B%3Aeach%20%7C%20%0A%09%09%28selectedCategories%20includes%3A%20each%29%20ifFalse%3A%20%5B%0A%09%09%09self%20selectedCategories%20add%3A%20each%5D%5D.%0A%09self%20%0A%09%20%20%20%20updateCategoriesList%3B%0A%09%20%20%20%20updateClassesList'),
  446. messageSends: ["do:", "categories", "ifFalse:", "includes:", "add:", "selectedCategories", "updateCategoriesList", "updateClassesList"],
  447. referencedClasses: []
  448. }),
  449. smalltalk.TestRunner);
  450. smalltalk.addMethod(
  451. '_toggleCategory_',
  452. smalltalk.method({
  453. selector: 'toggleCategory:',
  454. category: 'actions',
  455. fn: function (aCategory){
  456. var self=this;
  457. smalltalk.send(smalltalk.send(self, "_isSelectedCategory_", [aCategory]), "_ifFalse_ifTrue_", [(function(){return smalltalk.send(self['@selectedCategories'], "_add_", [aCategory]);}), (function(){return smalltalk.send(self['@selectedCategories'], "_remove_", [aCategory]);})]);
  458. (function($rec){smalltalk.send($rec, "_updateCategoriesList", []);return smalltalk.send($rec, "_updateClassesList", []);})(self);
  459. return self;},
  460. source: unescape('toggleCategory%3A%20aCategory%0A%09%28self%20isSelectedCategory%3A%20aCategory%29%20%0A%09%09ifFalse%3A%20%5BselectedCategories%20add%3A%20aCategory%5D%0A%09%09ifTrue%3A%20%5BselectedCategories%20remove%3A%20aCategory%5D.%0A%09self%20%0A%09%20%20%20%20updateCategoriesList%3B%0A%09%20%20%20%20updateClassesList'),
  461. messageSends: ["ifFalse:ifTrue:", "isSelectedCategory:", "add:", "remove:", "updateCategoriesList", "updateClassesList"],
  462. referencedClasses: []
  463. }),
  464. smalltalk.TestRunner);
  465. smalltalk.addMethod(
  466. '_toggleClass_',
  467. smalltalk.method({
  468. selector: 'toggleClass:',
  469. category: 'actions',
  470. fn: function (aClass){
  471. var self=this;
  472. smalltalk.send(smalltalk.send(self, "_isSelectedClass_", [aClass]), "_ifFalse_ifTrue_", [(function(){return smalltalk.send(self['@selectedClasses'], "_add_", [aClass]);}), (function(){return smalltalk.send(self['@selectedClasses'], "_remove_", [aClass]);})]);
  473. smalltalk.send(self, "_updateClassesList", []);
  474. return self;},
  475. source: unescape('toggleClass%3A%20aClass%0A%09%28self%20isSelectedClass%3A%20aClass%29%20%0A%09%09ifFalse%3A%20%5BselectedClasses%20add%3A%20aClass%5D%0A%09%09ifTrue%3A%20%5BselectedClasses%20remove%3A%20aClass%5D.%0A%09self%20%0A%09%20%20%20%20updateClassesList'),
  476. messageSends: ["ifFalse:ifTrue:", "isSelectedClass:", "add:", "remove:", "updateClassesList"],
  477. referencedClasses: []
  478. }),
  479. smalltalk.TestRunner);
  480. smalltalk.addMethod(
  481. '_selectAllClasses',
  482. smalltalk.method({
  483. selector: 'selectAllClasses',
  484. category: 'actions',
  485. fn: function (){
  486. var self=this;
  487. smalltalk.send(smalltalk.send(self, "_classes", []), "_do_", [(function(each){return smalltalk.send(smalltalk.send(self['@selectedClasses'], "_includes_", [each]), "_ifFalse_", [(function(){return smalltalk.send(smalltalk.send(self, "_selectedClasses", []), "_add_", [each]);})]);})]);
  488. (function($rec){smalltalk.send($rec, "_updateCategoriesList", []);return smalltalk.send($rec, "_updateClassesList", []);})(self);
  489. return self;},
  490. source: unescape('selectAllClasses%0A%09self%20classes%20do%3A%20%5B%3Aeach%20%7C%20%0A%09%09%28selectedClasses%20includes%3A%20each%29%20ifFalse%3A%20%5B%0A%09%09%09self%20selectedClasses%20add%3A%20each%5D%5D.%0A%09self%20%0A%09%20%20%20%20updateCategoriesList%3B%0A%09%20%20%20%20updateClassesList'),
  491. messageSends: ["do:", "classes", "ifFalse:", "includes:", "add:", "selectedClasses", "updateCategoriesList", "updateClassesList"],
  492. referencedClasses: []
  493. }),
  494. smalltalk.TestRunner);
  495. smalltalk.addMethod(
  496. '_run_',
  497. smalltalk.method({
  498. selector: 'run:',
  499. category: 'actions',
  500. fn: function (aCollection){
  501. var self=this;
  502. self['@result']=smalltalk.send(smalltalk.TestResult, "_new", []);
  503. (function($rec){smalltalk.send($rec, "_updateStatusDiv", []);return smalltalk.send($rec, "_updateMethodsList", []);})(self);
  504. smalltalk.send(smalltalk.send(self, "_progressBar", []), "_updatePercent_", [(0)]);
  505. smalltalk.send(self['@result'], "_total_", [smalltalk.send(aCollection, "_inject_into_", [(0), (function(acc, each){return smalltalk.send(acc, "__plus", [smalltalk.send(smalltalk.send(each, "_methods", []), "_size", [])]);})])]);
  506. smalltalk.send(aCollection, "_do_", [(function(each){return smalltalk.send((function(){smalltalk.send(each, "_runCaseFor_", [self['@result']]);smalltalk.send(smalltalk.send(self, "_progressBar", []), "_updatePercent_", [smalltalk.send(smalltalk.send(smalltalk.send(self['@result'], "_runs", []), "__slash", [smalltalk.send(self['@result'], "_total", [])]), "__star", [(100)])]);smalltalk.send(self, "_updateStatusDiv", []);return smalltalk.send(self, "_updateMethodsList", []);}), "_valueWithTimeout_", [(100)]);})]);
  507. return self;},
  508. source: unescape('run%3A%20aCollection%0A%09result%20%3A%3D%20TestResult%20new.%0A%09self%20%0A%09%09updateStatusDiv%3B%0A%09%09updateMethodsList.%0A%09self%20progressBar%20updatePercent%3A%200.%0A%09result%20total%3A%20%28aCollection%20inject%3A%200%20into%3A%20%5B%3Aacc%20%3Aeach%20%7C%20acc%20+%20each%20methods%20size%5D%29.%0A%09aCollection%20do%3A%20%5B%3Aeach%20%7C%20%0A%09%09%5Beach%20runCaseFor%3A%20result.%0A%09%09self%20progressBar%20updatePercent%3A%20result%20runs%20/%20result%20total%20*%20100.%0A%09%09self%20updateStatusDiv.%0A%09%09self%20updateMethodsList%5D%20valueWithTimeout%3A%20100%5D.'),
  509. messageSends: ["new", "updateStatusDiv", "updateMethodsList", "updatePercent:", "progressBar", "total:", "inject:into:", unescape("+"), "size", "methods", "do:", "valueWithTimeout:", "runCaseFor:", unescape("*"), unescape("/"), "runs", "total"],
  510. referencedClasses: [smalltalk.nil]
  511. }),
  512. smalltalk.TestRunner);
  513. smalltalk.addMethod(
  514. '_initialize',
  515. smalltalk.method({
  516. selector: 'initialize',
  517. category: 'initialization',
  518. fn: function (){
  519. var self=this;
  520. smalltalk.send(self, "_initialize", [], smalltalk.TabWidget);
  521. self['@result']=smalltalk.send(smalltalk.TestResult, "_new", []);
  522. return self;},
  523. source: unescape('initialize%0A%09super%20initialize.%0A%09result%20%3A%3D%20TestResult%20new'),
  524. messageSends: ["initialize", "new"],
  525. referencedClasses: [smalltalk.nil]
  526. }),
  527. smalltalk.TestRunner);
  528. smalltalk.addMethod(
  529. '_printErrors',
  530. smalltalk.method({
  531. selector: 'printErrors',
  532. category: 'printing',
  533. fn: function (){
  534. var self=this;
  535. return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_result", []), "_errors", []), "_size", []), "_asString", []), "__comma", [unescape("%20errors%2C%20")]);
  536. return self;},
  537. source: unescape('printErrors%0A%09%5Eself%20result%20errors%20size%20asString%20%2C%20%27%20errors%2C%20%27'),
  538. messageSends: [unescape("%2C"), "asString", "size", "errors", "result"],
  539. referencedClasses: []
  540. }),
  541. smalltalk.TestRunner);
  542. smalltalk.addMethod(
  543. '_printFailures',
  544. smalltalk.method({
  545. selector: 'printFailures',
  546. category: 'printing',
  547. fn: function (){
  548. var self=this;
  549. return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_result", []), "_failures", []), "_size", []), "_asString", []), "__comma", [" failures"]);
  550. return self;},
  551. source: unescape('printFailures%0A%09%5Eself%20result%20failures%20size%20asString%2C%20%27%20failures%27'),
  552. messageSends: [unescape("%2C"), "asString", "size", "failures", "result"],
  553. referencedClasses: []
  554. }),
  555. smalltalk.TestRunner);
  556. smalltalk.addMethod(
  557. '_printPasses',
  558. smalltalk.method({
  559. selector: 'printPasses',
  560. category: 'printing',
  561. fn: function (){
  562. var self=this;
  563. return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_result", []), "_total", []), "__minus", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_result", []), "_errors", []), "_size", []), "__plus", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_result", []), "_failures", []), "_size", [])])]), "_asString", []), "__comma", [unescape("%20passes%2C%20")]);
  564. return self;},
  565. source: unescape('printPasses%0A%09%5E%28%28%28self%20result%20total%29%20-%20%28self%20result%20errors%20size%20+%20%28self%20result%20failures%20size%29%29%29%20asString%29%20%2C%20%27%20passes%2C%20%27'),
  566. messageSends: [unescape("%2C"), "asString", unescape("-"), "total", "result", unescape("+"), "size", "errors", "failures"],
  567. referencedClasses: []
  568. }),
  569. smalltalk.TestRunner);
  570. smalltalk.addMethod(
  571. '_printTotal',
  572. smalltalk.method({
  573. selector: 'printTotal',
  574. category: 'printing',
  575. fn: function (){
  576. var self=this;
  577. return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_result", []), "_total", []), "_asString", []), "__comma", [unescape("%20runs%2C%20")]);
  578. return self;},
  579. source: unescape('printTotal%0A%09%5Eself%20result%20total%20asString%2C%20%27%20runs%2C%20%27'),
  580. messageSends: [unescape("%2C"), "asString", "total", "result"],
  581. referencedClasses: []
  582. }),
  583. smalltalk.TestRunner);
  584. smalltalk.addMethod(
  585. '_renderBoxOn_',
  586. smalltalk.method({
  587. selector: 'renderBoxOn:',
  588. category: 'rendering',
  589. fn: function (html){
  590. var self=this;
  591. (function($rec){smalltalk.send($rec, "_renderCategoriesOn_", [html]);smalltalk.send($rec, "_renderClassesOn_", [html]);return smalltalk.send($rec, "_renderResultsOn_", [html]);})(self);
  592. return self;},
  593. source: unescape('renderBoxOn%3A%20html%0A%20%20%20%20self%20%0A%09renderCategoriesOn%3A%20html%3B%0A%09renderClassesOn%3A%20html%3B%0A%09renderResultsOn%3A%20html'),
  594. messageSends: ["renderCategoriesOn:", "renderClassesOn:", "renderResultsOn:"],
  595. referencedClasses: []
  596. }),
  597. smalltalk.TestRunner);
  598. smalltalk.addMethod(
  599. '_renderButtonsOn_',
  600. smalltalk.method({
  601. selector: 'renderButtonsOn:',
  602. category: 'rendering',
  603. fn: function (html){
  604. var self=this;
  605. (function($rec){smalltalk.send($rec, "_with_", ["Run selected"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_run_", [smalltalk.send(smalltalk.send(self, "_selectedClasses", []), "_collect_", [(function(each){return smalltalk.send(each, "_new", []);})])]);})]);})(smalltalk.send(html, "_button", []));
  606. return self;},
  607. source: unescape('renderButtonsOn%3A%20html%0A%20%20%20%20html%20button%0A%09with%3A%20%27Run%20selected%27%3B%0A%09onClick%3A%20%5Bself%20run%3A%20%28self%20selectedClasses%20collect%3A%20%5B%3Aeach%20%7C%20each%20new%5D%29%5D'),
  608. messageSends: ["with:", "onClick:", "run:", "collect:", "selectedClasses", "new", "button"],
  609. referencedClasses: []
  610. }),
  611. smalltalk.TestRunner);
  612. smalltalk.addMethod(
  613. '_renderCategoriesOn_',
  614. smalltalk.method({
  615. selector: 'renderCategoriesOn:',
  616. category: 'rendering',
  617. fn: function (html){
  618. var self=this;
  619. self['@categoriesList']=smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["jt_column sunit categories"]);
  620. smalltalk.send(self, "_updateCategoriesList", []);
  621. return self;},
  622. source: unescape('renderCategoriesOn%3A%20html%0A%20%20%20%20%09categoriesList%20%3A%3D%20html%20ul%20class%3A%20%27jt_column%20sunit%20categories%27.%0A%09self%20updateCategoriesList'),
  623. messageSends: ["class:", "ul", "updateCategoriesList"],
  624. referencedClasses: []
  625. }),
  626. smalltalk.TestRunner);
  627. smalltalk.addMethod(
  628. '_renderClassesOn_',
  629. smalltalk.method({
  630. selector: 'renderClassesOn:',
  631. category: 'rendering',
  632. fn: function (html){
  633. var self=this;
  634. self['@classesList']=smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["jt_column sunit classes"]);
  635. smalltalk.send(self, "_updateClassesList", []);
  636. return self;},
  637. source: unescape('renderClassesOn%3A%20html%0A%20%20%20%20%09classesList%20%3A%3D%20html%20ul%20class%3A%20%27jt_column%20sunit%20classes%27.%0A%09self%20updateClassesList'),
  638. messageSends: ["class:", "ul", "updateClassesList"],
  639. referencedClasses: []
  640. }),
  641. smalltalk.TestRunner);
  642. smalltalk.addMethod(
  643. '_renderResultsOn_',
  644. smalltalk.method({
  645. selector: 'renderResultsOn:',
  646. category: 'rendering',
  647. fn: function (html){
  648. var self=this;
  649. self['@statusDiv']=smalltalk.send(html, "_div", []);
  650. smalltalk.send(html, "_with_", [smalltalk.send(self, "_progressBar", [])]);
  651. self['@methodsList']=smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["jt_column sunit methods"]);
  652. smalltalk.send(self, "_updateMethodsList", []);
  653. smalltalk.send(self, "_updateStatusDiv", []);
  654. return self;},
  655. source: unescape('renderResultsOn%3A%20html%0A%20%20%20%20%09statusDiv%20%3A%3D%20html%20div.%0A%09html%20with%3A%20self%20progressBar.%0A%20%20%20%09methodsList%20%3A%3D%20html%20ul%20class%3A%20%27jt_column%20sunit%20methods%27.%0A%09self%20updateMethodsList.%0A%09self%20updateStatusDiv'),
  656. messageSends: ["div", "with:", "progressBar", "class:", "ul", "updateMethodsList", "updateStatusDiv"],
  657. referencedClasses: []
  658. }),
  659. smalltalk.TestRunner);
  660. smalltalk.addMethod(
  661. '_renderFailuresOn_',
  662. smalltalk.method({
  663. selector: 'renderFailuresOn:',
  664. category: 'rendering',
  665. fn: function (html){
  666. var self=this;
  667. smalltalk.send(smalltalk.send(smalltalk.send(self, "_result", []), "_failures", []), "_do_", [(function(each){return (function($rec){smalltalk.send($rec, "_class_", ["failures"]);return smalltalk.send($rec, "_with_", [each]);})(smalltalk.send(html, "_li", []));})]);
  668. return self;},
  669. source: unescape('renderFailuresOn%3A%20html%0A%09self%20result%20failures%20do%3A%20%5B%3Aeach%20%7C%0A%09%09html%20li%20%0A%09%09%09class%3A%20%27failures%27%3B%0A%09%09%09with%3A%20each%5D'),
  670. messageSends: ["do:", "failures", "result", "class:", "with:", "li"],
  671. referencedClasses: []
  672. }),
  673. smalltalk.TestRunner);
  674. smalltalk.addMethod(
  675. '_renderErrorsOn_',
  676. smalltalk.method({
  677. selector: 'renderErrorsOn:',
  678. category: 'rendering',
  679. fn: function (html){
  680. var self=this;
  681. smalltalk.send(smalltalk.send(smalltalk.send(self, "_result", []), "_errors", []), "_do_", [(function(each){return (function($rec){smalltalk.send($rec, "_class_", ["errors"]);return smalltalk.send($rec, "_with_", [each]);})(smalltalk.send(html, "_li", []));})]);
  682. return self;},
  683. source: unescape('renderErrorsOn%3A%20html%0A%09self%20result%20errors%20do%3A%20%5B%3Aeach%20%7C%0A%09%09html%20li%20%0A%09%09%09class%3A%20%27errors%27%3B%0A%09%09%09with%3A%20each%5D'),
  684. messageSends: ["do:", "errors", "result", "class:", "with:", "li"],
  685. referencedClasses: []
  686. }),
  687. smalltalk.TestRunner);
  688. smalltalk.addMethod(
  689. '_canBeClosed',
  690. smalltalk.method({
  691. selector: 'canBeClosed',
  692. category: 'testing',
  693. fn: function (){
  694. var self=this;
  695. return true;
  696. return self;},
  697. source: unescape('canBeClosed%0A%20%20%20%20%5Etrue'),
  698. messageSends: [],
  699. referencedClasses: []
  700. }),
  701. smalltalk.TestRunner);
  702. smalltalk.addMethod(
  703. '_isSelectedClass_',
  704. smalltalk.method({
  705. selector: 'isSelectedClass:',
  706. category: 'testing',
  707. fn: function (aClass){
  708. var self=this;
  709. return smalltalk.send(smalltalk.send(self, "_selectedClasses", []), "_includes_", [aClass]);
  710. return self;},
  711. source: unescape('isSelectedClass%3A%20aClass%0A%09%5E%28self%20selectedClasses%20includes%3A%20aClass%29'),
  712. messageSends: ["includes:", "selectedClasses"],
  713. referencedClasses: []
  714. }),
  715. smalltalk.TestRunner);
  716. smalltalk.addMethod(
  717. '_isSelectedCategory_',
  718. smalltalk.method({
  719. selector: 'isSelectedCategory:',
  720. category: 'testing',
  721. fn: function (aCategory){
  722. var self=this;
  723. return smalltalk.send(smalltalk.send(self, "_selectedCategories", []), "_includes_", [aCategory]);
  724. return self;},
  725. source: unescape('isSelectedCategory%3A%20aCategory%0A%09%5E%28self%20selectedCategories%20includes%3A%20aCategory%29'),
  726. messageSends: ["includes:", "selectedCategories"],
  727. referencedClasses: []
  728. }),
  729. smalltalk.TestRunner);
  730. smalltalk.addMethod(
  731. '_updateCategoriesList',
  732. smalltalk.method({
  733. selector: 'updateCategoriesList',
  734. category: 'updating',
  735. fn: function (){
  736. var self=this;
  737. smalltalk.send(self['@categoriesList'], "_contents_", [(function(html){(function($rec){smalltalk.send($rec, "_class_", ["all"]);smalltalk.send($rec, "_with_", ["All"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_selectAllCategories", []);})]);})(smalltalk.send(html, "_li", []));return smalltalk.send(smalltalk.send(self, "_categories", []), "_do_", [(function(each){var li=nil;
  738. li=smalltalk.send(html, "_li", []);smalltalk.send(smalltalk.send(smalltalk.send(self, "_selectedCategories", []), "_includes_", [each]), "_ifTrue_", [(function(){return smalltalk.send(li, "_class_", ["selected"]);})]);return (function($rec){smalltalk.send($rec, "_with_", [each]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_toggleCategory_", [each]);})]);})(li);})]);})]);
  739. return self;},
  740. source: unescape('updateCategoriesList%0A%20%20%20%20categoriesList%20contents%3A%20%5B%3Ahtml%20%7C%0A%09%20%20%20%20html%20li%20%0A%09%09class%3A%20%27all%27%3B%0A%09%09with%3A%20%27All%27%3B%0A%09%09onClick%3A%20%5Bself%20selectAllCategories%5D.%0A%09self%20categories%20do%3A%20%5B%3Aeach%20%7C%7C%20li%20%7C%0A%09%20%20%20%20li%20%3A%3D%20html%20li.%0A%09%20%20%20%20%28self%20selectedCategories%20includes%3A%20each%29%20ifTrue%3A%20%5B%0A%09%09li%20class%3A%20%27selected%27%5D.%0A%09%20%20%20%20li%0A%09%09with%3A%20each%3B%0A%09%09onClick%3A%20%5Bself%20toggleCategory%3A%20each%5D%5D%5D'),
  741. messageSends: ["contents:", "class:", "with:", "onClick:", "selectAllCategories", "li", "do:", "categories", "ifTrue:", "includes:", "selectedCategories", "toggleCategory:"],
  742. referencedClasses: []
  743. }),
  744. smalltalk.TestRunner);
  745. smalltalk.addMethod(
  746. '_updateClassesList',
  747. smalltalk.method({
  748. selector: 'updateClassesList',
  749. category: 'updating',
  750. fn: function (){
  751. var self=this;
  752. smalltalk.send(self['@classesList'], "_contents_", [(function(html){smalltalk.send(smalltalk.send(smalltalk.send(self, "_selectedCategories", []), "_isEmpty", []), "_ifFalse_", [(function(){return (function($rec){smalltalk.send($rec, "_class_", ["all"]);smalltalk.send($rec, "_with_", ["All"]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_selectAllClasses", []);})]);})(smalltalk.send(html, "_li", []));})]);return smalltalk.send(smalltalk.send(self, "_classes", []), "_do_", [(function(each){var li=nil;
  753. li=smalltalk.send(html, "_li", []);smalltalk.send(smalltalk.send(smalltalk.send(self, "_selectedClasses", []), "_includes_", [each]), "_ifTrue_", [(function(){return smalltalk.send(li, "_class_", ["selected"]);})]);return (function($rec){smalltalk.send($rec, "_with_", [smalltalk.send(each, "_name", [])]);return smalltalk.send($rec, "_onClick_", [(function(){return smalltalk.send(self, "_toggleClass_", [each]);})]);})(li);})]);})]);
  754. return self;},
  755. source: unescape('updateClassesList%0A%20%20%20%20classesList%20contents%3A%20%5B%3Ahtml%20%7C%0A%09%28self%20selectedCategories%20isEmpty%29%20ifFalse%3A%20%5B%0A%09%09html%20li%0A%09%09%09class%3A%20%27all%27%3B%0A%09%09%09with%3A%20%27All%27%3B%0A%09%09%09onClick%3A%20%5Bself%20selectAllClasses%5D%5D.%0A%09self%20classes%20do%3A%20%5B%3Aeach%20%7C%7C%20li%20%7C%0A%09%09li%20%3A%3D%20html%20li.%0A%09%09%28self%20selectedClasses%20includes%3A%20each%29%20ifTrue%3A%20%5B%0A%09%09%09li%20class%3A%20%27selected%27%5D.%0A%09%09li%0A%09%09%09with%3A%20each%20name%3B%0A%09%09%09onClick%3A%20%5Bself%20toggleClass%3A%20each%5D%5D%5D'),
  756. messageSends: ["contents:", "ifFalse:", "isEmpty", "selectedCategories", "class:", "with:", "onClick:", "selectAllClasses", "li", "do:", "classes", "ifTrue:", "includes:", "selectedClasses", "name", "toggleClass:"],
  757. referencedClasses: []
  758. }),
  759. smalltalk.TestRunner);
  760. smalltalk.addMethod(
  761. '_updateMethodsList',
  762. smalltalk.method({
  763. selector: 'updateMethodsList',
  764. category: 'updating',
  765. fn: function (){
  766. var self=this;
  767. smalltalk.send(self['@methodsList'], "_contents_", [(function(html){smalltalk.send(self, "_renderFailuresOn_", [html]);return smalltalk.send(self, "_renderErrorsOn_", [html]);})]);
  768. return self;},
  769. source: unescape('updateMethodsList%0A%09methodsList%20contents%3A%20%5B%3Ahtml%20%7C%0A%09%09self%20renderFailuresOn%3A%20html.%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20self%20renderErrorsOn%3A%20html%5D'),
  770. messageSends: ["contents:", "renderFailuresOn:", "renderErrorsOn:"],
  771. referencedClasses: []
  772. }),
  773. smalltalk.TestRunner);
  774. smalltalk.addMethod(
  775. '_updateStatusDiv',
  776. smalltalk.method({
  777. selector: 'updateStatusDiv',
  778. category: 'updating',
  779. fn: function (){
  780. var self=this;
  781. smalltalk.send(self['@statusDiv'], "_class_", [smalltalk.send("sunit status ", "__comma", [smalltalk.send(self['@result'], "_status", [])])]);
  782. smalltalk.send(self['@statusDiv'], "_contents_", [(function(html){return smalltalk.send(smalltalk.send(html, "_span", []), "_with_", [smalltalk.send(self, "_statusInfo", [])]);})]);
  783. return self;},
  784. source: unescape('updateStatusDiv%0A%09statusDiv%20class%3A%20%27sunit%20status%20%27%2C%20result%20status.%0A%09statusDiv%20contents%3A%20%5B%3Ahtml%20%7C%0A%09%09html%20span%20with%3A%20self%20statusInfo%5D'),
  785. messageSends: ["class:", unescape("%2C"), "status", "contents:", "with:", "span", "statusInfo"],
  786. referencedClasses: []
  787. }),
  788. smalltalk.TestRunner);
  789. smalltalk.setup(smalltalk.TestRunner);
  790. smalltalk.addClass('TestResult', smalltalk.Object, ['timestamp', 'runs', 'errors', 'failures', 'total'], 'SUnit');
  791. smalltalk.addMethod(
  792. '_timestamp',
  793. smalltalk.method({
  794. selector: 'timestamp',
  795. category: 'accessing',
  796. fn: function (){
  797. var self=this;
  798. return self['@timestamp'];
  799. return self;},
  800. source: unescape('timestamp%0A%09%5Etimestamp'),
  801. messageSends: [],
  802. referencedClasses: []
  803. }),
  804. smalltalk.TestResult);
  805. smalltalk.addMethod(
  806. '_errors',
  807. smalltalk.method({
  808. selector: 'errors',
  809. category: 'accessing',
  810. fn: function (){
  811. var self=this;
  812. return self['@errors'];
  813. return self;},
  814. source: unescape('errors%0A%09%5Eerrors'),
  815. messageSends: [],
  816. referencedClasses: []
  817. }),
  818. smalltalk.TestResult);
  819. smalltalk.addMethod(
  820. '_failures',
  821. smalltalk.method({
  822. selector: 'failures',
  823. category: 'accessing',
  824. fn: function (){
  825. var self=this;
  826. return self['@failures'];
  827. return self;},
  828. source: unescape('failures%0A%09%5Efailures'),
  829. messageSends: [],
  830. referencedClasses: []
  831. }),
  832. smalltalk.TestResult);
  833. smalltalk.addMethod(
  834. '_total',
  835. smalltalk.method({
  836. selector: 'total',
  837. category: 'accessing',
  838. fn: function (){
  839. var self=this;
  840. return self['@total'];
  841. return self;},
  842. source: unescape('total%0A%09%5Etotal'),
  843. messageSends: [],
  844. referencedClasses: []
  845. }),
  846. smalltalk.TestResult);
  847. smalltalk.addMethod(
  848. '_total_',
  849. smalltalk.method({
  850. selector: 'total:',
  851. category: 'accessing',
  852. fn: function (aNumber){
  853. var self=this;
  854. self['@total']=aNumber;
  855. return self;},
  856. source: unescape('total%3A%20aNumber%0A%09total%20%3A%3D%20aNumber'),
  857. messageSends: [],
  858. referencedClasses: []
  859. }),
  860. smalltalk.TestResult);
  861. smalltalk.addMethod(
  862. '_addError_',
  863. smalltalk.method({
  864. selector: 'addError:',
  865. category: 'accessing',
  866. fn: function (anError){
  867. var self=this;
  868. smalltalk.send(smalltalk.send(self, "_errors", []), "_add_", [anError]);
  869. return self;},
  870. source: unescape('addError%3A%20anError%0A%09self%20errors%20add%3A%20anError'),
  871. messageSends: ["add:", "errors"],
  872. referencedClasses: []
  873. }),
  874. smalltalk.TestResult);
  875. smalltalk.addMethod(
  876. '_addFailure_',
  877. smalltalk.method({
  878. selector: 'addFailure:',
  879. category: 'accessing',
  880. fn: function (aFailure){
  881. var self=this;
  882. smalltalk.send(smalltalk.send(self, "_failures", []), "_add_", [aFailure]);
  883. return self;},
  884. source: unescape('addFailure%3A%20aFailure%0A%09self%20failures%20add%3A%20aFailure'),
  885. messageSends: ["add:", "failures"],
  886. referencedClasses: []
  887. }),
  888. smalltalk.TestResult);
  889. smalltalk.addMethod(
  890. '_runs',
  891. smalltalk.method({
  892. selector: 'runs',
  893. category: 'accessing',
  894. fn: function (){
  895. var self=this;
  896. return self['@runs'];
  897. return self;},
  898. source: unescape('runs%0A%09%5Eruns'),
  899. messageSends: [],
  900. referencedClasses: []
  901. }),
  902. smalltalk.TestResult);
  903. smalltalk.addMethod(
  904. '_increaseRuns',
  905. smalltalk.method({
  906. selector: 'increaseRuns',
  907. category: 'accessing',
  908. fn: function (){
  909. var self=this;
  910. self['@runs']=smalltalk.send(self['@runs'], "__plus", [(1)]);
  911. return self;},
  912. source: unescape('increaseRuns%0A%09runs%20%3A%3D%20runs%20+%201'),
  913. messageSends: [unescape("+")],
  914. referencedClasses: []
  915. }),
  916. smalltalk.TestResult);
  917. smalltalk.addMethod(
  918. '_status',
  919. smalltalk.method({
  920. selector: 'status',
  921. category: 'accessing',
  922. fn: function (){
  923. var self=this;
  924. return smalltalk.send(smalltalk.send(smalltalk.send(self, "_errors", []), "_isEmpty", []), "_ifTrue_ifFalse_", [(function(){return smalltalk.send(smalltalk.send(smalltalk.send(self, "_failures", []), "_isEmpty", []), "_ifTrue_ifFalse_", [(function(){return "success";}), (function(){return "failure";})]);}), (function(){return "error";})]);
  925. return self;},
  926. source: unescape('status%0A%09%5Eself%20errors%20isEmpty%20%0A%09%09ifTrue%3A%20%5B%0A%09%09%09self%20failures%20isEmpty%20%0A%09%09%09%09ifTrue%3A%20%5B%27success%27%5D%0A%09%09%09%09ifFalse%3A%20%5B%27failure%27%5D%5D%0A%09%09ifFalse%3A%20%5B%27error%27%5D'),
  927. messageSends: ["ifTrue:ifFalse:", "isEmpty", "errors", "failures"],
  928. referencedClasses: []
  929. }),
  930. smalltalk.TestResult);
  931. smalltalk.addMethod(
  932. '_initialize',
  933. smalltalk.method({
  934. selector: 'initialize',
  935. category: 'initialization',
  936. fn: function (){
  937. var self=this;
  938. smalltalk.send(self, "_initialize", [], smalltalk.Object);
  939. self['@timestamp']=smalltalk.send(smalltalk.Date, "_now", []);
  940. self['@runs']=(0);
  941. self['@errors']=smalltalk.send(smalltalk.Array, "_new", []);
  942. self['@failures']=smalltalk.send(smalltalk.Array, "_new", []);
  943. self['@total']=(0);
  944. return self;},
  945. source: unescape('initialize%0A%09super%20initialize.%0A%09timestamp%20%3A%3D%20Date%20now.%0A%09runs%20%3A%3D%200.%0A%09errors%20%3A%3D%20Array%20new.%0A%09failures%20%3A%3D%20Array%20new.%0A%09total%20%3A%3D%200'),
  946. messageSends: ["initialize", "now", "new"],
  947. referencedClasses: [smalltalk.Date,smalltalk.Array]
  948. }),
  949. smalltalk.TestResult);
  950. smalltalk.setup(smalltalk.TestResult);
  951. smalltalk.addClass('ExampleTest2', smalltalk.TestCase, [], 'SUnit');
  952. smalltalk.addMethod(
  953. '_testPasses',
  954. smalltalk.method({
  955. selector: 'testPasses',
  956. category: 'not yet classified',
  957. fn: function (){
  958. var self=this;
  959. smalltalk.send((100000), "_timesRepeat_", [(function(){return smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send((1), "__plus", [(1)]), "__eq", [(2)])]);})]);
  960. return self;},
  961. source: unescape('testPasses%0A%09100000%20timesRepeat%3A%20%5Bself%20assert%3A%201%20+%201%20%3D%202%5D'),
  962. messageSends: ["timesRepeat:", "assert:", unescape("%3D"), unescape("+")],
  963. referencedClasses: []
  964. }),
  965. smalltalk.ExampleTest2);
  966. smalltalk.setup(smalltalk.ExampleTest2);
  967. smalltalk.addClass('ExampleTest3', smalltalk.TestCase, [], 'SUnit');
  968. smalltalk.addMethod(
  969. '_testPasses',
  970. smalltalk.method({
  971. selector: 'testPasses',
  972. category: 'not yet classified',
  973. fn: function (){
  974. var self=this;
  975. smalltalk.send((100000), "_timesRepeat_", [(function(){return smalltalk.send(self, "_assert_", [smalltalk.send(smalltalk.send((1), "__plus", [(1)]), "__eq", [(2)])]);})]);
  976. return self;},
  977. source: unescape('testPasses%0A%09100000%20timesRepeat%3A%20%5Bself%20assert%3A%201%20+%201%20%3D%202%5D'),
  978. messageSends: ["timesRepeat:", "assert:", unescape("%3D"), unescape("+")],
  979. referencedClasses: []
  980. }),
  981. smalltalk.ExampleTest3);
  982. smalltalk.setup(smalltalk.ExampleTest3);