@@ -376,6 +376,7 @@ 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" <-> "𐀂"
379
380
var stringSetValue := AttributeValue. SS (["&","。","\ud800\udc02"]);
380
381
// Note that string values are UTF-8 encoded, but sorted by UTF-16 encoding.
381
382
var encodedStringSetData := StructuredDataTerminal (value := [
@@ -395,6 +396,7 @@ module DynamoToStructTest {
395
396
396
397
var newStringSetValue := StructuredToAttr (encodedStringSetData);
397
398
expect newStringSetValue. Success?;
399
+ // "\ud800\udc02" <-> "𐀂"
398
400
expect newStringSetValue. value == AttributeValue. SS (["&","\ud800\udc02","。"]);
399
401
}
400
402
@@ -415,10 +417,12 @@ module DynamoToStructTest {
415
417
416
418
method {:test} TestSetsInListAreSorted () {
417
419
var nSetValue := AttributeValue. NS (["2","1","10"]);
420
+ // "\ud800\udc02" <-> "𐀂"
418
421
var sSetValue := AttributeValue. SS (["&","。","\ud800\udc02"]);
419
422
var bSetValue := AttributeValue. BS ([[1,0],[1],[2]]);
420
423
421
424
var sortedNSetValue := AttributeValue. NS (["1","10","2"]);
425
+ // "\ud800\udc02" <-> "𐀂"
422
426
var sortedSSetValue := AttributeValue. SS (["&","\ud800\udc02","。"]);
423
427
var sortedBSetValue := AttributeValue. BS ([[1],[1,0],[2]]);
424
428
@@ -444,10 +448,12 @@ module DynamoToStructTest {
444
448
445
449
method {:test} TestSetsInMapAreSorted () {
446
450
var nSetValue := AttributeValue. NS (["2","1","10"]);
451
+ // "\ud800\udc02" <-> "𐀂"
447
452
var sSetValue := AttributeValue. SS (["&","。","\ud800\udc02"]);
448
453
var bSetValue := AttributeValue. BS ([[1,0],[1],[2]]);
449
454
450
455
var sortedNSetValue := AttributeValue. NS (["1","10","2"]);
456
+ // "\ud800\udc02" <-> "𐀂"
451
457
var sortedSSetValue := AttributeValue. SS (["&","\ud800\udc02","。"]);
452
458
var sortedBSetValue := AttributeValue. BS ([[1],[1,0],[2]]);
453
459
@@ -490,6 +496,7 @@ module DynamoToStructTest {
490
496
method {:test} TestSortMapKeys () {
491
497
var nullValue := AttributeValue. NULL (true);
492
498
499
+ // "\ud800\udc02" <-> "𐀂"
493
500
var mapValue := AttributeValue. M (map["&" := nullValue, "。" := nullValue, "\ud800\udc02" := nullValue]);
494
501
495
502
// Note that the string values are encoded as UTF-8, but are sorted according to UTF-16 encoding.
0 commit comments