[squeak-dev] The Trunk: KernelTests-ul.341.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Jun 1 18:10:02 UTC 2018


Levente Uzonyi uploaded a new version of KernelTests to project The Trunk:
http://source.squeak.org/trunk/KernelTests-ul.341.mcz

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

Name: KernelTests-ul.341
Author: ul
Time: 31 May 2018, 10:59:41.493595 pm
UUID: 964ae9e4-9717-442b-8e2e-dc8d11ed65c1
Ancestors: KernelTests-mt.340

Make tests work even if AuthorInitials is not initialized.
- #setUp of ClassTest, ClassVarScopeTest and CompiledMethodTest use #compileSilently: instead of #compile:.
- #performTest of the above classes explicltly sets AuthorInitials to the name of the class
- CompiledMethodTest >> #testDecompile uses #compileSilently:, because testing compilation is not the goal of that test
- BehaviorTest >> #testChange temporarily sets AuthorInitials

=============== Diff against KernelTests-mt.340 ===============

Item was changed:
  ----- Method: BehaviorTest>>testChange (in category 'tests') -----
  testChange
  	"self debug: #testChange"
  
  	| behavior model |
  	behavior := Behavior new.
  	behavior superclass: Model.
  	behavior setFormat: Model format.
  	model := Model new.
  	model primitiveChangeClassTo: behavior new.
+ 	Utilities
+ 		useAuthorInitials: self className
+ 		during: [ behavior compile: 'thisIsATest  ^ 2' ].
- 	behavior compile: 'thisIsATest  ^ 2'.
  	self assert: model thisIsATest = 2.
  	self should: [Model new thisIsATest] raise: MessageNotUnderstood.
  
  
  !

Item was added:
+ ----- Method: ClassBuilderTest>>performTest (in category 'private') -----
+ performTest
+ 
+ 	Utilities
+ 		useAuthorInitials: self className
+ 		during: [ super performTest ]!

Item was added:
+ ----- Method: ClassTest>>performTest (in category 'private') -----
+ performTest
+ 
+ 	Utilities
+ 		useAuthorInitials: self className
+ 		during: [ super performTest ]!

Item was changed:
  ----- Method: ClassTest>>setUp (in category 'setup') -----
  setUp
  	className := #TUTU.
  	renamedName := #RenamedTUTU.
  	self deleteClass.
  	self deleteRenamedClass.
  	Object subclass: className
  		instanceVariableNames: ''
  		classVariableNames: ''
  		poolDictionaries: ''
  		category: self categoryNameForTemporaryClasses.
  	#('foo' 'bar self foo' 'baz self bar') do:
+ 		[:s| (Smalltalk at: className) compileSilently: s]!
- 		[:s| (Smalltalk at: className) compile: s]!

Item was added:
+ ----- Method: ClassVarScopeTest>>performTest (in category 'private') -----
+ performTest
+ 
+ 	Utilities
+ 		useAuthorInitials: self className
+ 		during: [ super performTest ]!

Item was changed:
  ----- Method: ClassVarScopeTest>>setUp (in category 'command') -----
  setUp
  
  	parent := Object
  		subclass: #ClassVarScopeParent
  		instanceVariableNames: ''
  		classVariableNames: ''
  		poolDictionaries: ''
  		category: 'Dummy-Tests-Class'.
  	child := parent
  		subclass: #ClassVarScopeChild
  		instanceVariableNames: ''
  		classVariableNames: 'ClassVarScopeFoo'
  		poolDictionaries: ''
  		category: 'Dummy-Tests-Class'.
  	grandchild := child
  		subclass: #ClassVarScopeGrandchild
  		instanceVariableNames: ''
  		classVariableNames: ''
  		poolDictionaries: ''
  		category: 'Dummy-Tests-Class'.
  	foo := Smalltalk globals at: #ClassVarScopeFoo put: Object basicNew.
  
+ 	parent compileSilently: self sourceOfParentGetFoo.
+ 	parent compileSilently: self sourceOfParentSetFoo.
- 	parent compile: self sourceOfParentGetFoo.
- 	parent compile: self sourceOfParentSetFoo.
  
+ 	parent class compileSilently: self sourceOfParentGetFoo.
+ 	parent class compileSilently: self sourceOfParentSetFoo.
- 	parent class compile: self sourceOfParentGetFoo.
- 	parent class compile: self sourceOfParentSetFoo.
  
+ 	child compileSilently: self sourceOfChildGetFoo.
+ 	child compileSilently: self sourceOfChildSetFoo.
- 	child compile: self sourceOfChildGetFoo.
- 	child compile: self sourceOfChildSetFoo.
  
+ 	child class compileSilently: self sourceOfChildGetFoo.
+ 	child class compileSilently: self sourceOfChildSetFoo.
- 	child class compile: self sourceOfChildGetFoo.
- 	child class compile: self sourceOfChildSetFoo.
  
+ 	grandchild compileSilently: self sourceOfGrandchildGetFoo.
+ 	grandchild compileSilently: self sourceOfGrandchildSetFoo.
- 	grandchild compile: self sourceOfGrandchildGetFoo.
- 	grandchild compile: self sourceOfGrandchildSetFoo.
  
+ 	grandchild class compileSilently: self sourceOfGrandchildGetFoo.
+ 	grandchild class compileSilently: self sourceOfGrandchildSetFoo!
- 	grandchild class compile: self sourceOfGrandchildGetFoo.
- 	grandchild class compile: self sourceOfGrandchildSetFoo.
- !

Item was added:
+ ----- Method: CompiledMethodTest>>performTest (in category 'private') -----
+ performTest
+ 
+ 	Utilities
+ 		useAuthorInitials: self className
+ 		during: [ super performTest ]!

Item was changed:
  ----- Method: CompiledMethodTest>>testDecompile (in category 'tests - decompiling') -----
  testDecompile
  	"self debug: #testDecompileTree"
  	| method  cls stream |
  
  	Smalltalk removeClassNamed: #TUTU.
  
  	cls := Object subclass: #TUTU
  		instanceVariableNames: ''
  		classVariableNames: ''
  		poolDictionaries: ''
  		category: 'KernelTests-Methods'.
+ 	cls compileSilently: 'foo ^ 10'.
- 	cls compile: 'foo ^ 10'.
  	method := cls >> #foo.
  	Smalltalk removeClassNamed: #TUTU.
  	stream := String new writeStream.
  	method decompile printOn: stream.
  	self assert: stream contents = 'foo
  	^ 10'
  	
  	
  	!



More information about the Squeak-dev mailing list