Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(821)

Unified Diff: logdog/client/annotee/annotation/annotation_test.go

Issue 2994593004: [annotee] add SOURCE_MANIFEST annotation. (Closed)
Patch Set: rename to deployment_manifests Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: logdog/client/annotee/annotation/annotation_test.go
diff --git a/logdog/client/annotee/annotation/annotation_test.go b/logdog/client/annotee/annotation/annotation_test.go
index 3921d77d9b4d32a45231119aa4eb1206d266e377..98b6e27761c5f4dc42d315d2bfb0f0115c3979c0 100644
--- a/logdog/client/annotee/annotation/annotation_test.go
+++ b/logdog/client/annotee/annotation/annotation_test.go
@@ -145,7 +145,7 @@ func playAnnotationScript(t *testing.T, name string, st *State) (string, error)
scanner := bufio.NewScanner(f)
var nextErr string
- for scanner.Scan() {
+ for lineNo := 1; scanner.Scan(); lineNo++ {
// Trim, discard empty lines and comment lines.
line := strings.TrimLeftFunc(scanner.Text(), unicode.IsSpace)
if len(line) == 0 || strings.HasPrefix(line, "#") {
@@ -167,10 +167,10 @@ func playAnnotationScript(t *testing.T, name string, st *State) (string, error)
nextErr = ""
if err == nil {
- return "", fmt.Errorf("expected error, but didn't encounter it: %q", expectedErr)
+ return "", fmt.Errorf("line %d: expected error, but didn't encounter it: %q", lineNo, expectedErr)
}
if !strings.Contains(err.Error(), expectedErr) {
- return "", fmt.Errorf("expected error %q, but got: %v", expectedErr, err)
+ return "", fmt.Errorf("line %d: expected error %q, but got: %v", lineNo, expectedErr, err)
}
} else if err != nil {
return "", err
« no previous file with comments | « logdog/client/annotee/annotation/annotation.go ('k') | logdog/client/annotee/annotation/test_data/coverage.annotations.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698