Lines Matching refs:expected

29 func AssertSame(t *testing.T, message string, expected interface{}, actual interface{}) {
31 if actual != expected {
32 t.Errorf("%s: expected:\n%#v\nactual:\n%#v", message, expected, actual)
38 func AssertBoolEquals(t *testing.T, message string, expected bool, actual bool) {
40 if actual != expected {
41 t.Errorf("%s: expected %t, actual %t", message, expected, actual)
47 func AssertIntEquals(t *testing.T, message string, expected int, actual int) {
49 if actual != expected {
50 t.Errorf("%s: expected %d, actual %d", message, expected, actual)
56 func AssertStringEquals(t *testing.T, message string, expected string, actual string) {
58 if actual != expected {
59 t.Errorf("%s: expected %s, actual %s", message, expected, actual)
65 func AssertPathRelativeToTopEquals(t *testing.T, message string, expected string, actual Path) {
67 AssertStringEquals(t, message, expected, PathRelativeToTop(actual))
72 func AssertPathsRelativeToTopEquals(t *testing.T, message string, expected []string, actual Paths) {
74 AssertDeepEquals(t, message, expected, PathsRelativeToTop(actual))
79 func AssertStringPathRelativeToTopEquals(t *testing.T, message string, config Config, expected stri…
81 AssertStringEquals(t, message, expected, StringPathRelativeToTop(config.soongOutDir, actual))
86 func AssertStringPathsRelativeToTopEquals(t *testing.T, message string, config Config, expected []s…
88 AssertDeepEquals(t, message, expected, StringPathsRelativeToTop(config.soongOutDir, actual))
94 func AssertErrorMessageEquals(t *testing.T, message string, expected string, actual error) {
98 } else if actual.Error() != expected {
99 t.Errorf("%s: expected %s, actual %s", message, expected, actual.Error())
106 func AssertTrimmedStringEquals(t *testing.T, message string, expected string, actual string) {
108 AssertStringEquals(t, message, strings.TrimSpace(expected), strings.TrimSpace(actual))
133 func AssertStringContainsEquals(t *testing.T, message string, s string, substring string, expected
134 if expected {
177 func AssertStringListContainsEquals(t *testing.T, message string, list []string, s string, expected
179 if expected {
188 func AssertArrayString(t *testing.T, message string, expected, actual []string) { argument
190 if len(actual) != len(expected) {
191 …t.Errorf("%s: expected %d (%q), actual (%d) %q", message, len(expected), expected, len(actual), ac…
195 if actual[i] != expected[i] {
197 message, i, expected[i], expected, actual[i], actual)
206 func AssertPathsEndWith(t *testing.T, message string, expected []string, actual []Path) {
208 if len(expected) != len(actual) {
209 t.Errorf("%s (length): expected %d, actual %d", message, len(expected), len(actual))
212 for i := range expected {
213 if !strings.HasSuffix(actual[i].String(), expected[i]) {
214 t.Errorf("%s (item %d): expected '%s', actual '%s'", message, i, expected[i], actual[i].String())
222 func AssertDeepEquals(t *testing.T, message string, expected interface{}, actual interface{}) {
224 if !reflect.DeepEqual(actual, expected) {
225 t.Errorf("%s: expected:\n %#v\n got:\n %#v", message, expected, actual)