[squeak-dev] FFI: FFI-Tests-mt.65.mcz
commits at source.squeak.org
commits at source.squeak.org
Thu Sep 16 09:49:11 UTC 2021
Marcel Taeumel uploaded a new version of FFI-Tests to project FFI:
http://source.squeak.org/FFI/FFI-Tests-mt.65.mcz
==================== Summary ====================
Name: FFI-Tests-mt.65
Author: mt
Time: 16 September 2021, 11:49:09.677662 am
UUID: 44aeda08-104d-f844-add1-43d453c70bf3
Ancestors: FFI-Tests-mt.64
Complements FFI-Pools-mt.39 and FFI-Kernel-mt.220
=============== Diff against FFI-Tests-mt.64 ===============
Item was changed:
----- Method: ExternalTypeTests>>testIntegerTypesAsCharTypes (in category 'tests - atomic integer types') -----
testIntegerTypesAsCharTypes
#( int8_t int16_t int32_t ) do: [:typeName |
| integerType |
integerType := ExternalType typeNamed: typeName.
self
+ deny: integerType isCharType;
- assert: integerType isSigned;
assert: integerType asCharType isCharType;
assert: integerType byteSize equals: integerType asCharType byteSize;
- assert: integerType isSigned equals: integerType asCharType isSigned;
+ deny: integerType asUnsigned isCharType;
- assert: integerType asUnsigned isUnsigned;
assert: integerType asUnsigned asCharType isCharType;
+ assert: integerType asUnsigned byteSize equals: integerType asUnsigned asCharType byteSize].!
- assert: integerType asUnsigned byteSize equals: integerType asUnsigned asCharType byteSize;
- assert: integerType asUnsigned isUnsigned equals: integerType asUnsigned asCharType isUnsigned].!
Item was changed:
----- Method: FFIPluginTests>>expectedFailures (in category 'failures') -----
expectedFailures
^ #(
testIntAliasCallReturnIntAlias "return-type coercing failed - check referentClass notNil missing?"
testIntCallReturnIntAlias "return-type coercing failed - check referentClass notNil missing?"
testMixedDoublesAndLongsSum "more than 15 method args needed"
+ testSumStructSslf4 "some overflow issue, maybe expected"
+ testPrintWideString "no support for WideString arguments yet")!
- testSumStructSslf4 "some overflow issue, maybe expected")!
Item was added:
+ ----- Method: FFIPluginTests>>testPrintWideString (in category 'tests - other') -----
+ testPrintWideString
+
+ | string result |
+ string := 'Hello World!!', (Character value: 1024).
+ result := self invoke: 'ffiPrintWideString' with: string.
+ self assert: result = string.!
Item was added:
+ ----- Method: FFITestLibrary class>>ffiPrintWideString: (in category 'other') -----
+ ffiPrintWideString: aString
+ "
+ FFITestLibrary ffiPrintString: 'Hello'
+ "
+ <cdecl: uchar32_t* 'ffiPrintString' (uchar32_t *) module:'SqueakFFIPrims'>
+ ^self externalCallFailed!
More information about the Squeak-dev
mailing list
|