@@ -376,15 +376,14 @@ module DynamoToStructTest {
376
376
// = type=test
377
377
// # Entries in a String Set MUST be ordered in ascending [UTF-16 binary order](./string-ordering.md#utf-16-binary-order).
378
378
method {:test} TestSortSSAttr () {
379
- // "\ud800\udc02" <-> "𐀂"
380
379
var stringSetValue := AttributeValue. SS (["&","。","\ud800\udc02"]);
381
380
// Note that string values are UTF-8 encoded, but sorted by UTF-16 encoding.
382
381
var encodedStringSetData := StructuredDataTerminal (value := [
383
382
0,0,0,3, // 3 entries in set
384
383
0,0,0,1, // 1st entry is 1 byte
385
384
0x26, // "&" in UTF-8 encoding
386
385
0,0,0,4, // 2nd entry is 4 bytes
387
- 0xF0,0x90,0x80,0x82, // "𐀂 " in UTF-8 encoding
386
+ 0xF0,0x90,0x80,0x82, // "\ud800\udc02 " in UTF-8 encoding
388
387
0,0,0,3, // 3rd entry is 3 bytes
389
388
0xEF,0xBD,0xA1 // "。" in UTF-8 encoding
390
389
],
@@ -396,7 +395,6 @@ module DynamoToStructTest {
396
395
397
396
var newStringSetValue := StructuredToAttr (encodedStringSetData);
398
397
expect newStringSetValue. Success?;
399
- // "\ud800\udc02" <-> "𐀂"
400
398
expect newStringSetValue. value == AttributeValue. SS (["&","\ud800\udc02","。"]);
401
399
}
402
400
@@ -417,12 +415,10 @@ module DynamoToStructTest {
417
415
418
416
method {:test} TestSetsInListAreSorted () {
419
417
var nSetValue := AttributeValue. NS (["2","1","10"]);
420
- // "\ud800\udc02" <-> "𐀂"
421
418
var sSetValue := AttributeValue. SS (["&","。","\ud800\udc02"]);
422
419
var bSetValue := AttributeValue. BS ([[1,0],[1],[2]]);
423
420
424
421
var sortedNSetValue := AttributeValue. NS (["1","10","2"]);
425
- // "\ud800\udc02" <-> "𐀂"
426
422
var sortedSSetValue := AttributeValue. SS (["&","\ud800\udc02","。"]);
427
423
var sortedBSetValue := AttributeValue. BS ([[1],[1,0],[2]]);
428
424
@@ -448,12 +444,10 @@ module DynamoToStructTest {
448
444
449
445
method {:test} TestSetsInMapAreSorted () {
450
446
var nSetValue := AttributeValue. NS (["2","1","10"]);
451
- // "\ud800\udc02" <-> "𐀂"
452
447
var sSetValue := AttributeValue. SS (["&","。","\ud800\udc02"]);
453
448
var bSetValue := AttributeValue. BS ([[1,0],[1],[2]]);
454
449
455
450
var sortedNSetValue := AttributeValue. NS (["1","10","2"]);
456
- // "\ud800\udc02" <-> "𐀂"
457
451
var sortedSSetValue := AttributeValue. SS (["&","\ud800\udc02","。"]);
458
452
var sortedBSetValue := AttributeValue. BS ([[1],[1,0],[2]]);
459
453
@@ -496,7 +490,6 @@ module DynamoToStructTest {
496
490
method {:test} TestSortMapKeys () {
497
491
var nullValue := AttributeValue. NULL (true);
498
492
499
- // "\ud800\udc02" <-> "𐀂"
500
493
var mapValue := AttributeValue. M (map["&" := nullValue, "。" := nullValue, "\ud800\udc02" := nullValue]);
501
494
502
495
// Note that the string values are encoded as UTF-8, but are sorted according to UTF-16 encoding.
@@ -507,7 +500,7 @@ module DynamoToStructTest {
507
500
0x26, // "&" UTF-8 encoded
508
501
0,0, 0,0,0,0, // null value
509
502
0,1, 0,0,0,4, // 2nd key is a string 4 bytes long
510
- 0xF0, 0x90, 0x80, 0x82, // "𐀂 " UTF-8 encoded
503
+ 0xF0, 0x90, 0x80, 0x82, // "\ud800\udc02 " UTF-8 encoded
511
504
0,0, 0,0,0,0, // null value
512
505
0,1, 0,0,0,3, // 3rd key is a string 3 bytes long
513
506
0xEF, 0xBD, 0xA1, // "。"
0 commit comments