SUnit-Tests.deploy.js 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403
  1. smalltalk.addPackage('SUnit-Tests');
  2. smalltalk.addClass('ExampleSetTest', smalltalk.TestCase, ['empty', 'full'], 'SUnit-Tests');
  3. smalltalk.addMethod(
  4. "_setUp",
  5. smalltalk.method({
  6. selector: "setUp",
  7. fn: function (){
  8. var self=this;
  9. function $Set(){return smalltalk.Set||(typeof Set=="undefined"?nil:Set)}
  10. return smalltalk.withContext(function($ctx1) { self["@empty"]=_st($Set())._new();
  11. self["@full"]=_st($Set())._with_with_((5),"abc");
  12. return self}, function($ctx1) {$ctx1.fill(self,"setUp",{},smalltalk.ExampleSetTest)})},
  13. messageSends: ["new", "with:with:"]}),
  14. smalltalk.ExampleSetTest);
  15. smalltalk.addMethod(
  16. "_testAdd",
  17. smalltalk.method({
  18. selector: "testAdd",
  19. fn: function (){
  20. var self=this;
  21. return smalltalk.withContext(function($ctx1) { _st(self["@empty"])._add_((5));
  22. _st(self)._assert_(_st(self["@empty"])._includes_((5)));
  23. return self}, function($ctx1) {$ctx1.fill(self,"testAdd",{},smalltalk.ExampleSetTest)})},
  24. messageSends: ["add:", "assert:", "includes:"]}),
  25. smalltalk.ExampleSetTest);
  26. smalltalk.addMethod(
  27. "_testGrow",
  28. smalltalk.method({
  29. selector: "testGrow",
  30. fn: function (){
  31. var self=this;
  32. return smalltalk.withContext(function($ctx1) { _st(self["@empty"])._addAll_(_st((1))._to_((100)));
  33. _st(self)._assert_equals_(_st(self["@empty"])._size(),(100));
  34. return self}, function($ctx1) {$ctx1.fill(self,"testGrow",{},smalltalk.ExampleSetTest)})},
  35. messageSends: ["addAll:", "to:", "assert:equals:", "size"]}),
  36. smalltalk.ExampleSetTest);
  37. smalltalk.addMethod(
  38. "_testIllegal",
  39. smalltalk.method({
  40. selector: "testIllegal",
  41. fn: function (){
  42. var self=this;
  43. function $Error(){return smalltalk.Error||(typeof Error=="undefined"?nil:Error)}
  44. return smalltalk.withContext(function($ctx1) { _st(self)._should_raise_((function(){
  45. return smalltalk.withContext(function($ctx2) { return _st(self["@empty"])._at_((5));
  46. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),$Error());
  47. _st(self)._should_raise_((function(){
  48. return smalltalk.withContext(function($ctx2) { return _st(self["@empty"])._at_put_((5),"abc");
  49. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),$Error());
  50. return self}, function($ctx1) {$ctx1.fill(self,"testIllegal",{},smalltalk.ExampleSetTest)})},
  51. messageSends: ["should:raise:", "at:", "at:put:"]}),
  52. smalltalk.ExampleSetTest);
  53. smalltalk.addMethod(
  54. "_testIncludes",
  55. smalltalk.method({
  56. selector: "testIncludes",
  57. fn: function (){
  58. var self=this;
  59. return smalltalk.withContext(function($ctx1) { _st(self)._assert_(_st(self["@full"])._includes_((5)));
  60. _st(self)._assert_(_st(self["@full"])._includes_("abc"));
  61. return self}, function($ctx1) {$ctx1.fill(self,"testIncludes",{},smalltalk.ExampleSetTest)})},
  62. messageSends: ["assert:", "includes:"]}),
  63. smalltalk.ExampleSetTest);
  64. smalltalk.addMethod(
  65. "_testOccurrences",
  66. smalltalk.method({
  67. selector: "testOccurrences",
  68. fn: function (){
  69. var self=this;
  70. return smalltalk.withContext(function($ctx1) { _st(self)._assert_equals_(_st(self["@empty"])._occurrencesOf_((0)),(0));
  71. _st(self)._assert_equals_(_st(self["@full"])._occurrencesOf_((5)),(1));
  72. _st(self["@full"])._add_((5));
  73. _st(self)._assert_equals_(_st(self["@full"])._occurrencesOf_((5)),(1));
  74. return self}, function($ctx1) {$ctx1.fill(self,"testOccurrences",{},smalltalk.ExampleSetTest)})},
  75. messageSends: ["assert:equals:", "occurrencesOf:", "add:"]}),
  76. smalltalk.ExampleSetTest);
  77. smalltalk.addMethod(
  78. "_testRemove",
  79. smalltalk.method({
  80. selector: "testRemove",
  81. fn: function (){
  82. var self=this;
  83. return smalltalk.withContext(function($ctx1) { _st(self["@full"])._remove_((5));
  84. _st(self)._assert_(_st(self["@full"])._includes_("abc"));
  85. _st(self)._deny_(_st(self["@full"])._includes_((5)));
  86. return self}, function($ctx1) {$ctx1.fill(self,"testRemove",{},smalltalk.ExampleSetTest)})},
  87. messageSends: ["remove:", "assert:", "includes:", "deny:"]}),
  88. smalltalk.ExampleSetTest);
  89. smalltalk.addClass('SUnitAsyncTest', smalltalk.TestCase, ['flag'], 'SUnit-Tests');
  90. smalltalk.addMethod(
  91. "_fakeError",
  92. smalltalk.method({
  93. selector: "fakeError",
  94. fn: function (){
  95. var self=this;
  96. return smalltalk.withContext(function($ctx1) { self["@flag"]="bad";
  97. _st(self)._timeout_((10));
  98. self["@flag"]=_st(_st(self)._async_((function(){
  99. return smalltalk.withContext(function($ctx2) { self["@flag"]="ok";
  100. self["@flag"];
  101. return _st(self)._error_("Intentional");
  102. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})))._valueWithTimeout_((5));
  103. return self}, function($ctx1) {$ctx1.fill(self,"fakeError",{},smalltalk.SUnitAsyncTest)})},
  104. messageSends: ["timeout:", "valueWithTimeout:", "async:", "error:"]}),
  105. smalltalk.SUnitAsyncTest);
  106. smalltalk.addMethod(
  107. "_fakeErrorFailingInTearDown",
  108. smalltalk.method({
  109. selector: "fakeErrorFailingInTearDown",
  110. fn: function (){
  111. var self=this;
  112. return smalltalk.withContext(function($ctx1) { self["@flag"]="bad";
  113. _st(self)._timeout_((10));
  114. self["@flag"]=_st(_st(self)._async_((function(){
  115. return smalltalk.withContext(function($ctx2) { return _st(self)._error_("Intentional");
  116. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})))._valueWithTimeout_((5));
  117. return self}, function($ctx1) {$ctx1.fill(self,"fakeErrorFailingInTearDown",{},smalltalk.SUnitAsyncTest)})},
  118. messageSends: ["timeout:", "valueWithTimeout:", "async:", "error:"]}),
  119. smalltalk.SUnitAsyncTest);
  120. smalltalk.addMethod(
  121. "_fakeFailure",
  122. smalltalk.method({
  123. selector: "fakeFailure",
  124. fn: function (){
  125. var self=this;
  126. return smalltalk.withContext(function($ctx1) { self["@flag"]="bad";
  127. _st(self)._timeout_((10));
  128. self["@flag"]=_st(_st(self)._async_((function(){
  129. return smalltalk.withContext(function($ctx2) { self["@flag"]="ok";
  130. self["@flag"];
  131. return _st(self)._assert_(false);
  132. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})))._valueWithTimeout_((5));
  133. return self}, function($ctx1) {$ctx1.fill(self,"fakeFailure",{},smalltalk.SUnitAsyncTest)})},
  134. messageSends: ["timeout:", "valueWithTimeout:", "async:", "assert:"]}),
  135. smalltalk.SUnitAsyncTest);
  136. smalltalk.addMethod(
  137. "_fakeMultipleTimeoutFailing",
  138. smalltalk.method({
  139. selector: "fakeMultipleTimeoutFailing",
  140. fn: function (){
  141. var self=this;
  142. return smalltalk.withContext(function($ctx1) { _st(self)._timeout_((100));
  143. _st(_st(self)._async_((function(){
  144. return smalltalk.withContext(function($ctx2) { _st(self)._timeout_((5));
  145. return _st(_st(self)._async_((function(){
  146. return smalltalk.withContext(function($ctx3) { return _st(self)._finished();
  147. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})})))._valueWithTimeout_((10));
  148. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})))._valueWithTimeout_((5));
  149. return self}, function($ctx1) {$ctx1.fill(self,"fakeMultipleTimeoutFailing",{},smalltalk.SUnitAsyncTest)})},
  150. messageSends: ["timeout:", "valueWithTimeout:", "async:", "finished"]}),
  151. smalltalk.SUnitAsyncTest);
  152. smalltalk.addMethod(
  153. "_fakeMultipleTimeoutPassing",
  154. smalltalk.method({
  155. selector: "fakeMultipleTimeoutPassing",
  156. fn: function (){
  157. var self=this;
  158. return smalltalk.withContext(function($ctx1) { _st(self)._timeout_((10));
  159. _st(_st(self)._async_((function(){
  160. return smalltalk.withContext(function($ctx2) { _st(self)._timeout_((20));
  161. return _st(_st(self)._async_((function(){
  162. return smalltalk.withContext(function($ctx3) { return _st(self)._finished();
  163. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})})))._valueWithTimeout_((10));
  164. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})))._valueWithTimeout_((5));
  165. return self}, function($ctx1) {$ctx1.fill(self,"fakeMultipleTimeoutPassing",{},smalltalk.SUnitAsyncTest)})},
  166. messageSends: ["timeout:", "valueWithTimeout:", "async:", "finished"]}),
  167. smalltalk.SUnitAsyncTest);
  168. smalltalk.addMethod(
  169. "_fakeTimeout",
  170. smalltalk.method({
  171. selector: "fakeTimeout",
  172. fn: function (){
  173. var self=this;
  174. return smalltalk.withContext(function($ctx1) { _st(self)._timeout_((4));
  175. _st(_st(self)._async_((function(){
  176. return smalltalk.withContext(function($ctx2) { return _st(self)._finished();
  177. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})))._valueWithTimeout_((5));
  178. return self}, function($ctx1) {$ctx1.fill(self,"fakeTimeout",{},smalltalk.SUnitAsyncTest)})},
  179. messageSends: ["timeout:", "valueWithTimeout:", "async:", "finished"]}),
  180. smalltalk.SUnitAsyncTest);
  181. smalltalk.addMethod(
  182. "_selectorSetOf_",
  183. smalltalk.method({
  184. selector: "selectorSetOf:",
  185. fn: function (aCollection){
  186. var self=this;
  187. return smalltalk.withContext(function($ctx1) { var $1;
  188. $1=_st(_st(aCollection)._collect_((function(each){
  189. return smalltalk.withContext(function($ctx2) { return _st(each)._selector();
  190. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._asSet();
  191. return $1;
  192. }, function($ctx1) {$ctx1.fill(self,"selectorSetOf:",{aCollection:aCollection},smalltalk.SUnitAsyncTest)})},
  193. messageSends: ["asSet", "collect:", "selector"]}),
  194. smalltalk.SUnitAsyncTest);
  195. smalltalk.addMethod(
  196. "_setUp",
  197. smalltalk.method({
  198. selector: "setUp",
  199. fn: function (){
  200. var self=this;
  201. return smalltalk.withContext(function($ctx1) { self["@flag"]="ok";
  202. return self}, function($ctx1) {$ctx1.fill(self,"setUp",{},smalltalk.SUnitAsyncTest)})},
  203. messageSends: []}),
  204. smalltalk.SUnitAsyncTest);
  205. smalltalk.addMethod(
  206. "_tearDown",
  207. smalltalk.method({
  208. selector: "tearDown",
  209. fn: function (){
  210. var self=this;
  211. return smalltalk.withContext(function($ctx1) { _st(self)._assert_equals_("ok",self["@flag"]);
  212. return self}, function($ctx1) {$ctx1.fill(self,"tearDown",{},smalltalk.SUnitAsyncTest)})},
  213. messageSends: ["assert:equals:"]}),
  214. smalltalk.SUnitAsyncTest);
  215. smalltalk.addMethod(
  216. "_testAsyncErrorsAndFailures",
  217. smalltalk.method({
  218. selector: "testAsyncErrorsAndFailures",
  219. fn: function (){
  220. var self=this;
  221. var suite,runner,result,assertBlock;
  222. function $TestSuiteRunner(){return smalltalk.TestSuiteRunner||(typeof TestSuiteRunner=="undefined"?nil:TestSuiteRunner)}
  223. function $ResultAnnouncement(){return smalltalk.ResultAnnouncement||(typeof ResultAnnouncement=="undefined"?nil:ResultAnnouncement)}
  224. return smalltalk.withContext(function($ctx1) { var $1,$2;
  225. suite=_st(["fakeError", "fakeErrorFailingInTearDown", "fakeFailure", "testPass"])._collect_((function(each){
  226. return smalltalk.withContext(function($ctx2) { return _st(_st(self)._class())._selector_(each);
  227. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  228. runner=_st($TestSuiteRunner())._on_(suite);
  229. _st(self)._timeout_((200));
  230. result=_st(runner)._result();
  231. assertBlock=_st(self)._async_((function(){
  232. return smalltalk.withContext(function($ctx2) { _st(self)._assert_equals_(_st(self)._selectorSetOf_(_st(result)._errors()),_st(["fakeError"])._asSet());
  233. _st(self)._assert_equals_(_st(self)._selectorSetOf_(_st(result)._failures()),_st(["fakeErrorFailingInTearDown", "fakeFailure"])._asSet());
  234. return _st(self)._finished();
  235. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  236. _st(_st(runner)._announcer())._on_do_($ResultAnnouncement(),(function(ann){
  237. return smalltalk.withContext(function($ctx2) { $1=_st(_st(ann)._result()).__eq_eq(result);
  238. if(smalltalk.assert($1)){
  239. $2=_st(_st(result)._runs()).__eq(_st(result)._total());
  240. return _st($2)._ifTrue_(assertBlock);
  241. };
  242. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  243. _st(runner)._run();
  244. return self}, function($ctx1) {$ctx1.fill(self,"testAsyncErrorsAndFailures",{suite:suite,runner:runner,result:result,assertBlock:assertBlock},smalltalk.SUnitAsyncTest)})},
  245. messageSends: ["collect:", "selector:", "class", "on:", "timeout:", "result", "async:", "assert:equals:", "selectorSetOf:", "errors", "asSet", "failures", "finished", "on:do:", "ifTrue:", "=", "total", "runs", "==", "announcer", "run"]}),
  246. smalltalk.SUnitAsyncTest);
  247. smalltalk.addMethod(
  248. "_testAsyncNeedsTimeout",
  249. smalltalk.method({
  250. selector: "testAsyncNeedsTimeout",
  251. fn: function (){
  252. var self=this;
  253. function $Error(){return smalltalk.Error||(typeof Error=="undefined"?nil:Error)}
  254. return smalltalk.withContext(function($ctx1) { _st(self)._should_raise_((function(){
  255. return smalltalk.withContext(function($ctx2) { return _st(self)._async_((function(){
  256. return smalltalk.withContext(function($ctx3) { }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  257. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),$Error());
  258. _st(self)._timeout_((0));
  259. _st(self)._shouldnt_raise_((function(){
  260. return smalltalk.withContext(function($ctx2) { return _st(self)._async_((function(){
  261. return smalltalk.withContext(function($ctx3) { }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  262. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),$Error());
  263. _st(self)._finished();
  264. return self}, function($ctx1) {$ctx1.fill(self,"testAsyncNeedsTimeout",{},smalltalk.SUnitAsyncTest)})},
  265. messageSends: ["should:raise:", "async:", "timeout:", "shouldnt:raise:", "finished"]}),
  266. smalltalk.SUnitAsyncTest);
  267. smalltalk.addMethod(
  268. "_testFinishedNeedsTimeout",
  269. smalltalk.method({
  270. selector: "testFinishedNeedsTimeout",
  271. fn: function (){
  272. var self=this;
  273. function $Error(){return smalltalk.Error||(typeof Error=="undefined"?nil:Error)}
  274. return smalltalk.withContext(function($ctx1) { _st(self)._should_raise_((function(){
  275. return smalltalk.withContext(function($ctx2) { return _st(self)._finished();
  276. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),$Error());
  277. _st(self)._timeout_((0));
  278. _st(self)._shouldnt_raise_((function(){
  279. return smalltalk.withContext(function($ctx2) { return _st(self)._finished();
  280. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}),$Error());
  281. return self}, function($ctx1) {$ctx1.fill(self,"testFinishedNeedsTimeout",{},smalltalk.SUnitAsyncTest)})},
  282. messageSends: ["should:raise:", "finished", "timeout:", "shouldnt:raise:"]}),
  283. smalltalk.SUnitAsyncTest);
  284. smalltalk.addMethod(
  285. "_testIsAsyncReturnsCorrectValues",
  286. smalltalk.method({
  287. selector: "testIsAsyncReturnsCorrectValues",
  288. fn: function (){
  289. var self=this;
  290. return smalltalk.withContext(function($ctx1) { _st(self)._deny_(_st(self)._isAsync());
  291. _st(self)._timeout_((0));
  292. _st(self)._assert_(_st(self)._isAsync());
  293. _st(self)._finished();
  294. _st(self)._deny_(_st(self)._isAsync());
  295. return self}, function($ctx1) {$ctx1.fill(self,"testIsAsyncReturnsCorrectValues",{},smalltalk.SUnitAsyncTest)})},
  296. messageSends: ["deny:", "isAsync", "timeout:", "assert:", "finished"]}),
  297. smalltalk.SUnitAsyncTest);
  298. smalltalk.addMethod(
  299. "_testPass",
  300. smalltalk.method({
  301. selector: "testPass",
  302. fn: function (){
  303. var self=this;
  304. return smalltalk.withContext(function($ctx1) { self["@flag"]="bad";
  305. _st(self)._timeout_((10));
  306. self["@flag"]=_st(_st(self)._async_((function(){
  307. return smalltalk.withContext(function($ctx2) { _st(self)._assert_(true);
  308. _st(self)._finished();
  309. self["@flag"]="ok";
  310. return self["@flag"];
  311. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})))._valueWithTimeout_((5));
  312. return self}, function($ctx1) {$ctx1.fill(self,"testPass",{},smalltalk.SUnitAsyncTest)})},
  313. messageSends: ["timeout:", "valueWithTimeout:", "async:", "assert:", "finished"]}),
  314. smalltalk.SUnitAsyncTest);
  315. smalltalk.addMethod(
  316. "_testTimeouts",
  317. smalltalk.method({
  318. selector: "testTimeouts",
  319. fn: function (){
  320. var self=this;
  321. var suite,runner,result,assertBlock;
  322. function $TestSuiteRunner(){return smalltalk.TestSuiteRunner||(typeof TestSuiteRunner=="undefined"?nil:TestSuiteRunner)}
  323. function $Set(){return smalltalk.Set||(typeof Set=="undefined"?nil:Set)}
  324. function $ResultAnnouncement(){return smalltalk.ResultAnnouncement||(typeof ResultAnnouncement=="undefined"?nil:ResultAnnouncement)}
  325. return smalltalk.withContext(function($ctx1) { var $1,$2;
  326. suite=_st(["fakeTimeout", "fakeMultipleTimeoutFailing", "fakeMultipleTimeoutPassing", "testPass"])._collect_((function(each){
  327. return smalltalk.withContext(function($ctx2) { return _st(_st(self)._class())._selector_(each);
  328. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  329. runner=_st($TestSuiteRunner())._on_(suite);
  330. _st(self)._timeout_((200));
  331. result=_st(runner)._result();
  332. assertBlock=_st(self)._async_((function(){
  333. return smalltalk.withContext(function($ctx2) { _st(self)._assert_equals_(_st(self)._selectorSetOf_(_st(result)._errors()),_st($Set())._new());
  334. _st(self)._assert_equals_(_st(self)._selectorSetOf_(_st(result)._failures()),_st(["fakeMultipleTimeoutFailing", "fakeTimeout"])._asSet());
  335. return _st(self)._finished();
  336. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  337. _st(_st(runner)._announcer())._on_do_($ResultAnnouncement(),(function(ann){
  338. return smalltalk.withContext(function($ctx2) { $1=_st(_st(ann)._result()).__eq_eq(result);
  339. if(smalltalk.assert($1)){
  340. $2=_st(_st(result)._runs()).__eq(_st(result)._total());
  341. return _st($2)._ifTrue_(assertBlock);
  342. };
  343. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  344. _st(runner)._run();
  345. return self}, function($ctx1) {$ctx1.fill(self,"testTimeouts",{suite:suite,runner:runner,result:result,assertBlock:assertBlock},smalltalk.SUnitAsyncTest)})},
  346. messageSends: ["collect:", "selector:", "class", "on:", "timeout:", "result", "async:", "assert:equals:", "selectorSetOf:", "errors", "new", "failures", "asSet", "finished", "on:do:", "ifTrue:", "=", "total", "runs", "==", "announcer", "run"]}),
  347. smalltalk.SUnitAsyncTest);
  348. smalltalk.addMethod(
  349. "_testTwoAsyncPassesWithFinishedOnlyOneIsRun",
  350. smalltalk.method({
  351. selector: "testTwoAsyncPassesWithFinishedOnlyOneIsRun",
  352. fn: function (){
  353. var self=this;
  354. var x;
  355. return smalltalk.withContext(function($ctx1) { self["@flag"]="bad";
  356. _st(self)._timeout_((10));
  357. x=(0);
  358. self["@flag"]=_st(_st(self)._async_((function(){
  359. return smalltalk.withContext(function($ctx2) { _st(self)._finished();
  360. self["@flag"]="ok";
  361. self["@flag"];
  362. x=_st(x).__plus((1));
  363. x;
  364. return _st(self)._assert_equals_(x,(1));
  365. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})))._valueWithTimeout_((0));
  366. self["@flag"]=_st(_st(self)._async_((function(){
  367. return smalltalk.withContext(function($ctx2) { _st(self)._finished();
  368. self["@flag"]="ok";
  369. self["@flag"];
  370. x=_st(x).__plus((1));
  371. x;
  372. return _st(self)._assert_equals_(x,(1));
  373. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})})))._valueWithTimeout_((0));
  374. return self}, function($ctx1) {$ctx1.fill(self,"testTwoAsyncPassesWithFinishedOnlyOneIsRun",{x:x},smalltalk.SUnitAsyncTest)})},
  375. messageSends: ["timeout:", "valueWithTimeout:", "async:", "finished", "+", "assert:equals:"]}),
  376. smalltalk.SUnitAsyncTest);