[squeak-dev] The Inbox: KernelTests-ct.420.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Mar 11 23:45:01 UTC 2022


A new version of KernelTests was added to project The Inbox:
http://source.squeak.org/inbox/KernelTests-ct.420.mcz

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

Name: KernelTests-ct.420
Author: ct
Time: 12 March 2022, 12:44:59.827359 am
UUID: 1d33a6f2-995f-2947-afd0-0e587856e860
Ancestors: KernelTests-ct.419

Tests simulation of primitive 188 (primitiveExecuteMethodArgsArray) and primitive 189 (primitiveExecuteMethod). Complements Kernel-ct.1448.

=============== Diff against KernelTests-ct.419 ===============

Item was added:
+ ----- Method: ContextTest>>testPrimitive188 (in category 'tests') -----
+ testPrimitive188
+ 
+ 	self testPrimitive188: [:receiver :args :compiledMethod |
+ 		receiver withArgs: args executeMethod: compiledMethod].
+ 	
+ 	self testPrimitive188: [:receiver :args :compiledMethod |
+ 		CompiledMethod receiver: receiver withArguments: args executeMethod: compiledMethod].!

Item was added:
+ ----- Method: ContextTest>>testPrimitive188: (in category 'tests') -----
+ testPrimitive188: primitiveBlock
+ 
+ 	{
+ 		{2. {}. SmallInteger >> #even}. "valid 0-arg message"
+ 		{2. {1}. Integer >> #<<}. "valid unary message"
+ 		{2. {3. 4}. Integer >> #raisedTo:modulo:}. "valid binary message"
+ 		{2. 'not an array'. Integer >> #<<}. "invalid arguments"
+ 		{2. {'excess arg'}. SmallInteger >> #even}. "too many arguments"
+ 		{2. {}. Integer >> #<<}. "missing argument"
+ 		{2. {1}. 'not a method'}. "invalid method"
+ 	} do: [:args |
+ 		self
+ 			assert: ([primitiveBlock valueWithArguments: args] on: Error do: [:ex | ex messageText])
+ 			equals: (Context runSimulated: [[primitiveBlock valueWithArguments: args] on: Error do: [:ex | ex messageText]])].!

Item was added:
+ ----- Method: ContextTest>>testPrimitive189 (in category 'tests') -----
+ testPrimitive189
+ 
+ 	{
+ 		[2 executeMethod: SmallInteger >> #even]. "valid 0-arg message"
+ 		[2 with: 1 executeMethod: Integer >> #<<]. "valid unary message"
+ 		[2 with: 3 with: 4 executeMethod: Integer >> #raisedTo:modulo:]. "valid binary message"
+ 		[2 with: 1 executeMethod: Integer >> #even]. "too many arguments"
+ 		[2 executeMethod: Integer >> #<<]. "missing argument"
+ 		[2 with: 1 executeMethod: 'not a method']. "invalid method"
+ 	} do: [:block |
+ 		self
+ 			assert: (block on: Error do: [:ex | ex messageText])
+ 			equals: (Context runSimulated: [block on: Error do: [:ex | ex messageText]])].!



More information about the Squeak-dev mailing list