|
@@ -15728,6 +15728,62 @@ return $self._assert_equals_($recv(error)._messageText(),"Intentional");
|
|
|
}; }),
|
|
|
$globals.PromiseTest);
|
|
|
|
|
|
+$core.addMethod(
|
|
|
+$core.method({
|
|
|
+selector: "testPromiseExecutorAsyncNegativeTry",
|
|
|
+protocol: " tests",
|
|
|
+//>>excludeStart("ide", pragmas.excludeIdeData);
|
|
|
+args: [],
|
|
|
+source: "testPromiseExecutorAsyncNegativeTry\x0a\x09self timeout: 40.\x0a\x09^ (Promise new: [ :m | [ m try: [ self error: 'Intentional' ] ] fork ])\x0a\x09\x09catch: [ :error | self assert: error messageText equals: 'Intentional' ]",
|
|
|
+referencedClasses: ["Promise"],
|
|
|
+//>>excludeEnd("ide");
|
|
|
+pragmas: [],
|
|
|
+messageSends: ["timeout:", "catch:", "new:", "fork", "try:", "error:", "assert:equals:", "messageText"]
|
|
|
+}, function ($methodClass){ return function (){
|
|
|
+var self=this,$self=this;
|
|
|
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
+return $core.withContext(function($ctx1) {
|
|
|
+//>>excludeEnd("ctx");
|
|
|
+$self._timeout_((40));
|
|
|
+return $recv($recv($globals.Promise)._new_((function(m){
|
|
|
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
+return $core.withContext(function($ctx2) {
|
|
|
+//>>excludeEnd("ctx");
|
|
|
+return $recv((function(){
|
|
|
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
+return $core.withContext(function($ctx3) {
|
|
|
+//>>excludeEnd("ctx");
|
|
|
+return $recv(m)._try_((function(){
|
|
|
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
+return $core.withContext(function($ctx4) {
|
|
|
+//>>excludeEnd("ctx");
|
|
|
+return $self._error_("Intentional");
|
|
|
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
+}, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)});
|
|
|
+//>>excludeEnd("ctx");
|
|
|
+}));
|
|
|
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
+}, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
|
|
|
+//>>excludeEnd("ctx");
|
|
|
+}))._fork();
|
|
|
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({m:m},$ctx1,1)});
|
|
|
+//>>excludeEnd("ctx");
|
|
|
+})))._catch_((function(error){
|
|
|
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
+return $core.withContext(function($ctx2) {
|
|
|
+//>>excludeEnd("ctx");
|
|
|
+return $self._assert_equals_($recv(error)._messageText(),"Intentional");
|
|
|
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
+}, function($ctx2) {$ctx2.fillBlock({error:error},$ctx1,4)});
|
|
|
+//>>excludeEnd("ctx");
|
|
|
+}));
|
|
|
+//>>excludeStart("ctx", pragmas.excludeDebugContexts);
|
|
|
+}, function($ctx1) {$ctx1.fill(self,"testPromiseExecutorAsyncNegativeTry",{})});
|
|
|
+//>>excludeEnd("ctx");
|
|
|
+}; }),
|
|
|
+$globals.PromiseTest);
|
|
|
+
|
|
|
$core.addMethod(
|
|
|
$core.method({
|
|
|
selector: "testPromiseExecutorAsyncPositiveDo",
|