[squeak-dev] FFI: FFI-Tests-mt.58.mcz
commits at source.squeak.org
commits at source.squeak.org
Thu Aug 12 07:53:04 UTC 2021
Marcel Taeumel uploaded a new version of FFI-Tests to project FFI:
http://source.squeak.org/FFI/FFI-Tests-mt.58.mcz
==================== Summary ====================
Name: FFI-Tests-mt.58
Author: mt
Time: 12 August 2021, 9:53:04.107222 am
UUID: 671dd049-38c6-0949-a162-ea48c6d38cb0
Ancestors: FFI-Tests-mt.57
Adds test for recent bugfixes.
=============== Diff against FFI-Tests-mt.57 ===============
Item was added:
+ ----- Method: ExternalTypeTests>>testCompilationOrder (in category 'tests - compiled spec') -----
+ testCompilationOrder
+
+ | order target requirements |
+ order := ExternalStructure allStructuresInCompilationOrder readStream.
+ target := #FFITestCompoundStruct.
+ requirements := #( FFISmallStruct1 FFITestPoint2 FFITestPoint4 ).
+ requirements, {target} do: [:nextClassName |
+ [order peek name ~= nextClassName] whileTrue: [
+ self
+ assert: order next name ~= target
+ description: 'Could not find expected compilation order for ', target;
+ deny: order atEnd
+ description: 'Compilation units missing!!'].
+ order reset].!
Item was added:
+ ----- Method: ExternalTypeTests>>testCompilationOrderParseBasicType (in category 'tests - compiled spec') -----
+ testCompilationOrderParseBasicType
+ "Compilation order is computed by checking the basic types as prerequisites. So, any elaborate typeName must be parsed into its basic form."
+
+ #(
+ 'int32_t' 'int32_t'
+ 'int32_t*' 'int32_t'
+ 'MyStruct' 'MyStruct'
+ 'MyStruct*' 'MyStruct'
+
+ 'int32_t[]' 'int32_t'
+ 'int32_t[5]' 'int32_t'
+ 'int32_t*[]' 'int32_t'
+ 'int32_t*[5]' 'int32_t'
+
+ '(int32_t[])*' 'int32_t'
+ '(int32_t[5])*' 'int32_t'
+ '(int32_t*[])*' 'int32_t'
+ '(int32_t*[5])*' 'int32_t'
+
+ 'MyStructPtr' 'MyStructPtr'
+ 'MyStructPtr[5]' 'MyStructPtr'
+ '(MyStructPtr[5])*' 'MyStructPtr'
+ '*MyStructPtr' 'MyStructPtr'
+ '(*MyStructPtr)[5]' 'MyStructPtr'
+ '((*MyStructPtr)[5])*' 'MyStructPtr'
+
+ ) groupsDo: [:typeName :basicTypeName |
+ self
+ assert: basicTypeName
+ equals: (ExternalType parseBasicTypeName: typeName)]!
More information about the Squeak-dev
mailing list
|