Feat: done

This commit is contained in:
2025-10-08 19:24:13 +08:00
commit 96982b9ae9
9 changed files with 100 additions and 0 deletions

21
reverse_test.go Normal file
View File

@@ -0,0 +1,21 @@
package reverse
import "testing"
func TestReverse(t *testing.T) {
tcs := []struct {
input string
expects string
}{
{"Hello 世界", "界世 olleH"},
}
for _, tc := range tcs {
b := []byte(tc.input)
reverse(b)
ret := string(b)
if ret != tc.expects {
t.Errorf("Failed to remove unicode space. Input: %s, expects: %s, results: %s", tc.input, tc.expects, ret)
}
}
}