mirror of
https://github.com/photoprism/photoprism.git
synced 2026-01-23 02:24:24 +00:00
21 lines
456 B
Go
21 lines
456 B
Go
package face
|
|
|
|
import "testing"
|
|
|
|
func TestParseEngine(t *testing.T) {
|
|
cases := map[string]EngineName{
|
|
"": EngineAuto,
|
|
"AUTO": EngineAuto,
|
|
"pigo": EnginePigo,
|
|
" PIGO ": EnginePigo,
|
|
"onnx": EngineONNX,
|
|
"OnNx": EngineONNX,
|
|
"unknown": EngineAuto,
|
|
}
|
|
|
|
for input, expected := range cases {
|
|
if got := ParseEngine(input); got != expected {
|
|
t.Fatalf("ParseEngine(%q) = %q, expected %q", input, got, expected)
|
|
}
|
|
}
|
|
}
|