[squeak-dev] FFI: FFI-Tests-mt.62.mcz
commits at source.squeak.org
commits at source.squeak.org
Wed Aug 18 09:56:52 UTC 2021
Marcel Taeumel uploaded a new version of FFI-Tests to project FFI:
http://source.squeak.org/FFI/FFI-Tests-mt.62.mcz
==================== Summary ====================
Name: FFI-Tests-mt.62
Author: mt
Time: 18 August 2021, 11:56:50.753133 am
UUID: 3ed16468-cd62-8146-afe1-0403171c62b6
Ancestors: FFI-Tests-mt.61
Move image tests to new test case. Add manual checks for type integrity.
=============== Diff against FFI-Tests-mt.61 ===============
Item was removed:
- ----- Method: ExternalTypeTests>>testAllArrayTypes (in category 'tests - image') -----
- testAllArrayTypes
-
- ExternalType allArrayTypes do: [:type |
- self
- deny: type isAtomic;
- deny: type isPointerType;
- deny: type isStructureType;
- assert: type isArrayType].!
Item was removed:
- ----- Method: ExternalTypeTests>>testAllAtomicTypes (in category 'tests - image') -----
- testAllAtomicTypes
-
- ExternalType allAtomicTypes do: [:type |
- self
- assert: type isAtomic;
- deny: type isPointerType;
- deny: type isStructureType;
- deny: type isArrayType].!
Item was removed:
- ----- Method: ExternalTypeTests>>testAllPointerTypes (in category 'tests - image') -----
- testAllPointerTypes
-
- ExternalType allPointerTypes do: [:type |
- self
- deny: type isAtomic;
- assert: type isPointerType;
- deny: type isStructureType;
- deny: type isArrayType].!
Item was removed:
- ----- Method: ExternalTypeTests>>testAllStructureTypes (in category 'tests - image') -----
- testAllStructureTypes
-
- ExternalType allStructTypes do: [:type |
- self
- deny: type isAtomic;
- deny: type isPointerType;
- assert: type isStructureType;
- deny: type isArrayType].!
Item was added:
+ TestCase subclass: #FFIImageTests
+ instanceVariableNames: ''
+ classVariableNames: ''
+ poolDictionaries: ''
+ category: 'FFI-Tests'!
Item was added:
+ ----- Method: FFIImageTests class>>checkPlatformChange (in category 'manual checks') -----
+ checkPlatformChange
+ "
+ self checkPlatformChange.
+ "
+ | old new bench |
+ old := FFIPlatformDescription newCurrent name: 'TEST'.
+ new := FFIPlatformDescription newCurrent.
+
+ self assert: [old ~= new].
+ bench := [ExternalType platformChangedFrom: old to: new] bench.
+ Transcript showln: bench.
+ self debug: #test05TypeIntegrity.
+ !
Item was added:
+ ----- Method: FFIImageTests class>>checkTypeIntegrity (in category 'manual checks') -----
+ checkTypeIntegrity
+ "
+ self checkTypeIntegrity.
+ "
+ ExternalType initializeFast.
+ self debug: #test05TypeIntegrity.
+
+ ExternalType initialize.
+ self debug: #test05TypeIntegrity.
+
+ ExternalType resetAllTypes.
+ self debug: #test05TypeIntegrity.!
Item was added:
+ ----- Method: FFIImageTests>>test01AllAtomicTypes (in category 'tests') -----
+ test01AllAtomicTypes
+
+ ExternalType allAtomicTypes do: [:type |
+ self
+ assert: type isAtomic;
+ deny: type isPointerType;
+ deny: type isStructureType;
+ deny: type isArrayType].!
Item was added:
+ ----- Method: FFIImageTests>>test02AllStructureTypes (in category 'tests') -----
+ test02AllStructureTypes
+
+ ExternalType allStructTypes do: [:type |
+ self
+ deny: type isAtomic;
+ deny: type isPointerType;
+ assert: type isStructureType;
+ deny: type isArrayType].!
Item was added:
+ ----- Method: FFIImageTests>>test03AllPointerTypes (in category 'tests') -----
+ test03AllPointerTypes
+
+ ExternalType allPointerTypes do: [:type |
+ self
+ deny: type isAtomic;
+ assert: type isPointerType;
+ deny: type isStructureType;
+ deny: type isArrayType].!
Item was added:
+ ----- Method: FFIImageTests>>test04AllArrayTypes (in category 'tests') -----
+ test04AllArrayTypes
+
+ ExternalType allArrayTypes do: [:type |
+ self
+ deny: type isAtomic;
+ deny: type isPointerType;
+ deny: type isStructureType;
+ assert: type isArrayType].!
Item was added:
+ ----- Method: FFIImageTests>>test05TypeIntegrity (in category 'tests') -----
+ test05TypeIntegrity
+
+ "ExternalType initialize."
+
+ #(atomicTypesDo: structTypesDo: pointerTypesDo: arrayTypesDo: typeAliasTypesDo:)
+ do: [:enumerator |
+ ExternalType perform: enumerator with: [:type |
+ self assert: type compiledSpec notNil.
+ self assert: type byteAlignment notNil.
+ self assert: type asPointerType notNil.
+ self assert: type asNonPointerType notNil.]].!
More information about the Squeak-dev
mailing list
|