mirror of
https://github.com/weloe/token-go.git
synced 2025-10-07 08:20:56 +08:00
feat: support SSO
This commit is contained in:
22
util/util_test.go
Normal file
22
util/util_test.go
Normal file
@@ -0,0 +1,22 @@
|
||||
package util
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestAppendStr(t *testing.T) {
|
||||
strings := []string{"1", "2"}
|
||||
str := AppendStr(strings, "1")
|
||||
str = AppendStr(str, "3")
|
||||
for i, s := range strings {
|
||||
if s == "1" && i == 2 {
|
||||
t.Errorf("AppendStr() = %v, want %v", str, []string{"1", "2"})
|
||||
}
|
||||
|
||||
}
|
||||
for i, s := range strings {
|
||||
if i == 2 && s != "3" {
|
||||
t.Errorf("AppendStr() = %v, want %v", str, []string{"1", "2", "3"})
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user