mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-05 05:12:45 +08:00
27 lines
381 B
Go
27 lines
381 B
Go
package genutil
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
func TestValidDir(t *testing.T) {
|
|
_, err := OutDir("./")
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
}
|
|
|
|
func TestInvalidDir(t *testing.T) {
|
|
_, err := OutDir("./nondir")
|
|
if err == nil {
|
|
t.Fatal("expected an error")
|
|
}
|
|
}
|
|
|
|
func TestNotDir(t *testing.T) {
|
|
_, err := OutDir("./genutils_test.go")
|
|
if err == nil {
|
|
t.Fatal("expected an error")
|
|
}
|
|
}
|