[squeak-dev] The Trunk: Tests-jar.464.mcz

commits at source.squeak.org commits at source.squeak.org
Fri May 6 14:25:32 UTC 2022


Marcel Taeumel uploaded a new version of Tests to project The Trunk:
http://source.squeak.org/trunk/Tests-jar.464.mcz

==================== Summary ====================

Name: Tests-jar.464
Author: jar
Time: 15 May 2021, 5:01:13.98097 pm
UUID: aa197ba6-106c-1a42-84d4-31d65052037f
Ancestors: Tests-jar.463

complement Kernel-jar.1407 - implement re-signallig an already existing exception

=============== Diff against Tests-jar.463 ===============

Item was added:
+ ----- Method: ExceptionTester>>simpleOuterResumeReturnTest (in category 'signaledException tests') -----
+ simpleOuterResumeReturnTest
+ 
+ 	[[self doSomething.
+ 	MyTestNotification signal.
+ 	self doSomethingExceptional]
+ 		on: MyTestNotification
+ 		do: [:ex | ex outer. self doYetAnotherThing. ex return]. 
+ 	self doSomethingElse]
+ 		on: MyTestNotification
+ 		do: [:ex | ex resume]!

Item was added:
+ ----- Method: ExceptionTester>>simpleOuterResumeReturnTestResults (in category 'signaledException results') -----
+ simpleOuterResumeReturnTestResults
+ 
+ 	^OrderedCollection new
+ 		add: self doSomethingString;
+ 		add: self doYetAnotherThingString;
+ 		add: self doSomethingElseString;
+ 		yourself!

Item was changed:
  ----- Method: ExceptionTester>>simpleResignalDoubleResumeTest (in category 'signaledException tests') -----
  simpleResignalDoubleResumeTest
- 	"uses #resume"
  
  	[[self doSomething.
  	MyTestNotification signal.
+ 	self doSomethingElse]
- 	"self doSomethingElse"]
  		on: MyTestNotification
  		do: [:ex | ex signal. self doYetAnotherThing. ex resume]. 
  	self doSomethingElse]
  		on: MyTestNotification
  		do: [:ex | ex resume]!

Item was changed:
  ----- Method: ExceptionTester>>simpleResignalDoubleResumeTestResults (in category 'signaledException results') -----
  simpleResignalDoubleResumeTestResults
  
  	^OrderedCollection new
  		add: self doSomethingString;
  		add: self doYetAnotherThingString;
  		add: self doSomethingElseString;
+ 		add: self doSomethingElseString;
  		yourself!

Item was added:
+ ----- Method: ExceptionTester>>simpleResignalResumeReturnTest (in category 'signaledException tests') -----
+ simpleResignalResumeReturnTest
+ 
+ 	[[self doSomething.
+ 	MyTestNotification signal.
+ 	self doSomethingExceptional]
+ 		on: MyTestNotification
+ 		do: [:ex | ex outer. self doYetAnotherThing. ex return]. 
+ 	self doSomethingElse]
+ 		on: MyTestNotification
+ 		do: [:ex | ex resume]!

Item was added:
+ ----- Method: ExceptionTester>>simpleResignalResumeReturnTestResults (in category 'signaledException results') -----
+ simpleResignalResumeReturnTestResults
+ 
+ 	^OrderedCollection new
+ 		add: self doSomethingString;
+ 		add: self doYetAnotherThingString;
+ 		add: self doSomethingElseString;
+ 		yourself!

Item was added:
+ ----- Method: ExceptionTester>>simpleResignalVsOuter1Test (in category 'signaledException tests') -----
+ simpleResignalVsOuter1Test
+ 
+ 	[self doSomething.
+ 	MyTestNotification signal.
+ 	self doSomethingExceptional]
+ 		on: MyTestNotification
+ 		do: [:ex1 | 
+ 			[ex1 signal. self doSomethingExceptional] "re-signal started searching for its handler here"
+ 				on: MyTestNotification "re-signal found and used this handler"
+ 				do: [:ex2 | self doYetAnotherThing].
+ 			self doSomethingElse]!

Item was added:
+ ----- Method: ExceptionTester>>simpleResignalVsOuter1TestResults (in category 'signaledException results') -----
+ simpleResignalVsOuter1TestResults
+ 
+ 	^OrderedCollection new
+ 		add: self doSomethingString;
+ 		add: self doYetAnotherThingString;
+ 		add: self doSomethingElseString;
+ 		yourself!

Item was added:
+ ----- Method: ExceptionTester>>simpleResignalVsOuter2Test (in category 'signaledException tests') -----
+ simpleResignalVsOuter2Test
+ 
+ 	[self doSomething.
+ 	MyTestNotification signal.
+ 	self doSomethingExceptional]
+ 		on: MyTestNotification
+ 		do: [:ex1 | 
+ 			[ex1 outer. self doYetAnotherThing] "#outer reached its default handler and resumed"
+ 				on: MyTestNotification "this handler is out of #outer's search scope"
+ 				do: [:ex2 | self doSomethingExceptional].
+ 			self doSomethingElse]!

Item was added:
+ ----- Method: ExceptionTester>>simpleResignalVsOuter2TestResults (in category 'signaledException results') -----
+ simpleResignalVsOuter2TestResults
+ 
+ 	^OrderedCollection new
+ 		add: self doSomethingString;
+ 		add: self doYetAnotherThingString;
+ 		add: self doSomethingElseString;
+ 		yourself!

Item was added:
+ ----- Method: ExceptionTests>>testSimpleOuterResumeReturn (in category 'tests - ExceptionTester') -----
+ testSimpleOuterResumeReturn
+ 	self assertSuccess: (ExceptionTester new runTest: #simpleOuterResumeReturnTest ) !

Item was changed:
  ----- Method: ExceptionTests>>testSimpleResignalDoubleResume (in category 'tests - ExceptionTester') -----
  testSimpleResignalDoubleResume
  	self assertSuccess: (ExceptionTester new runTest: #simpleResignalDoubleResumeTest ) !

Item was added:
+ ----- Method: ExceptionTests>>testSimpleResignalResumeReturn (in category 'tests - ExceptionTester') -----
+ testSimpleResignalResumeReturn
+ 	self assertSuccess: (ExceptionTester new runTest: #simpleResignalResumeReturnTest ) !

Item was added:
+ ----- Method: ExceptionTests>>testSimpleResignalVsOuter1 (in category 'tests - ExceptionTester') -----
+ testSimpleResignalVsOuter1
+ 	self assertSuccess: (ExceptionTester new runTest: #simpleResignalVsOuter1Test) !

Item was added:
+ ----- Method: ExceptionTests>>testSimpleResignalVsOuter2 (in category 'tests - ExceptionTester') -----
+ testSimpleResignalVsOuter2
+ 	self assertSuccess: (ExceptionTester new runTest: #simpleResignalVsOuter2Test) !



More information about the Squeak-dev mailing list