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.
23 lines
478 B
23 lines
478 B
// 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) |
|
} |
|
} |
|
}
|
|
|