From VisualWorks®, Release 5i.4 of November 12, 2001 on January 18, 2002 at 12:16:19 am ChangeSet current addPatch: 'UPrimTst-VW7' <class> <name>UserPrimitiveTests</name> <environment>Examples</environment> <super>Examples.UserPrimitives</super> <private>false</private> none <imports></imports> <category>User Primitives</category> </class> <comment> Examples.UserPrimitiveTests
I am a class to test the user primitive support routines. I can only run my tests if the Virtual Machine includes all my User Primitives defined for this purpose. To run my tests, do: "UserPrimitiveTests new run" and watch the Transcript. If an error occurs a Notifier will appear. @(#)UPrimTst.st 63.13
</comment> <methods> Examples.UserPrimitiveTests <category>top level</category>
run "UserPrimitiveTests new run" Transcript cr; show: 'Starting user-primitive tests...'; cr. #(runtstUPbasicAt runtstUPbasicAtPut runtstUPbyteAt runtstUPbyteAtPut runtstUPcopyCtoSTfloatArray runtstUPcopyCtoSTIntArray runtstUPcopyCtoSTstring runtstUPcopySTtoCfloatArray runtstUPcopySTtoCintArray runtstUPcopySTtoCbytes runtstUPcopySTtoCstring runtstUPCtoSTbool runtstUPCtoSTchar runtstUPCtoSTfloat runtstUPCtoSTint runtstUPfloatAt runtstUPintegerAt runtstUPfloatAtPut runtstUPindexVarSize runtstUPinstVarAt runtstUPinstVarAtPut runtstUPinstVarSize runtstUPintegerAtPut runtstUPisArrayOfFloat runtstUPisArrayOfInteger runtstUPisBoolean runtstUPisImmediate runtstUPisByteArray runtstUPisCharacter runtstUPisFloat runtstUPisInteger runtstUPisString runtstUPisByteLike runtstUPnil runtstUPreturnFalse runtstUPreturnHandle runtstUPreturnNil runtstUPreturnTrue runtstUPSTtoCchar runtstUPSTtoCfloat runtstUPSTtoCint runtstUP32Arguments runtstUPerrorHandler runtstUPregHandleAt runtstUPregHandleAtPut runtstUPallocFs runtstUPallocVs runtstUPclassType runtstUPsignalSem runtstUPpostInt runtstUPisKindOf runtstUPisDouble runtstUPCtoSTdouble runtstUPSTtoCdouble runtstUPclass runtstUPSTtoCbool) do: [:msg | Transcript show: msg printString. self perform: msg. Transcript cr]. Transcript show: '...tests completed'
testPerformance "UserPrimitiveTests new testPerformance" | ba a time1 time2 rpt | rpt := 25. ba := ByteArray new: 2000 withAll: 99. a := Array new: 2000 withAll: 100. time1 := time2 := 0. rpt timesRepeat: [ time1 := time1 + (Time millisecondsToRun: [self sumByteArray: ba])]. rpt timesRepeat: [ time2 := time2 + (Time millisecondsToRun: [self zeroArray: a])]. Transcript cr; print: (time1 / rpt roundTo: 0.1); nextPutAll: ' ms for summing a '. Transcript print: ba size; nextPutAll: '-element ByteArray.'. Transcript cr; print: (time2 / rpt roundTo: 0.1); nextPutAll: ' ms for zeroing a '. Transcript print: a size; nextPutAll: '-element Array.'. Transcript endEntry
</methods> <methods> Examples.UserPrimitiveTests <category>individual tests</category>
runtstUP32Arguments | result1 result2 error array | array := Array new: 33. 1 to: 32 do: [:i | array at: i put: i]. array at: 33 put: self. [result1 := self tstUP32Arguments: 01 a02: 02 a03: 03 a04: 04 a05: 05 a06: 06 a07: 07 a08: 08 a09: 09 a10: 10 a11: 11 a12: 12 a13: 13 a14: 14 a15: 15 a16: 16 a17: 17 a18: 18 a19: 19 a20: 20 a21: 21 a22: 22 a23: 23 a24: 24 a25: 25 a26: 26 a27: 27 a28: 28 a29: 29 a30: 30 a31: 31 a32: 32] on: self class errorSignal do: [:ex| error := ex parameter]. (result1 size = 33 and: [result1 = array and: [error == nil]]) ifFalse: [self message: 'tstUP32Arguments one failed']. array at: 1 put: $a. [result2 := self tstUP32Arguments: $a a02: 02 a03: 03 a04: 04 a05: 05 a06: 06 a07: 07 a08: 08 a09: 09 a10: 10 a11: 11 a12: 12 a13: 13 a14: 14 a15: 15 a16: 16 a17: 17 a18: 18 a19: 19 a20: 20 a21: 21 a22: 22 a23: 23 a24: 24 a25: 25 a26: 26 a27: 27 a28: 28 a29: 29 a30: 30 a31: 31 a32: 32] on: self class errorSignal do: [:ex| error := ex parameter]. (result2 == nil and: [error = 1]) ifFalse: [self message: 'tstUP32Arguments two failed']
runtstUPallocFs | result | result := self tstUPallocFs: Point. (result class == Point) ifFalse: [self message: 'runtstUPallocFs failed']
runtstUPallocVs | result | result := self tstUPallocVs: Array size: 10. (result class == Array and: [result size = 10]) ifFalse: [self message: 'runtstUPallocVs failed']
runtstUPbasicAt | result | result := self tstUPbasicAt: #(1 20 3 ) with: 2. result == 20 ifFalse: [self message: 'tstUPbasicAt: anArray with: anIndex failed']
runtstUPbasicAtPut | result anArray | anArray := Array with: #foo with: #bar with: #who. result := self tstUPbasicAtPut: anArray with: 2 with: #who. (result = #bar and: [anArray = #(foo who who )]) ifFalse: [self message: 'tstUPbasicAtPut: anArray with: anIndex with: toBePut failed']
runtstUPbyteAt | result aByteArray | aByteArray := ByteArray new: 3. aByteArray at: 1 put: 8. aByteArray at: 2 put: 16. aByteArray at: 3 put: 24. result := self tstUPbyteAt: aByteArray with: 2. result == 16 ifFalse: [self message: 'tstUPbyteAt: aByteArray with: anIndex failed']
runtstUPbyteAtPut | result aByteArray | aByteArray := ByteArray new: 3. aByteArray at: 1 put: 8. aByteArray at: 2 put: 16. aByteArray at: 3 put: 24. result := self tstUPbyteAtPut: aByteArray with: 2 with: 20. (result = 16 and: [(aByteArray at: 1) == 8 and: [(aByteArray at: 2) == 20 and: [(aByteArray at: 3) == 24]]]) ifFalse: [self message: 'tstUPbyteAt: aByteArray with: anIndex failed']
runtstUPclass | result | result := self tstUPclass: 0@0. (result == Point) ifFalse: [self message: 'runtstUPclass failed']
runtstUPclassType | result1 result2 result3 | result1 := self tstUPclassType: 1. (result1 = 0) ifFalse: [self message: 'runtstUPclassType 1 failed']. result2 := self tstUPclassType: Object. (result2 = 1) ifFalse: [self message: 'runtstUPclassType 2 failed']. result3 := self tstUPclassType: Array. (result3 = 2) ifFalse: [self message: 'runtstUPclassType 3 failed']
runtstUPcopyCtoSTfloatArray "Test new runtstUPcopyCtoSTfloatArray" | result anArray | anArray := #(2.0 2.0 2.0 2.0 2.0 2.0 ) copy. result := self tstUPcopyCtoSTfloatArray: anArray with: 3 with: 4. (result = 3 and: [anArray = #(2.0 2.0 2.0 -1.0 2.0 -3.0 )]) ifFalse: [self message: 'tstUPcopyCtoSTfloatArray 1 failed']. anArray := #(2.0 2.0 2.0 2.0 2.0 2.0 ) copy. result := self tstUPcopyCtoSTfloatArray: anArray with: 3 with: 1. (result = 3 and: [anArray = #(-1.0 2.0 -3.0 2.0 2.0 2.0 )]) ifFalse: [self message: 'tstUPcopyCtoSTfloatArray 2 failed']. anArray := #(2.0 2.0 2.0 2.0 2.0 2.0 ) copy. result := self tstUPcopyCtoSTfloatArray: anArray with: 1 with: 6. (result = 1 and: [anArray = #(2.0 2.0 2.0 2.0 2.0 -1.0 )]) ifFalse: [self message: 'tstUPcopyCtoSTfloatArray 3 failed']
runtstUPcopyCtoSTIntArray "Test new runtstUPcopyCtoSTIntArray" | result anArray | anArray := #(2 2 2 2 2 2 ) copy. result := self tstUPcopyCtoSTIntArray: anArray with: 3 with: 4. (result = 3 and: [anArray = #(2 2 2 1 2 3 )]) ifFalse: [self message: 'tstUPcopyCtoSTIntArray 1 failed']. anArray := #(2 2 2 2 2 2 ) copy. result := self tstUPcopyCtoSTIntArray: anArray with: 3 with: 1. (result = 3 and: [anArray = #(1 2 3 2 2 2)]) ifFalse: [self message: 'tstUPcopyCtoSTIntArray 2 failed']. anArray := #(2 2 2 2 2 2 ) copy. result := self tstUPcopyCtoSTIntArray: anArray with: 1 with: 6. (result = 1 and: [anArray = #(2 2 2 2 2 1)]) ifFalse: [self message: 'tstUPcopyCtoSTIntArray 3 failed'].
runtstUPcopyCtoSTstring | result anArray | anArray := 'bbbbbb' copy. result := self tstUPcopyCtoSTstring: anArray with: 3 with: 4. (result = 3 and: [anArray = 'bbbabc']) ifFalse: [self message: 'tstUPcopyCtoSTstring 1 failed']. anArray := 'bbbbbb' copy. result := self tstUPcopyCtoSTstring: anArray with: 3 with: 1. (result = 3 and: [anArray = 'abcbbb']) ifFalse: [self message: 'tstUPcopyCtoSTstring 2 failed']. anArray := 'bbbbbb' copy. result := self tstUPcopyCtoSTstring: anArray with: 1 with: 6. (result = 1 and: [anArray = 'bbbbba']) ifFalse: [self message: 'tstUPcopyCtoSTstring 3 failed']
runtstUPcopySTtoCbytes | result proto | proto := ByteArray with: 1 with: 2 with: 3. result := self tstUPcopySTtoCbytes: proto with: 3 with: 4. result = #[2 2 2 1 2 3] ifFalse: [self message: 'tstUPcopySTtoCbytes 1 failed']. result := self tstUPcopySTtoCbytes: proto with: 3 with: 1. result = #[1 2 3 2 2 2] ifFalse: [self message: 'tstUPcopySTtoCbytes 2 failed']. result := self tstUPcopySTtoCbytes: proto with: 1 with: 6. result = #[2 2 2 2 2 1] ifFalse: [self message: 'tstUPcopySTtoCbytes 3 failed']
runtstUPcopySTtoCfloatArray "Test new runtstUPcopySTtoCfloatArray" | result proto | proto := Array with: 1.0 with: 2.0 with: 3.0. result := self tstUPcopySTtoCfloatArray: proto with: 3 with: 4. result asArray = #(2.0 2.0 2.0 1.0 2.0 3.0 ) ifFalse: [self message: 'tstUPcopySTtoCfloatArray 1 failed']. result := self tstUPcopySTtoCfloatArray: proto with: 3 with: 1. result asArray = #(1.0 2.0 3.0 2.0 2.0 2.0 ) ifFalse: [self message: 'tstUPcopySTtoCfloatArray 2 failed']. result := self tstUPcopySTtoCfloatArray: proto with: 1 with: 6. result asArray = #(2.0 2.0 2.0 2.0 2.0 1.0 ) ifFalse: [self message: 'tstUPcopySTtoCfloatArray 3 failed']
runtstUPcopySTtoCintArray | result proto | proto := Array with: 1 with: 2 with: 3. result := self tstUPcopySTtoCintArray: proto with: 3 with: 4. result asArray = #(2 2 2 1 2 3 ) ifFalse: [self message: 'tstUPcopySTtoCintArray 1 failed']. result := self tstUPcopySTtoCintArray: proto with: 3 with: 1. result asArray = #(1 2 3 2 2 2 ) ifFalse: [self message: 'tstUPcopySTtoCintArray 2 failed']. result := self tstUPcopySTtoCintArray: proto with: 1 with: 6. result asArray = #(2 2 2 2 2 1 ) ifFalse: [self message: 'tstUPcopySTtoCintArray 3 failed']
runtstUPcopySTtoCstring | result | result := self tstUPcopySTtoCstring: 'abc' with: 3 with: 4. result = 'bbbabc' ifFalse: [self message: 'tstUPcopySTtoCstring 1 failed']. result := self tstUPcopySTtoCstring: 'abc' with: 3 with: 1. result = 'abcbbb' ifFalse: [self message: 'tstUPcopySTtoCstring 2 failed']. result := self tstUPcopySTtoCstring: 'abc' with: 1 with: 6. result = 'bbbbba' ifFalse: [self message: 'tstUPcopySTtoCstring 3 failed']
runtstUPCtoSTbool | result | result := self tstUPCtoSTbool. result ifFalse: [self message: 'tstUPCtoSTbool failed']
runtstUPCtoSTchar | result | result := self tstUPCtoSTchar. result == $c ifFalse: [self message: 'tstUPCtoSTchar failed']
runtstUPCtoSTdouble | result | result := self tstUPCtoSTdouble. (result class = Double and: [result asFloat = 3.14]) ifFalse: [self message: 'runtstUPCtoSTdouble failed']
runtstUPCtoSTfloat | result | result := self tstUPCtoSTfloat. result = 3.14 ifFalse: [self message: 'tstUPCtoSTfloat failed']
runtstUPCtoSTint | result | result := self tstUPCtoSTint. result == 42 ifFalse: [self message: 'tstUPCtoSTint failed']
runtstUPerrorHandler | result | result := self tstUPerrorHandler. result ~= 100 ifTrue: [self message: 'tstUPerrorHandler failed']
runtstUPfloatAt | result | result := self tstUPfloatAt: #(1.0 2.0 3.0 ) with: 3. result = 3.0 ifFalse: [self message: 'tstUPfloatAt: anArray with: anIndex failed']
runtstUPfloatAtPut | result aFloatArray | aFloatArray := Array with: 8.0 with: 16.0 with: 24.0 . result := self tstUPfloatAtPut: aFloatArray with: 2 with: 20.0 . (result = 16.0 and: [(aFloatArray at: 1) = 8.0 and: [(aFloatArray at: 2) = 20.0 and: [(aFloatArray at: 3) = 24.0]]]) ifFalse: [self message: 'tstUPfloatAtPut: aFloatArray with: anIndex failed']
runtstUPindexVarSize | result | result := self tstUPindexVarSize: self. result == self size ifFalse: [self message: 'tstUPindexVarSize: anyObjectWithIndexVars failed 0']. result := self tstUPindexVarSize: #(enie meenie meenie moe ). result == 4 ifFalse: [self message: 'tstUPindexVarSize: anyObjectWithIndexVars failed 1']. result := self tstUPindexVarSize: (Array new: 5000). result == 5000 ifFalse: [self message: 'tstUPindexVarSize: anyObjectWithIndexVars failed 2']
runtstUPinstVarAt | result anAssoc | anAssoc := Association key: #foo value: #bar. result := self tstUPinstVarAt: anAssoc with: 1. result == #foo ifFalse: [self message: 'tstUPinstVarAt: anArray with: anIndex 1 failed']. result := self tstUPinstVarAt: anAssoc with: 2. result == #bar ifFalse: [self message: 'tstUPinstVarAt: anArray with: anIndex 2 failed']
runtstUPinstVarAtPut | result anAssoc | anAssoc := Association key: #foo value: #bar. result := self tstUPinstVarAtPut: anAssoc with: 2 with: #foo. (result == #bar and: [anAssoc key == #foo and: [anAssoc value == #foo]]) ifFalse: [self message: 'tstUPinstVarAtPut: anArray with: anIndex failed']
runtstUPinstVarSize | result | result := self tstUPinstVarSize: self. result == 0 ifFalse: [self message: 'tstUPinstVarSize: anyObjectWithInstVars 1 failed']. result := self tstUPinstVarSize: (Array new: 3). result == 0 ifFalse: [self message: 'tstUPinstVarSize: anyObjectWithInstVars 2 failed']. result := self tstUPinstVarSize: Association new. result == 2 ifFalse: [self message: 'tstUPinstVarSize: anyObjectWithInstVars 3 failed']
runtstUPintegerAt | result | result := self tstUPintegerAt: #(1 2 3) with: 3. result = 3 ifFalse: [self message: 'tstUPintegerAt failed']
runtstUPintegerAtPut | result anArray | anArray := Array new: 3. result := self tstUPintegerAtPut: anArray with: 2 with: 8. (result = nil and: [anArray = (Array with: nil with: 8 with: nil)]) ifFalse: [self message: 'tstUPintegerAtPut: anArray with: anIndex with: toBePut failed']
runtstUPisArrayOfFloat | result | result := self tstUPisArrayOfFloat: (Array with: 1.0 with: 2.0 with: 3.0). result ifFalse: [self message: 'tstUPisArrayOfFloat: anArrayOfFloat failed 1']. result := self tstUPisArrayOfFloat: (Array with: 1 with: 2 with: 3). result ifTrue: [self message: 'tstUPisArrayOfFloat: anArrayOfFloat failed 2']. result := self tstUPisArrayOfFloat: (Array with: 1.0 with: 2.0 with: 3). result ifTrue: [self message: 'tstUPisArrayOfFloat: anArrayOfFloat failed 3']
runtstUPisArrayOfInteger | result | result := self tstUPisArrayOfInteger: #(1 2 3 4 5 ). result ifFalse: [self message: 'tstUPisArrayOfInteger: anArrayOfInteger 1 failed']. result := self tstUPisArrayOfInteger: #(1 f2 f3 f4 f5 ). result ifTrue: [self message: 'tstUPisArrayOfInteger: anArrayOfInteger 2 failed']
runtstUPisBoolean | result | result := self tstUPisBoolean: true. result ifFalse: [self message: 'tstUPisBoolean: aBoolean failed 1']. result := self tstUPisBoolean: false. result ifFalse: [self message: 'tstUPisBoolean: aBoolean failed 2']. result := self tstUPisBoolean: 7. result ifTrue: [self message: 'tstUPisBoolean: aBoolean failed 3']
runtstUPisByteArray | result | result := self tstUPisByteArray: (ByteArray with: 2 with: 3). result ifFalse: [self message: 'tstUPisByteArray: aByteArray failed']
runtstUPisByteLike | result | result := self tstUPisByteLike: (ByteArray new: 2). result ifFalse: [self message: 'tstUPisByteLike 1 failed']. result := self tstUPisByteLike: (UninterpretedBytes new: 2). result ifFalse: [self message: 'tstUPisByteLike 2 failed']. result := self tstUPisByteLike: (Array new: 2). result ifTrue: [self message: 'tstUPisByteLike 3 failed']
runtstUPisCharacter | result | result := self tstUPisCharacter: $h. result ifFalse: [self message: 'tstUPisCharacter: aCharacter failed']
runtstUPisDouble | result1 result2 | result1 := self tstUPisDouble: 0.0 asDouble. (result1) ifFalse: [self message: 'runtstUPisDouble 1 failed']. result2 := self tstUPisDouble: 0.0. (result2) ifTrue: [self message: 'runtstUPisDouble 2 failed']
runtstUPisFloat | result | result := self tstUPisFloat: 3.14. result ifFalse: [self message: 'tstUPisFloat: aFloat failed 1']. result := self tstUPisFloat: 3. result ifTrue: [self message: 'tstUPisFloat: aFloat failed 2']
runtstUPisImmediate | result | result := self tstUPisImmediate: 1. result ifFalse: [self message: 'tstUPisImmediate failed 1']. result := self tstUPisImmediate: $a. result ifFalse: [self message: 'tstUPisImmediate failed 2']. result := self tstUPisImmediate: Object new. result ifTrue: [self message: 'tstUPisImmediate failed 3']
runtstUPisInteger | result | result := self tstUPisInteger: 2. result ifFalse: [self message: 'tstUPisInteger: aInteger failed']
runtstUPisKindOf | result | result := self tstUPisKindOf: 0@0 with: Point. (result) ifFalse: [self message: 'runtstUPisKindOf failed']
runtstUPisString | result | result := self tstUPisString: 'aString'. result ifFalse: [self message: 'tstUPisString: aString failed']
runtstUPnil | result | result := self tstUPnil. result == nil ifFalse: [self message: 'tstUPnil failed']
runtstUPpostInt | sem | sem := Semaphore new. self tstUPpostInt: sem. Processor yield. "let break-out occur" (sem instVarAt: 3) = 1 ifFalse: [self message: 'runtstUPpostInt failed']
runtstUPregHandleAt | result | result := self tstUPregHandleAt: 1. result ifFalse: [self message: 'runtstUPregHandleAt failed']
runtstUPregHandleAtPut | result slot thing | thing := Object new. slot := self tstUPallocRegSlot. slot < 30 ifTrue: [self message: 'tstUPallocRegSlot failed']. result := self tstUPregHandleAt: slot put: thing. (result == thing) ifFalse: [self message: 'runtstUPregHandleAt failed']
runtstUPreturnFalse | result | result := self tstUPreturnFalse. result ifTrue: [self message: 'tstUPreturnFalse failed']
runtstUPreturnHandle | result | result := self tstUPreturnHandle: self. result == self ifFalse: [self message: 'tstUPreturnHandle failed']
runtstUPreturnNil | result | result := self tstUPreturnNil. result == nil ifFalse: [self message: 'tstUPreturnNil failed']
runtstUPreturnTrue | result | result := self tstUPreturnTrue. result ifFalse: [self message: 'tstUPreturnTrue failed']
runtstUPsignalSem | sem | sem := Semaphore new. self tstUPsignalSem: sem. (sem instVarAt: 3) = 1 ifFalse: [self message: 'runtstUPsignalSem failed']
runtstUPSTtoCbool | result | result := self tstUPSTtoCbool: true. result ifFalse: [self message: 'tstUPSTtoCbool 1 failed']. result := self tstUPSTtoCbool: false. result ifTrue: [self message: 'tstUPSTtoCbool 2 failed']
runtstUPSTtoCchar | result | result := self tstUPSTtoCchar: $h. result == $h ifFalse: [self message: 'tstUPSTtoCchar: aChar failed']
runtstUPSTtoCdouble | result | result := self tstUPSTtoCdouble: 99.0 asDouble. (result class = Double and: [result = 99.0]) ifFalse: [self message: 'runtstUPSTtoCdouble failed']
runtstUPSTtoCfloat | result | result := self tstUPSTtoCfloat: 3.14. result = 3.14 ifFalse: [self message: 'tstUPSTtoCfloat: aFloat failed']
runtstUPSTtoCint | result | result := self tstUPSTtoCint: 2. result == 2 ifFalse: [self message: 'tstUPSTtoCint: aInt failed']
</methods> <methods> Examples.UserPrimitiveTests <category>test primitives-performance</category>
sumByteArray: ba <primitive: 10100 errorCode: errorCode> ^self reportError: errorCode
zeroArray: a <primitive: 10101 errorCode: errorCode> ^self reportError: errorCode
</methods> <methods> Examples.UserPrimitiveTests <category>test primitives</category>
tstUP32Arguments: a01 a02: a02 a03: a03 a04: a04 a05: a05 a06: a06 a07: a07 a08: a08 a09: a09 a10: a10 a11: a11 a12: a12 a13: a13 a14: a14 a15: a15 a16: a16 a17: a17 a18: a18 a19: a19 a20: a20 a21: a21 a22: a22 a23: a23 a24: a24 a25: a25 a26: a26 a27: a27 a28: a28 a29: a29 a30: a30 a31: a31 a32: a32 <primitive: 10052 errorCode: errorCode> ^self reportError: errorCode
tstUPallocFs: cls <primitive: 10057 errorCode: errorCode> ^self reportError: errorCode
tstUPallocRegSlot <primitive: 10056 errorCode: errorCode> ^self reportError: errorCode
tstUPallocVs: cls size: sz <primitive: 10058 errorCode: errorCode> ^self reportError: errorCode
tstUPbasicAt: anArray with: anIndex <primitive: 10016 errorCode: errorCode> ^self reportError: errorCode
tstUPbasicAtPut: anArray with: anIndex with: toBePut <primitive: 10017 errorCode: errorCode> ^self reportError: errorCode
tstUPbyteAt: anArray with: anIndex <primitive: 10018 errorCode: errorCode> ^self reportError: errorCode
tstUPbyteAtPut: anArray with: anIndex with: toBePut <primitive: 10019 errorCode: errorCode> ^self reportError: errorCode
tstUPclass: obj <primitive: 10066 errorCode: errorCode> ^self reportError: errorCode
tstUPclassType: cls <primitive: 10059 errorCode: errorCode> ^self reportError: errorCode
tstUPcopyCtoSTbytes: anArray with: aCount with: aStartIndex <primitive: 10021 errorCode: errorCode> ^self reportError: errorCode
tstUPcopyCtoSTfloatArray: anArray with: aCount with: aStartIndex <primitive: 10022 errorCode: errorCode> ^self reportError: errorCode
tstUPcopyCtoSTIntArray: anArray with: aCount with: aStartIndex <primitive: 10020 errorCode: errorCode> ^self reportError: errorCode
tstUPcopyCtoSTstring: anArray with: aCount with: aStartIndex <primitive: 10023 errorCode: errorCode> ^self reportError: errorCode
tstUPcopySTtoCbytes: anArray with: aCount with: aStartIndex <primitive: 10024 errorCode: errorCode> ^self reportError: errorCode
tstUPcopySTtoCfloatArray: anArray with: aCount with: aStartIndex <primitive: 10025 errorCode: errorCode> ^self reportError: errorCode
tstUPcopySTtoCintArray: anArray with: aCount with: aStartIndex <primitive: 10026 errorCode: errorCode> ^self reportError: errorCode
tstUPcopySTtoCstring: anArray with: aCount with: aStartIndex <primitive: 10027 errorCode: errorCode> ^self reportError: errorCode
tstUPCtoSTbool <primitive: 10001 errorCode: errorCode> ^self reportError: errorCode
tstUPCtoSTchar <primitive: 10002 errorCode: errorCode> ^self reportError: errorCode
tstUPCtoSTdouble <primitive: 10064 errorCode: errorCode> ^self reportError: errorCode
tstUPCtoSTfloat <primitive: 10003 errorCode: errorCode> ^self reportError: errorCode
tstUPCtoSTint <primitive: 10004 errorCode: errorCode> ^self reportError: errorCode
tstUPerrorHandler <primitive: 10050 errorCode: errorCode> ^self reportError: errorCode
tstUPfloatAt: anArray with: anIndex <primitive: 10030 errorCode: errorCode> ^self reportError: errorCode
tstUPfloatAtPut: anArray with: anIndex <primitive: 10031 errorCode: errorCode> ^self reportError: errorCode
tstUPfloatAtPut: anArray with: anIndex with: aFloat <primitive: 10031 errorCode: errorCode> ^self reportError: errorCode
tstUPindexVarSize: anyObjectWithIndexVars <primitive: 10032 errorCode: errorCode> ^self reportError: errorCode
tstUPinstVarAt: anArray with: anIndex <primitive: 10033 errorCode: errorCode> ^self reportError: errorCode
tstUPinstVarAtPut: anArray with: anIndex with: toBePut <primitive: 10034 errorCode: errorCode> ^self reportError: errorCode
tstUPinstVarSize: anyObjectWithInstVars <primitive: 10035 errorCode: errorCode> ^self reportError: errorCode
tstUPintegerAt: anArray with: anIndex <primitive: 10053 errorCode: errorCode> ^self reportError: errorCode
tstUPintegerAtPut: anArray with: anIndex with: toBePut <primitive: 10036 errorCode: errorCode> ^self reportError: errorCode
tstUPisArrayOfFloat: anArrayOfFloat <primitive: 10037 errorCode: errorCode> ^self reportError: errorCode
tstUPisArrayOfInteger: anArrayOfInteger <primitive: 10038 errorCode: errorCode> ^self reportError: errorCode
tstUPisBoolean: aBoolean <primitive: 10039 errorCode: errorCode> ^self reportError: errorCode
tstUPisByteArray: aByteArray <primitive: 10040 errorCode: errorCode> ^self reportError: errorCode
tstUPisByteLike: obj <primitive: 10051 errorCode: errorCode> ^self reportError: errorCode
tstUPisCharacter: aCharacter <primitive: 10041 errorCode: errorCode> ^self reportError: errorCode
tstUPisDouble: dbl <primitive: 10063 errorCode: errorCode> ^self reportError: errorCode
tstUPisFloat: aFloat <primitive: 10042 errorCode: errorCode> ^self reportError: errorCode
tstUPisImmediate: anObject <primitive: 10067 errorCode: errorCode> ^self reportError: errorCode
tstUPisInteger: aInteger <primitive: 10043 errorCode: errorCode> ^self reportError: errorCode
tstUPisKindOf: inst with: cls <primitive: 10062 errorCode: errorCode> ^self reportError: errorCode
tstUPisString: aString <primitive: 10044 errorCode: errorCode> ^self reportError: errorCode
tstUPnil <primitive: 10045 errorCode: errorCode> ^self reportError: errorCode
tstUPpostInt: sem <primitive: 10061 errorCode: errorCode> ^self reportError: errorCode
tstUPregHandleAt: index <primitive: 10054 errorCode: errorCode> ^self reportError: errorCode
tstUPregHandleAt: index put: value <primitive: 10055 errorCode: errorCode> ^self reportError: errorCode
tstUPreturnFalse <primitive: 10046 errorCode: errorCode> ^self reportError: errorCode
tstUPreturnHandle: aHandle <primitive: 10047 errorCode: errorCode> ^self reportError: errorCode
tstUPreturnNil <primitive: 10048 errorCode: errorCode> ^self reportError: errorCode
tstUPreturnTrue <primitive: 10049 errorCode: errorCode> ^self reportError: errorCode
tstUPsignalSem: sem <primitive: 10060 errorCode: errorCode> ^self reportError: errorCode
tstUPSTtoCbool: bool <primitive: 10005 errorCode: errorCode> ^self reportError: errorCode
tstUPSTtoCchar: aChar <primitive: 10006 errorCode: errorCode> ^self reportError: errorCode
tstUPSTtoCdouble: dbl <primitive: 10065 errorCode: errorCode> ^self reportError: errorCode
tstUPSTtoCfloat: aFloat <primitive: 10007 errorCode: errorCode> ^self reportError: errorCode
tstUPSTtoCint: aInt <primitive: 10008 errorCode: errorCode> ^self reportError: errorCode
</methods> <methods> Examples.UserPrimitiveTests <category>private</category>
message: aString Transcript show: ' -- ', aString. ^self error: aString printString
reportError: errorCode ^self class raiseError: errorCode
</methods>