[squeak-dev] The Trunk: KernelTests-laza.88.mcz

commits at source.squeak.org commits at source.squeak.org
Sun Aug 30 23:51:56 UTC 2009


Alexander Lazarević uploaded a new version of KernelTests to project The Trunk:
http://source.squeak.org/trunk/KernelTests-laza.88.mcz

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

Name: KernelTests-laza.88
Author: laza
Time: 31 August 2009, 1:51:50 am
UUID: 148a355e-e76f-6d4d-bcff-11f14baee335
Ancestors: KernelTests-laza.86

Only remove obsolete BlockContext tests that fail

=============== Diff against KernelTests-laza.86 ===============

Item was changed:
  ----- Method: BlockContextTest>>testSetUp (in category 'tests') -----
  testSetUp
  	"Note: In addition to verifying that the setUp worked the way it was expected to, testSetUp is used to illustrate the meaning of the simple access methods, methods that are not normally otherwise 'tested'"
- 	self deny: aBlockContext isClosure.
  	self deny: aBlockContext isMethodContext.
  	self deny: aBlockContext isPseudoContext.
- 	self deny: aBlockContext isDead.
  	self assert: aBlockContext home = contextOfaBlockContext.
- 	self assert: aBlockContext blockHome = contextOfaBlockContext.
  	self assert: aBlockContext receiver = self.
  	self assert: (aBlockContext method isKindOf: CompiledMethod).
+ !
- 	self assert: aBlockContext methodNode selector = 'setUp'.
- 	self assert: (aBlockContext methodNodeFormattedAndDecorated: true) selector = 'setUp'.!

Item was removed:
- ----- Method: BlockContextTest>>testSupplyAnswerUsingTraditionalMatchOfQuestion (in category 'tests') -----
- testSupplyAnswerUsingTraditionalMatchOfQuestion
- 
- 	self should: [true = ([self confirm: 'You like Smalltalk?'] 
- 		valueSupplyingAnswer: #('*Smalltalk#' true))]!

Item was removed:
- ----- Method: BlockContextTest>>testCopyStack (in category 'tests') -----
- testCopyStack
- 	self assert: aBlockContext copyStack printString = aBlockContext printString.!

Item was removed:
- ----- Method: BlockContextTest>>testSupplyAnswerThroughNestedBlocks (in category 'tests') -----
- testSupplyAnswerThroughNestedBlocks
- 
- 	self should: [true = ([[self confirm: 'You like Smalltalk?'] 
- 		valueSupplyingAnswer: #('Blub' false)] valueSupplyingAnswer: #('Smalltalk' true))]!

Item was removed:
- ----- Method: BlockContextTest>>testSupplySameAnswerToAllQuestions (in category 'tests') -----
- testSupplySameAnswerToAllQuestions
- 
- 	self should: [true = ([self confirm: 'You like Smalltalk?'] valueSupplyingAnswer: true)].
- 	
- 	self should: [#(true true) = ([{self confirm: 'One'. self confirm: 'Two'}] valueSupplyingAnswer: true)].!

Item was removed:
- ----- Method: BlockContextTest>>testTallyMethods (in category 'tests') -----
- testTallyMethods
- 	self assert: (ContextPart tallyMethods: aBlockContext) size = 3.!

Item was removed:
- ----- Method: BlockContextTest>>testValueWithExitContinue (in category 'tests - evaluating') -----
- testValueWithExitContinue
- 
- 	| val last |	
- 	val := 0. 
- 
- 	1 to: 10 do: [ :i |
- 		[ :continue |
- 			i = 4 ifTrue: [continue value].
- 			val := val + 1.
- 			last := i
- 		] valueWithExit.
- 	].
- 
- 	self assert: val = 9.
- 	self assert: last = 10.	!

Item was removed:
- ----- Method: BlockContextTest>>testSupplySeveralAnswersToSeveralQuestions (in category 'tests') -----
- testSupplySeveralAnswersToSeveralQuestions
- 
- 	self should: [#(false true) = ([{self confirm: 'One'. self confirm: 'Two'}] 
- 		valueSupplyingAnswers: #( ('One' false) ('Two' true) ))].
- 	
- 	self should: [#(true false) = ([{self confirm: 'One'. self confirm: 'Two'}] 
- 		valueSupplyingAnswers: #( ('One' true) ('Two' false) ))]!

Item was removed:
- ----- Method: BlockContextTest>>testTrace (in category 'tests') -----
- testTrace
- 	self assert: (ContextPart trace: aBlockContext) class = Rectangle.!

Item was removed:
- ----- Method: BlockContextTest>>testValueWithExitBreak (in category 'tests - evaluating') -----
- testValueWithExitBreak
- 
- 	| val |	
- 
- 	[ :break |
- 	    1 to: 10 do: [ :i |
- 			val := i.
- 			i = 4 ifTrue: [break value].
- 		] 
- 	] valueWithExit.
- 
- 	self assert: val = 4.!

Item was removed:
- ----- Method: BlockContextTest>>testFindContextSuchThat (in category 'tests') -----
- testFindContextSuchThat
- 	self assert: (aBlockContext findContextSuchThat: [:each| true]) printString = aBlockContext printString.
- 	self assert: (aBlockContext hasContext: aBlockContext).  !

Item was removed:
- ----- Method: BlockContextTest>>testBlockIsBottomContext (in category 'tests') -----
- testBlockIsBottomContext
- 	self	should: [aBlockContext client ] raise: Error. "block's sender is nil, a block has no client"
- 	self assert: aBlockContext bottomContext = aBlockContext.
- 	self assert: aBlockContext secondFromBottom isNil.!

Item was removed:
- ----- Method: BlockContextTest>>testValueWithArguments (in category 'tests - evaluating') -----
- testValueWithArguments
- 	self
- 		should: [aBlockContext
- 				valueWithArguments: #(1 )]
- 		raise: Error.
- 	self
- 		shouldnt: [aBlockContext
- 				valueWithArguments: #()]
- 		raise: Error.
- 	[aBlockContext
- 		valueWithArguments: #(1 )]
- 		ifError: [:err :rcvr | self assert: err = 'Error: This block accepts 0 arguments, but was called with 1.'].
- 	[[:i | 3 + 4]
- 		valueWithArguments: #(1 2)]
- 		ifError: [:err :rcvr | self assert: err = 'Error: This block accepts 1 argument, but was called with 2.']!




More information about the Squeak-dev mailing list