Christoph Thiede uploaded a new version of KernelTests to project The Trunk: http://source.squeak.org/trunk/KernelTests-ct.455.mcz
==================== Summary ====================
Name: KernelTests-ct.455 Author: ct Time: 27 February 2024, 9:52:34.84305 pm UUID: f7671116-2057-d648-983a-a3754b1f80e1 Ancestors: KernelTests-ct.454
Fixes further slips in primitive simulation tests (silent temporary method dict changes, fix comment, add missing array brackets).
=============== Diff against KernelTests-ct.454 ===============
Item was changed: ----- Method: ContextTest>>testPrimitive118: (in category 'tests - simulation') ----- testPrimitive118: primitiveBlock
| input1 input2 | { {#isNil. 62. {}}. "valid 0-arg primitive" {6. 9. {7}}. "valid unary primitive" {6. 62. {7}}. "failing primitive" {6. 'not a primitive'. {7}}. "invalid primitive" {6. 9. 'not an array'}. "invalid arguments" {#isNil. 62. {1}}. "too many arguments" {6. 9. {}}. "missing argument" {6. 83. {#=. 6.0}}. "primitivePerform" {6. 83. {#isNil. 'excess arg'}}. "primitivePerform - too many arguments" {6. 84. {#=. {6.0}}}. "primitivePerformWithArgs" {6. 84. {#isNil. 'excess arg'}}. "primitivePerformWithArgs - invalid arguments" + {6. 100. {#=. {6.0}. Object}}. "primitivePerformInSuperclass" - {6. 100. {#=. 6.0. Object}}. "primitivePerformInSuperclass" {6. 100. {#isNil. {'excess arg'}. Object}}. "primitivePerformInSuperclass - too many arguments" {6. 118. {9. {7}}}. "primitiveDoPrimitiveWithArgs" {6. 118. {9. {7. 13}}}. "primitiveDoPrimitiveWithArgs - superfluous arguments" {6. 118. {118. {9. {7}}}}. "primitiveDoPrimitiveWithArgs - nested invocation" {thisContext. 218. {Float32Array >> #sum. Float32Array withAll: {2.0. 3.0}. {}}}. "primitiveDoNamedPrimitiveWithArgs" {thisContext. 218. {Float32Array >> #sum. Float32Array withAll: {2.0. 3.0}. {4.0}}}. "primitiveDoNamedPrimitiveWithArgs - superfluous arguments" } do: [:args | | block | block := [primitiveBlock valueWithArguments: args]. self assert: block value equals: (Context runSimulated: block)]. self assert: (primitiveBlock value: (input1 := {1. 2. 3}) value: 61 value: {2. 4}) equals: (Context runSimulated: [primitiveBlock value: (input2 := {1. 2. 3}) value: 61 value: {2. 4}]); assert: input1 equals: input2.!
Item was changed: ----- Method: ContextTest>>testPrimitive189 (in category 'tests - simulation') ----- testPrimitive189 + "Test simulation of primitive 189." - "Test simulation of primitive 118."
{ [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" [(2 with: 3 with: 4 executeMethod: (TestObjectForMethod new xxxMethod: thisContext homeMethod)) allButFirst "OaM selector is undefined behavior"] "object as method" } do: [:block | self assert: (block on: Error do: [:ex | ex description]) equals: (Context runSimulated: [block on: Error do: [:ex | ex description]])].!
Item was changed: ----- Method: ContextTest>>testPrimitive83 (in category 'tests - simulation') ----- testPrimitive83 "Test simulation of primitive 83."
self flag: #bug. "Known bug: Primitive 83 SPORADICALLY does NOT fail in the OSVM for missing argument!!" { [nil perform: #isNil]. "valid 0-arg message" [nil perform: #= with: true]. "valid unary message" [nil perform: #ifNil:ifNotNil: with: [2] with: [:x | x]]. "valid binary message" [nil perform: #isNil with: 'excess arg']. "too many arguments" [nil perform: #=]. "missing argument" [nil perform: Object]. "invalid selector" [[(self class + addSelectorSilently: #plonk:with: withMethod: (TestObjectForMethod new xxxMethod: thisContext homeMethod); - addSelector: #plonk:with: withMethod: (TestObjectForMethod new xxxMethod: thisContext homeMethod); perform: #plonk:with: with: 2 with: 3) allButFirst "OaM selector is undefined behavior"] + ensure: [self class removeSelectorSilently: #plonk:with:]]. - ensure: [self class removeSelector: #plonk:with:]]. } do: [:block | self assert: (block on: Error do: [:ex | ex description]) equals: (Context runSimulated: [block on: Error do: [:ex | ex description]])].!
Item was changed: ----- Method: ContextTest>>testPrimitive84 (in category 'tests - simulation') ----- testPrimitive84 "Test simulation of primitive 84."
{ {#isNil. {}}. "valid 0-arg message" {#=. {true}}. "valid unary message" {#ifNil:ifNotNil:. {[2]. [:x | x]}}. "valid binary message" {#isNil. 'not an array'}. "invalid arguments" {#isNil. {'excess arg'}}. "too many arguments" {#=. {}}. "missing argument" {Object. {}}. "invalid selector" {#in:. {[:it | [(self class + addSelectorSilently: #plonk:with: withMethod: (TestObjectForMethod new xxxMethod: thisContext homeMethod); - addSelector: #plonk:with: withMethod: (TestObjectForMethod new xxxMethod: thisContext homeMethod); perform: #plonk:with: withArguments: #(2 3)) allButFirst "OaM selector is undefined behavior"] + ensure: [self class removeSelectorSilently: #plonk:with:]]}}. - ensure: [self class removeSelector: #plonk:with:]]}}. } do: [:args | self assert: ([nil perform: args first withArguments: args second] on: Error do: [:ex | ex description]) equals: (Context runSimulated: [[nil perform: args first withArguments: args second] on: Error do: [:ex | ex description]])].!
packages@lists.squeakfoundation.org