Skip to content

Commit 8aaa016

Browse files
committed
- Updated MessagePackTest for a new string decoding behavior
1 parent cb06306 commit 8aaa016

File tree

7 files changed

+11
-7
lines changed

7 files changed

+11
-7
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
private
22
createByteStringSized: size
3-
^ (self createRawBytesSized: size) asString
3+
^self createStringSized: size

repository/MessagePackTest.package/MpPackUnpackTestCase.class/instance/testPackUnpackRawBytes.st

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@ testPackUnpackRawBytes
44
self rawBytesArray do: [:each | | packed unpacked |
55
packed := each messagePacked: [:settings | settings formatVersion: 2008].
66
self should: [packed isMemberOf: ByteArray].
7-
unpacked := Object fromMessagePack: packed.
7+
"For invalid utf8 bytearray, we need more setting"
8+
"
9+
unpacked := Object fromMessagePack: packed] on: Error do: [ :ex | ex return ].
810
self should: [self collectionEquals: unpacked asByteArray with: each].
11+
"
912
unpacked := Object fromMessagePack: packed setting: [:settings | settings formatVersion: 2008].
1013
self should: [self collectionEquals: unpacked with: each]
1114
]

repository/MessagePackTest.package/MpPackUnpackTestCase.class/methodProperties.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"complexCollectionSizes" : "mu 5/1/2011 23:44",
77
"complexMapsArray" : "mu 5/1/2011 23:56",
88
"createArraySized:" : "mu 6/23/2011 12:10",
9-
"createByteStringSized:" : "mu 8/25/2013 23:44",
9+
"createByteStringSized:" : "MasashiUmezawa 11/12/2016 23:44",
1010
"createComplexArraySized:" : "mu 6/23/2011 12:11",
1111
"createComplexMapSized:" : "mu 6/23/2011 12:11",
1212
"createExtSized:" : "mu 12/8/2013 14:49",
@@ -36,7 +36,7 @@
3636
"testPackUnpackInteger" : "mu 5/1/2011 21:33",
3737
"testPackUnpackMap" : "mu 6/23/2011 12:44",
3838
"testPackUnpackNil" : "MasashiUmezawa 5/18/2015 10:45",
39-
"testPackUnpackRawBytes" : "mu 8/26/2013 00:09",
39+
"testPackUnpackRawBytes" : "MasashiUmezawa 11/13/2016 00:05",
4040
"testPackUnpackStrBytes" : "mu 8/25/2013 23:49",
4141
"testPackUnpackSymbolBytes" : "MasashiUmezawa 6/4/2016 14:24",
4242
"testPackUnpackTrue" : "MasashiUmezawa 5/18/2015 10:47" } }

repository/MessagePackTest.package/MpSettingsTestCase.class/methodProperties.json

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
"arrayWithUnknown" : "MasashiUmezawa 2/2/2013 20:58",
77
"complexDictionaryAfterConverted" : "MasashiUmezawa 2/2/2013 21:50",
88
"complexIdentityDictionary" : "MasashiUmezawa 2/2/2013 20:28",
9-
"createStringSized:" : "MasashiUmezawa 2/2/2013 21:20",
109
"dictionaryWithNil" : "MasashiUmezawa 2/2/2013 21:01",
1110
"dictionaryWithUnknown" : "MasashiUmezawa 2/2/2013 21:02",
1211
"simpleIdentityDictionary" : "MasashiUmezawa 2/2/2013 20:19",
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
private
22
createStringSized: size
3-
^ self newCollection: String sized: size withAll: (Character value: (self atRandom: 255))
3+
"TODO - create utf8 string"
4+
^ self newCollection: String sized: size withAll: (Character value: (32 + (self atRandom: 94)))

repository/MessagePackTest.package/MpTestCase.class/methodProperties.json

+1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@
44
"instance" : {
55
"atRandom:" : "mu 6/23/2011 12:08",
66
"collectionEquals:with:" : "mu 6/23/2011 12:42",
7+
"createStringSized:" : "MasashiUmezawa 11/12/2016 23:44",
78
"newCollection:sized:withAll:" : "mu 6/23/2011 12:09" } }

repository/MessagePackTest.package/monticello.meta/version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
(name 'MessagePackTest-MasashiUmezawa.13' message 'Added #testPackUnpackSymbolBytes' id '19b6a570-5d88-884e-bf66-5f1ca9d3dafb' date '4 June 2016' time '2:24:24.077615 pm' author 'MasashiUmezawa' ancestors ((name 'MessagePackTest-MasashiUmezawa.12' message '- Changed tests for older format' id '7917bb4f-8326-4932-bb01-bf96b1b8542f' date '21 June 2015' time '8:36:04.342843 pm' author 'MasashiUmezawa' ancestors ((name 'MessagePackTest-MasashiUmezawa.11' message 'Renamed MpConstants typecode methods for compatibility with GemStone.https://github.com/msgpack/msgpack-smalltalk/issues/4' id '0743d0ea-4883-40eb-8632-c39dad337679' date '18 May 2015' time '10:55:09.715775 am' author 'MasashiUmezawa' ancestors ((name 'MessagePackTest-mu.10' message '-Added testPackUnpackExt, testPackUnpackFixExt test cases' id 'd9431577-e13c-724a-b3ff-642435692c12' date '8 December 2013' time '3:47:56.186 pm' author 'mu' ancestors ((name 'MessagePackTest-MasashiUmezawa.9' message '-Fixed MpStringUnpackTestCase>>testUnpackString8 to run on Pharo' id '4fedb785-bf5b-bb42-9245-6a0b2973d013' date '15 October 2013' time '1:07:32.7 am' author 'MasashiUmezawa' ancestors ((name 'MessagePackTest-mu.8' message '- Added PackUnpack tests for new Binary type- Added tests for String (formerly Raw) type' id '5f057f80-8c27-084b-89b1-5c3cc7ae9f9c' date '26 August 2013' time '12:34:48.825 am' author 'mu' ancestors ((name 'MessagePackTest-mu.7' message 'Added decoder tests for str8, bin8, bin16, bin32.See the proposal: https://gist.github.com/frsyuki/5432559' id 'da119030-ed83-6241-847c-2795a61d804a' date '12 August 2013' time '1:41:12.542 am' author 'mu' ancestors ((name 'MessagePackTest-MasashiUmezawa.6' message 'Avoid sending #asByteArray for portability' id 'c9be1c45-49c4-8947-93d5-16ccbf7e7df3' date '2 February 2013' time '10:02:03.626 pm' author 'MasashiUmezawa' ancestors ((name 'MessagePackTest-MasashiUmezawa.5' message 'Confirmed all tests are green' id '9667ec89-9c26-1c46-8a89-fad027e006bc' date '2 February 2013' time '9:57:02.029 pm' author 'MasashiUmezawa' ancestors ((name 'MessagePackTest-MasashiUmezawa.4' message 'Adding test cases for new encode/decode options' id '61bbf0a0-053d-c24c-bd29-8332d8e99a57' date '2 February 2013' time '9:36:55.589 pm' author 'MasashiUmezawa' ancestors ((name 'MessagePackTest-mu.3' message 'Changes for portablity' id '06a6b0a5-0061-104a-bec2-a82f96c6a87c' date '23 June 2011' time '5:09:30.249 pm' author 'mu' ancestors ((name 'MessagePackTest-mu.2' message 'empty log message' id '77d3b945-c29d-c34f-84e7-81b255f6a638' date '2 May 2011' time '12:02:08.182 am' author 'mu' ancestors ((name 'MessagePackTest-mu.1' message 'empty log message' id '0ba4d187-aa2e-c94d-8aed-2dd83925c6b8' date '1 May 2011' time '11:43:57.135 pm' author 'mu' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())
1+
(name 'MessagePackTest-MasashiUmezawa.14' message 'Updated test fixtures of string creation' id 'b17145fb-55d1-3d49-90ff-4698af2a186b' date '13 November 2016' time '12:06:57.527191 am' author 'MasashiUmezawa' ancestors ((name 'MessagePackTest-MasashiUmezawa.13' message 'Added #testPackUnpackSymbolBytes' id '19b6a570-5d88-884e-bf66-5f1ca9d3dafb' date '4 June 2016' time '2:24:24.077615 pm' author 'MasashiUmezawa' ancestors ((name 'MessagePackTest-MasashiUmezawa.12' message '- Changed tests for older format' id '7917bb4f-8326-4932-bb01-bf96b1b8542f' date '21 June 2015' time '8:36:04.342843 pm' author 'MasashiUmezawa' ancestors ((name 'MessagePackTest-MasashiUmezawa.11' message 'Renamed MpConstants typecode methods for compatibility with GemStone.https://github.com/msgpack/msgpack-smalltalk/issues/4' id '0743d0ea-4883-40eb-8632-c39dad337679' date '18 May 2015' time '10:55:09.715775 am' author 'MasashiUmezawa' ancestors ((name 'MessagePackTest-mu.10' message '-Added testPackUnpackExt, testPackUnpackFixExt test cases' id 'd9431577-e13c-724a-b3ff-642435692c12' date '8 December 2013' time '3:47:56.186 pm' author 'mu' ancestors ((name 'MessagePackTest-MasashiUmezawa.9' message '-Fixed MpStringUnpackTestCase>>testUnpackString8 to run on Pharo' id '4fedb785-bf5b-bb42-9245-6a0b2973d013' date '15 October 2013' time '1:07:32.7 am' author 'MasashiUmezawa' ancestors ((name 'MessagePackTest-mu.8' message '- Added PackUnpack tests for new Binary type- Added tests for String (formerly Raw) type' id '5f057f80-8c27-084b-89b1-5c3cc7ae9f9c' date '26 August 2013' time '12:34:48.825 am' author 'mu' ancestors ((name 'MessagePackTest-mu.7' message 'Added decoder tests for str8, bin8, bin16, bin32.See the proposal: https://gist.github.com/frsyuki/5432559' id 'da119030-ed83-6241-847c-2795a61d804a' date '12 August 2013' time '1:41:12.542 am' author 'mu' ancestors ((name 'MessagePackTest-MasashiUmezawa.6' message 'Avoid sending #asByteArray for portability' id 'c9be1c45-49c4-8947-93d5-16ccbf7e7df3' date '2 February 2013' time '10:02:03.626 pm' author 'MasashiUmezawa' ancestors ((name 'MessagePackTest-MasashiUmezawa.5' message 'Confirmed all tests are green' id '9667ec89-9c26-1c46-8a89-fad027e006bc' date '2 February 2013' time '9:57:02.029 pm' author 'MasashiUmezawa' ancestors ((name 'MessagePackTest-MasashiUmezawa.4' message 'Adding test cases for new encode/decode options' id '61bbf0a0-053d-c24c-bd29-8332d8e99a57' date '2 February 2013' time '9:36:55.589 pm' author 'MasashiUmezawa' ancestors ((name 'MessagePackTest-mu.3' message 'Changes for portablity' id '06a6b0a5-0061-104a-bec2-a82f96c6a87c' date '23 June 2011' time '5:09:30.249 pm' author 'mu' ancestors ((name 'MessagePackTest-mu.2' message 'empty log message' id '77d3b945-c29d-c34f-84e7-81b255f6a638' date '2 May 2011' time '12:02:08.182 am' author 'mu' ancestors ((name 'MessagePackTest-mu.1' message 'empty log message' id '0ba4d187-aa2e-c94d-8aed-2dd83925c6b8' date '1 May 2011' time '11:43:57.135 pm' author 'mu' ancestors () stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())) stepChildren ())

0 commit comments

Comments
 (0)