mirror of https://github.com/mvdan/fdroidcl.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
478 B
24 lines
478 B
|
10 years ago
|
// Copyright (c) 2015, Daniel Martí <mvdan@mvdan.cc>
|
||
|
|
// See LICENSE for licensing information
|
||
|
|
|
||
|
|
package adb
|
||
|
|
|
||
|
|
import "testing"
|
||
|
|
|
||
|
|
func TestParseError(t *testing.T) {
|
||
|
|
tests := []struct {
|
||
|
|
in string
|
||
|
|
want error
|
||
|
|
}{
|
||
|
|
{"FAILED_DEXOPT", ErrDexopt},
|
||
|
|
{"PARSE_FAILED_NOT_APK", ErrNotApk},
|
||
|
|
{"FAILED_ABORTED", ErrAborted},
|
||
|
|
}
|
||
|
|
for _, c := range tests {
|
||
|
|
got := parseError(c.in)
|
||
|
|
if got != c.want {
|
||
|
|
t.Fatalf("Parse error in %s - wanted %v, got %v", c.in, c.want, got)
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|