SUnit.deploy.js 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761
  1. smalltalk.addPackage('SUnit', {});
  2. smalltalk.addClass('ResultAnnouncement', smalltalk.Object, ['result'], 'SUnit');
  3. smalltalk.addMethod(
  4. "_result",
  5. smalltalk.method({
  6. selector: "result",
  7. fn: function (){
  8. var self=this;
  9. return self["@result"];
  10. }
  11. }),
  12. smalltalk.ResultAnnouncement);
  13. smalltalk.addMethod(
  14. "_result_",
  15. smalltalk.method({
  16. selector: "result:",
  17. fn: function (aTestResult){
  18. var self=this;
  19. self["@result"]=aTestResult;
  20. return self}
  21. }),
  22. smalltalk.ResultAnnouncement);
  23. smalltalk.addClass('RunningTestContext', smalltalk.Object, ['finished', 'testCase', 'result'], 'SUnit');
  24. smalltalk.addMethod(
  25. "_execute_",
  26. smalltalk.method({
  27. selector: "execute:",
  28. fn: function (aBlock){
  29. var self=this;
  30. var $1,$2,$3,$4;
  31. smalltalk.send(self["@testCase"],"_context_",[self]);
  32. smalltalk.send((function(){
  33. return smalltalk.send((function(){
  34. return smalltalk.send((function(){
  35. return smalltalk.send(aBlock,"_ensure_",[(function(){
  36. smalltalk.send(self["@testCase"],"_context_",[nil]);
  37. $1=smalltalk.send(self["@testCase"],"_isAsync",[]);
  38. if(! smalltalk.assert($1)){
  39. return smalltalk.send(self["@testCase"],"_tearDown",[]);
  40. };
  41. })]);
  42. }),"_on_do_",[(smalltalk.TestFailure || TestFailure),(function(ex){
  43. $2=smalltalk.send(self["@testCase"],"_isAsync",[]);
  44. if(smalltalk.assert($2)){
  45. smalltalk.send(self["@testCase"],"_finished",[]);
  46. };
  47. return smalltalk.send(self["@result"],"_addFailure_",[self["@testCase"]]);
  48. })]);
  49. }),"_on_do_",[(smalltalk.Error || Error),(function(ex){
  50. $3=smalltalk.send(self["@testCase"],"_isAsync",[]);
  51. if(smalltalk.assert($3)){
  52. smalltalk.send(self["@testCase"],"_finished",[]);
  53. };
  54. return smalltalk.send(self["@result"],"_addError_",[self["@testCase"]]);
  55. })]);
  56. }),"_ensure_",[(function(){
  57. $4=smalltalk.send(self["@testCase"],"_isAsync",[]);
  58. if(! smalltalk.assert($4)){
  59. smalltalk.send(self["@result"],"_increaseRuns",[]);
  60. return smalltalk.send(self["@finished"],"_value",[]);
  61. };
  62. })]);
  63. return self}
  64. }),
  65. smalltalk.RunningTestContext);
  66. smalltalk.addMethod(
  67. "_finished_",
  68. smalltalk.method({
  69. selector: "finished:",
  70. fn: function (aBlock){
  71. var self=this;
  72. self["@finished"]=aBlock;
  73. return self}
  74. }),
  75. smalltalk.RunningTestContext);
  76. smalltalk.addMethod(
  77. "_result_",
  78. smalltalk.method({
  79. selector: "result:",
  80. fn: function (aTestResult){
  81. var self=this;
  82. self["@result"]=aTestResult;
  83. return self}
  84. }),
  85. smalltalk.RunningTestContext);
  86. smalltalk.addMethod(
  87. "_start",
  88. smalltalk.method({
  89. selector: "start",
  90. fn: function (){
  91. var self=this;
  92. smalltalk.send(self,"_execute_",[(function(){
  93. smalltalk.send(self["@testCase"],"_setUp",[]);
  94. return smalltalk.send(self["@testCase"],"_performTest",[]);
  95. })]);
  96. return self}
  97. }),
  98. smalltalk.RunningTestContext);
  99. smalltalk.addMethod(
  100. "_testCase_",
  101. smalltalk.method({
  102. selector: "testCase:",
  103. fn: function (aTestCase){
  104. var self=this;
  105. self["@testCase"]=aTestCase;
  106. return self}
  107. }),
  108. smalltalk.RunningTestContext);
  109. smalltalk.addMethod(
  110. "_testCase_result_finished_",
  111. smalltalk.method({
  112. selector: "testCase:result:finished:",
  113. fn: function (aTestCase,aTestResult,aBlock){
  114. var self=this;
  115. var $2,$3,$1;
  116. $2=smalltalk.send(self,"_new",[]);
  117. smalltalk.send($2,"_testCase_",[aTestCase]);
  118. smalltalk.send($2,"_result_",[aTestResult]);
  119. smalltalk.send($2,"_finished_",[aBlock]);
  120. $3=smalltalk.send($2,"_yourself",[]);
  121. $1=$3;
  122. return $1;
  123. }
  124. }),
  125. smalltalk.RunningTestContext.klass);
  126. smalltalk.addClass('TestCase', smalltalk.Object, ['testSelector', 'asyncTimeout', 'context'], 'SUnit');
  127. smalltalk.addMethod(
  128. "_assert_",
  129. smalltalk.method({
  130. selector: "assert:",
  131. fn: function (aBoolean) {
  132. var self = this;
  133. smalltalk.send(self, "_assert_description_", [aBoolean, "Assertion failed"]);
  134. return self;
  135. }
  136. }),
  137. smalltalk.TestCase);
  138. smalltalk.addMethod(
  139. "_assert_description_",
  140. smalltalk.method({
  141. selector: "assert:description:",
  142. fn: function (aBoolean, aString) {
  143. var self = this;
  144. if (!smalltalk.assert(aBoolean)) {
  145. smalltalk.send(self, "_signalFailure_", [aString]);
  146. }
  147. return self;
  148. }
  149. }),
  150. smalltalk.TestCase);
  151. smalltalk.addMethod(
  152. "_assert_equals_",
  153. smalltalk.method({
  154. selector: "assert:equals:",
  155. fn: function (expected, actual) {
  156. var self = this;
  157. var $1;
  158. $1 = smalltalk.send(self, "_assert_description_", [smalltalk.send(expected, "__eq", [actual]), smalltalk.send(smalltalk.send(smalltalk.send("Expected: ", "__comma", [smalltalk.send(expected, "_asString", [])]), "__comma", [" but was: "]), "__comma", [smalltalk.send(actual, "_asString", [])])]);
  159. return $1;
  160. }
  161. }),
  162. smalltalk.TestCase);
  163. smalltalk.addMethod(
  164. "_async_",
  165. smalltalk.method({
  166. selector: "async:",
  167. fn: function (aBlock){
  168. var self=this;
  169. var $1;
  170. var c;
  171. smalltalk.send(self,"_mustBeAsync_",["#async"]);
  172. c=self["@context"];
  173. $1=(function(){
  174. return smalltalk.send(c,"_execute_",[aBlock]);
  175. });
  176. return $1;
  177. }
  178. }),
  179. smalltalk.TestCase);
  180. smalltalk.addMethod(
  181. "_context_",
  182. smalltalk.method({
  183. selector: "context:",
  184. fn: function (aRunningTestContext){
  185. var self=this;
  186. self["@context"]=aRunningTestContext;
  187. return self}
  188. }),
  189. smalltalk.TestCase);
  190. smalltalk.addMethod(
  191. "_deny_",
  192. smalltalk.method({
  193. selector: "deny:",
  194. fn: function (aBoolean) {
  195. var self = this;
  196. smalltalk.send(self, "_assert_", [smalltalk.send(aBoolean, "_not", [])]);
  197. return self;
  198. }
  199. }),
  200. smalltalk.TestCase);
  201. smalltalk.addMethod(
  202. "_finished",
  203. smalltalk.method({
  204. selector: "finished",
  205. fn: function (){
  206. var self=this;
  207. smalltalk.send(self,"_mustBeAsync_",["#finished"]);
  208. self["@asyncTimeout"]=nil;
  209. return self}
  210. }),
  211. smalltalk.TestCase);
  212. smalltalk.addMethod(
  213. "_graceTime_",
  214. smalltalk.method({
  215. selector: "graceTime:",
  216. fn: function (millis){
  217. var self=this;
  218. self["@asyncTimeout"]=true;
  219. return self}
  220. }),
  221. smalltalk.TestCase);
  222. smalltalk.addMethod(
  223. "_isAsync",
  224. smalltalk.method({
  225. selector: "isAsync",
  226. fn: function (){
  227. var self=this;
  228. var $1;
  229. $1=smalltalk.send(self["@asyncTimeout"],"_notNil",[]);
  230. return $1;
  231. }
  232. }),
  233. smalltalk.TestCase);
  234. smalltalk.addMethod(
  235. "_mustBeAsync_",
  236. smalltalk.method({
  237. selector: "mustBeAsync:",
  238. fn: function (aString){
  239. var self=this;
  240. var $1;
  241. $1=smalltalk.send(self,"_isAsync",[]);
  242. if(! smalltalk.assert($1)){
  243. smalltalk.send(self,"_error_",[smalltalk.send(aString,"__comma",[" used without prior #graceTime:"])]);
  244. };
  245. return self}
  246. }),
  247. smalltalk.TestCase);
  248. smalltalk.addMethod(
  249. "_performTest",
  250. smalltalk.method({
  251. selector: "performTest",
  252. fn: function (){
  253. var self=this;
  254. self["@asyncTimeout"]=nil;
  255. smalltalk.send(self,"_perform_",[smalltalk.send(self,"_selector",[])]);
  256. return self}
  257. }),
  258. smalltalk.TestCase);
  259. smalltalk.addMethod(
  260. "_runCase",
  261. smalltalk.method({
  262. selector: "runCase",
  263. fn: function (){
  264. var self=this;
  265. smalltalk.send((function(){
  266. smalltalk.send(self,"_setUp",[]);
  267. return smalltalk.send(self,"_performTest",[]);
  268. }),"_ensure_",[(function(){
  269. return smalltalk.send(self,"_tearDown",[]);
  270. })]);
  271. return self}
  272. }),
  273. smalltalk.TestCase);
  274. smalltalk.addMethod(
  275. "_selector",
  276. smalltalk.method({
  277. selector: "selector",
  278. fn: function () {
  279. var self = this;
  280. return self['@testSelector'];
  281. }
  282. }),
  283. smalltalk.TestCase);
  284. smalltalk.addMethod(
  285. "_setTestSelector_",
  286. smalltalk.method({
  287. selector: "setTestSelector:",
  288. fn: function (aSelector) {
  289. var self = this;
  290. self['@testSelector'] = aSelector;
  291. return self;
  292. }
  293. }),
  294. smalltalk.TestCase);
  295. smalltalk.addMethod(
  296. "_setUp",
  297. smalltalk.method({
  298. selector: "setUp",
  299. fn: function () {
  300. var self = this;
  301. return self;
  302. }
  303. }),
  304. smalltalk.TestCase);
  305. smalltalk.addMethod(
  306. "_should_",
  307. smalltalk.method({
  308. selector: "should:",
  309. fn: function (aBlock) {
  310. var self = this;
  311. smalltalk.send(self, "_assert_", [smalltalk.send(aBlock, "_value", [])]);
  312. return self;
  313. }
  314. }),
  315. smalltalk.TestCase);
  316. smalltalk.addMethod(
  317. "_should_raise_",
  318. smalltalk.method({
  319. selector: "should:raise:",
  320. fn: function (aBlock, anExceptionClass) {
  321. var self = this;
  322. smalltalk.send(self, "_assert_", [smalltalk.send(function () {smalltalk.send(aBlock, "_value", []);return false;}, "_on_do_", [anExceptionClass, function (ex) {return true;}])]);
  323. return self;
  324. }
  325. }),
  326. smalltalk.TestCase);
  327. smalltalk.addMethod(
  328. "_shouldnt_raise_",
  329. smalltalk.method({
  330. selector: "shouldnt:raise:",
  331. fn: function (aBlock, anExceptionClass) {
  332. var self = this;
  333. smalltalk.send(self, "_assert_", [smalltalk.send(function () {smalltalk.send(aBlock, "_value", []);return true;}, "_on_do_", [anExceptionClass, function (ex) {return false;}])]);
  334. return self;
  335. }
  336. }),
  337. smalltalk.TestCase);
  338. smalltalk.addMethod(
  339. "_signalFailure_",
  340. smalltalk.method({
  341. selector: "signalFailure:",
  342. fn: function (aString) {
  343. var self = this;
  344. var $1, $2;
  345. $1 = smalltalk.send(smalltalk.TestFailure || TestFailure, "_new", []);
  346. smalltalk.send($1, "_messageText_", [aString]);
  347. $2 = smalltalk.send($1, "_signal", []);
  348. return self;
  349. }
  350. }),
  351. smalltalk.TestCase);
  352. smalltalk.addMethod(
  353. "_tearDown",
  354. smalltalk.method({
  355. selector: "tearDown",
  356. fn: function () {
  357. var self = this;
  358. return self;
  359. }
  360. }),
  361. smalltalk.TestCase);
  362. smalltalk.addMethod(
  363. "_allTestSelectors",
  364. smalltalk.method({
  365. selector: "allTestSelectors",
  366. fn: function () {
  367. var self = this;
  368. var $1;
  369. var selectors;
  370. selectors = smalltalk.send(self, "_testSelectors", []);
  371. $1 = smalltalk.send(self, "_shouldInheritSelectors", []);
  372. if (smalltalk.assert($1)) {
  373. smalltalk.send(selectors, "_addAll_", [smalltalk.send(smalltalk.send(self, "_superclass", []), "_allTestSelectors", [])]);
  374. }
  375. return selectors;
  376. }
  377. }),
  378. smalltalk.TestCase.klass);
  379. smalltalk.addMethod(
  380. "_buildSuite",
  381. smalltalk.method({
  382. selector: "buildSuite",
  383. fn: function () {
  384. var self = this;
  385. var $1;
  386. $1 = smalltalk.send(smalltalk.send(self, "_allTestSelectors", []), "_collect_", [function (each) {return smalltalk.send(self, "_selector_", [each]);}]);
  387. return $1;
  388. }
  389. }),
  390. smalltalk.TestCase.klass);
  391. smalltalk.addMethod(
  392. "_isAbstract",
  393. smalltalk.method({
  394. selector: "isAbstract",
  395. fn: function () {
  396. var self = this;
  397. var $1;
  398. $1 = smalltalk.send(smalltalk.send(self, "_name", []), "__eq", ["TestCase"]);
  399. return $1;
  400. }
  401. }),
  402. smalltalk.TestCase.klass);
  403. smalltalk.addMethod(
  404. "_lookupHierarchyRoot",
  405. smalltalk.method({
  406. selector: "lookupHierarchyRoot",
  407. fn: function () {
  408. var self = this;
  409. return smalltalk.TestCase || TestCase;
  410. }
  411. }),
  412. smalltalk.TestCase.klass);
  413. smalltalk.addMethod(
  414. "_selector_",
  415. smalltalk.method({
  416. selector: "selector:",
  417. fn: function (aSelector) {
  418. var self = this;
  419. var $2, $3, $1;
  420. $2 = smalltalk.send(self, "_new", []);
  421. smalltalk.send($2, "_setTestSelector_", [aSelector]);
  422. $3 = smalltalk.send($2, "_yourself", []);
  423. $1 = $3;
  424. return $1;
  425. }
  426. }),
  427. smalltalk.TestCase.klass);
  428. smalltalk.addMethod(
  429. "_shouldInheritSelectors",
  430. smalltalk.method({
  431. selector: "shouldInheritSelectors",
  432. fn: function () {
  433. var self = this;
  434. var $1;
  435. $1 = smalltalk.send(self, "_~_eq", [smalltalk.send(self, "_lookupHierarchyRoot", [])]);
  436. return $1;
  437. }
  438. }),
  439. smalltalk.TestCase.klass);
  440. smalltalk.addMethod(
  441. "_testSelectors",
  442. smalltalk.method({
  443. selector: "testSelectors",
  444. fn: function () {
  445. var self = this;
  446. var $1;
  447. $1 = smalltalk.send(smalltalk.send(smalltalk.send(self, "_methodDictionary", []), "_keys", []), "_select_", [function (each) {return smalltalk.send(each, "_match_", ["^test"]);}]);
  448. return $1;
  449. }
  450. }),
  451. smalltalk.TestCase.klass);
  452. smalltalk.addClass('TestFailure', smalltalk.Error, [], 'SUnit');
  453. smalltalk.addClass('TestResult', smalltalk.Object, ['timestamp', 'runs', 'errors', 'failures', 'total'], 'SUnit');
  454. smalltalk.addMethod(
  455. "_addError_",
  456. smalltalk.method({
  457. selector: "addError:",
  458. fn: function (anError) {
  459. var self = this;
  460. smalltalk.send(smalltalk.send(self, "_errors", []), "_add_", [anError]);
  461. return self;
  462. }
  463. }),
  464. smalltalk.TestResult);
  465. smalltalk.addMethod(
  466. "_addFailure_",
  467. smalltalk.method({
  468. selector: "addFailure:",
  469. fn: function (aFailure) {
  470. var self = this;
  471. smalltalk.send(smalltalk.send(self, "_failures", []), "_add_", [aFailure]);
  472. return self;
  473. }
  474. }),
  475. smalltalk.TestResult);
  476. smalltalk.addMethod(
  477. "_errors",
  478. smalltalk.method({
  479. selector: "errors",
  480. fn: function () {
  481. var self = this;
  482. return self['@errors'];
  483. }
  484. }),
  485. smalltalk.TestResult);
  486. smalltalk.addMethod(
  487. "_failures",
  488. smalltalk.method({
  489. selector: "failures",
  490. fn: function () {
  491. var self = this;
  492. return self['@failures'];
  493. }
  494. }),
  495. smalltalk.TestResult);
  496. smalltalk.addMethod(
  497. "_increaseRuns",
  498. smalltalk.method({
  499. selector: "increaseRuns",
  500. fn: function () {
  501. var self = this;
  502. self['@runs'] = smalltalk.send(self['@runs'], "__plus", [1]);
  503. return self;
  504. }
  505. }),
  506. smalltalk.TestResult);
  507. smalltalk.addMethod(
  508. "_initialize",
  509. smalltalk.method({
  510. selector: "initialize",
  511. fn: function () {
  512. var self = this;
  513. smalltalk.send(self, "_initialize", [], smalltalk.Object);
  514. self['@timestamp'] = smalltalk.send(smalltalk.Date || Date, "_now", []);
  515. self['@runs'] = 0;
  516. self['@errors'] = smalltalk.send(smalltalk.Array || Array, "_new", []);
  517. self['@failures'] = smalltalk.send(smalltalk.Array || Array, "_new", []);
  518. self['@total'] = 0;
  519. return self;
  520. }
  521. }),
  522. smalltalk.TestResult);
  523. smalltalk.addMethod(
  524. "_nextRunDo_",
  525. smalltalk.method({
  526. selector: "nextRunDo:",
  527. fn: function (aBlock){
  528. var self=this;
  529. var $2,$1;
  530. $2=smalltalk.send(smalltalk.send(self,"_runs",[]),"__eq_eq",[smalltalk.send(self,"_total",[])]);
  531. if(! smalltalk.assert($2)){
  532. $1=smalltalk.send(aBlock,"_value_",[smalltalk.send(smalltalk.send(self,"_runs",[]),"__plus",[(1)])]);
  533. };
  534. return $1;
  535. }
  536. }),
  537. smalltalk.TestResult);
  538. smalltalk.addMethod(
  539. "_runs",
  540. smalltalk.method({
  541. selector: "runs",
  542. fn: function () {
  543. var self = this;
  544. return self['@runs'];
  545. }
  546. }),
  547. smalltalk.TestResult);
  548. smalltalk.addMethod(
  549. "_status",
  550. smalltalk.method({
  551. selector: "status",
  552. fn: function () {
  553. var self = this;
  554. var $2, $3, $1;
  555. $2 = smalltalk.send(smalltalk.send(self, "_errors", []), "_isEmpty", []);
  556. if (smalltalk.assert($2)) {
  557. $3 = smalltalk.send(smalltalk.send(self, "_failures", []), "_isEmpty", []);
  558. if (smalltalk.assert($3)) {
  559. $1 = "success";
  560. } else {
  561. $1 = "failure";
  562. }
  563. } else {
  564. $1 = "error";
  565. }
  566. return $1;
  567. }
  568. }),
  569. smalltalk.TestResult);
  570. smalltalk.addMethod(
  571. "_timestamp",
  572. smalltalk.method({
  573. selector: "timestamp",
  574. fn: function () {
  575. var self = this;
  576. return self['@timestamp'];
  577. }
  578. }),
  579. smalltalk.TestResult);
  580. smalltalk.addMethod(
  581. "_total",
  582. smalltalk.method({
  583. selector: "total",
  584. fn: function () {
  585. var self = this;
  586. return self['@total'];
  587. }
  588. }),
  589. smalltalk.TestResult);
  590. smalltalk.addMethod(
  591. "_total_",
  592. smalltalk.method({
  593. selector: "total:",
  594. fn: function (aNumber) {
  595. var self = this;
  596. self['@total'] = aNumber;
  597. return self;
  598. }
  599. }),
  600. smalltalk.TestResult);
  601. smalltalk.addClass('TestSuiteRunner', smalltalk.Object, ['suite', 'result', 'announcer', 'runNextTest'], 'SUnit');
  602. smalltalk.addMethod(
  603. "_announcer",
  604. smalltalk.method({
  605. selector: "announcer",
  606. fn: function (){
  607. var self=this;
  608. return self["@announcer"];
  609. }
  610. }),
  611. smalltalk.TestSuiteRunner);
  612. smalltalk.addMethod(
  613. "_initialize",
  614. smalltalk.method({
  615. selector: "initialize",
  616. fn: function (){
  617. var self=this;
  618. smalltalk.send(self,"_initialize",[],smalltalk.Object);
  619. self["@announcer"]=smalltalk.send((smalltalk.Announcer || Announcer),"_new",[]);
  620. self["@result"]=smalltalk.send((smalltalk.TestResult || TestResult),"_new",[]);
  621. self["@runNextTest"]=(function(){
  622. return smalltalk.send(self["@result"],"_nextRunDo_",[(function(index){
  623. return smalltalk.send(smalltalk.send((smalltalk.RunningTestContext || RunningTestContext),"_testCase_result_finished_",[smalltalk.send(self["@suite"],"_at_",[index]),self["@result"],(function(){
  624. return smalltalk.send(self,"_resume",[]);
  625. })]),"_start",[]);
  626. })]);
  627. });
  628. return self}
  629. }),
  630. smalltalk.TestSuiteRunner);
  631. smalltalk.addMethod(
  632. "_result",
  633. smalltalk.method({
  634. selector: "result",
  635. fn: function (){
  636. var self=this;
  637. return self["@result"];
  638. }
  639. }),
  640. smalltalk.TestSuiteRunner);
  641. smalltalk.addMethod(
  642. "_resume",
  643. smalltalk.method({
  644. selector: "resume",
  645. fn: function (){
  646. var self=this;
  647. smalltalk.send(self["@runNextTest"],"_fork",[]);
  648. smalltalk.send(self["@announcer"],"_announce_",[smalltalk.send(smalltalk.send((smalltalk.ResultAnnouncement || ResultAnnouncement),"_new",[]),"_result_",[self["@result"]])]);
  649. return self}
  650. }),
  651. smalltalk.TestSuiteRunner);
  652. smalltalk.addMethod(
  653. "_run",
  654. smalltalk.method({
  655. selector: "run",
  656. fn: function (){
  657. var self=this;
  658. smalltalk.send(self["@result"],"_total_",[smalltalk.send(self["@suite"],"_size",[])]);
  659. smalltalk.send(self,"_resume",[]);
  660. return self}
  661. }),
  662. smalltalk.TestSuiteRunner);
  663. smalltalk.addMethod(
  664. "_suite_",
  665. smalltalk.method({
  666. selector: "suite:",
  667. fn: function (aCollection){
  668. var self=this;
  669. self["@suite"]=aCollection;
  670. return self}
  671. }),
  672. smalltalk.TestSuiteRunner);
  673. smalltalk.addMethod(
  674. "_new",
  675. smalltalk.method({
  676. selector: "new",
  677. fn: function (){
  678. var self=this;
  679. smalltalk.send(self,"_shouldNotImplement",[]);
  680. return self}
  681. }),
  682. smalltalk.TestSuiteRunner.klass);
  683. smalltalk.addMethod(
  684. "_on_",
  685. smalltalk.method({
  686. selector: "on:",
  687. fn: function (aCollection){
  688. var self=this;
  689. var $1;
  690. $1=smalltalk.send(smalltalk.send(self,"_new",[],smalltalk.Object.klass),"_suite_",[aCollection]);
  691. return $1;
  692. }
  693. }),
  694. smalltalk.TestSuiteRunner.klass);