MCPcopy Create free account
hub / github.com/NextDotID/proof_server / TestDecodeString

Function TestDecodeString

util/base1024/decode_test.go:8–29  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

6)
7
8func TestDecodeString(t *testing.T) {
9 t.Run("Equally", func(t *testing.T) {
10 str := "🐟🔂🏁🤖💧🚊😤"
11 res, err := DecodeString(str)
12 assert.Nil(t, err)
13 assert.Equal(t, "Maskbook", string(res))
14 })
15
16 t.Run("Not Equal", func(t *testing.T) {
17 str := "🐟🔂🏁🤖💧"
18 res, err := DecodeString(str)
19 assert.Nil(t, err)
20 assert.NotEqual(t, "Maskbook", string(res))
21 })
22
23 t.Run("Decode Playload", func(t *testing.T) {
24 str := "👲🍚🍾🔆🏠🚱👧🦢🕟🛷🔭💘😝🙂🚳🦜🔙🔊🚗🏏👪🛹🗣🏳🦐🥫🦺🚎🕗🚷💡🚁🎟🗯📰🐊🕳🥠💐🎛🤵🆘🔣📥🦝🔉🌊🥠🥅🍏🥜🃏"
25 res, err := DecodeString(str)
26 assert.Nil(t, err)
27 assert.NotEqual(t, "Maskbook", string(res))
28 })
29}

Callers

nothing calls this directly

Calls 1

DecodeStringFunction · 0.70

Tested by

no test coverage detected