@@ -11,7 +11,7 @@ func TestBytesToUnicode(t *testing.T) {
1111 is := assert .New (t )
1212
1313 // Most useful test E.V.E.R ^^
14- want := map [rune ]string {
14+ want := map [byte ]string {
1515 0 : "Ā" ,
1616 1 : "ā" ,
1717 2 : "Ă" ,
@@ -454,11 +454,10 @@ func TestNewEncoder_encode(t *testing.T) {
454454 is .EqualValues (want , got )
455455 is .Nil (err )
456456
457- // @TODO
458- // want = []int{31373, 50169, 233, 995, 12520, 234, 235, 770, 318, 257, 890, 4731, 284, 1332, 1771, 393, 407, 262, 44805, 2071, 373, 5969, 0}
459- // got, err = encoder.Encode("hello 👋 world 🌍 This is a long string to test whether or not the emoji issue was fixed!")
460- // is.EqualValues(want, got)
461- // is.Nil(err)
457+ want = []int {31373 , 50169 , 233 , 995 , 12520 , 234 , 235 , 770 , 318 , 257 , 890 , 4731 , 284 , 1332 , 1771 , 393 , 407 , 262 , 44805 , 2071 , 373 , 5969 , 0 }
458+ got , err = encoder .Encode ("hello 👋 world 🌍 This is a long string to test whether or not the emoji issue was fixed!" )
459+ is .EqualValues (want , got )
460+ is .Nil (err )
462461}
463462
464463func TestNewEncoder_decode (t * testing.T ) {
@@ -471,10 +470,9 @@ func TestNewEncoder_decode(t *testing.T) {
471470 got := encoder .Decode ([]int {31373 , 995 , 770 , 318 , 257 , 890 , 4731 , 284 , 1332 , 1771 , 393 , 407 , 262 , 44805 , 2071 , 373 , 5969 , 0 })
472471 is .EqualValues (want , got )
473472
474- // @TODO
475- // want = "hello 👋 world 🌍 This is a long string to test whether or not the emoji issue was fixed!"
476- // got = encoder.Decode([]int{31373, 50169, 233, 995, 12520, 234, 235, 770, 318, 257, 890, 4731, 284, 1332, 1771, 393, 407, 262, 44805, 2071, 373, 5969, 0})
477- // is.EqualValues(want, got)
473+ want = "hello 👋 world 🌍 This is a long string to test whether or not the emoji issue was fixed!"
474+ got = encoder .Decode ([]int {31373 , 50169 , 233 , 995 , 12520 , 234 , 235 , 770 , 318 , 257 , 890 , 4731 , 284 , 1332 , 1771 , 393 , 407 , 262 , 44805 , 2071 , 373 , 5969 , 0 })
475+ is .EqualValues (want , got )
478476}
479477
480478func TestNewEncoder_e2e (t * testing.T ) {
@@ -489,7 +487,8 @@ func TestNewEncoder_e2e(t *testing.T) {
489487 lo .T2 ("\t " , []int {197 }),
490488 lo .T2 ("This is some text" , []int {1212 , 318 , 617 , 2420 }),
491489 lo .T2 ("indivisible" , []int {521 , 452 , 12843 }),
492- // lo.T2("hello 👋 world 🌍", []int{31373, 50169, 233, 995, 12520, 234, 235}), // @TODO
490+ lo .T2 ("hello 👋 world 🌍" , []int {31373 , 50169 , 233 , 995 , 12520 , 234 , 235 }),
491+ lo .T2 ("hello, 世界" , []int {31373 , 11 , 220 , 10310 , 244 , 45911 , 234 }),
493492 }
494493
495494 for _ , c := range cases {
0 commit comments