Eliot Miranda uploaded a new version of VMMaker to project VM Maker:
http://source.squeak.org/VMMaker/VMMaker.oscog-eem.2478.mcz==================== Summary ====================
Name: VMMaker.oscog-eem.2478
Author: eem
Time: 29 October 2018, 4:59:10.970463 pm
UUID: 47ae35e3-969f-4af7-aa45-57121962de22
Ancestors: VMMaker.oscog-eem.2477
Fix a couple of tests
=============== Diff against VMMaker.oscog-eem.2477 ===============
Item was changed:
----- Method: MiscPrimitivePluginTest>>testCompressToByteArray (in category 'testing') -----
testCompressToByteArray
+ | bitmap byteArray n |
- | bitmap byteArray |
bitmap := Bitmap with: 16rFFFFFFFF.
+ byteArray := ByteArray new: 12. "Primitive makes an estimate; hence output must have at least 11 bytes"
+ n := self compress: bitmap toByteArray: byteArray.
+ self assert: n = 3.
+ self assert: #[1 5 255] equals: (byteArray copyFrom: 1 to: n)!
- byteArray := ByteArray new: 4.
- self compress: bitmap toByteArray: byteArray.
- self should: byteArray = #[1 5 255 0]!
Item was changed:
----- Method: MiscPrimitivePluginTest>>testDecompressFromByteArrayAt (in category 'testing') -----
testDecompressFromByteArrayAt
| bitmap byteArray s size |
+ byteArray := #[1 5 255].
- byteArray := #(1 5 255 0) asByteArray.
s := ReadStream on: byteArray.
size := Bitmap decodeIntFrom: s.
bitmap := Bitmap new: size.
self decompress: bitmap fromByteArray: byteArray at: s position + 1.
+ self assert: (Bitmap with: 16rFFFFFFFF) equals: bitmap!
- self should: bitmap = ((Bitmap new: 1) at: 1 put: 4294967295; yourself)!