Skip to content

Commit ccb0a08

Browse files
nobishinoccojocar
authored andcommittedMar 8, 2024
Fix test: update test to comply with the spec of generated sources
https://pkg.go.dev/cmd/go#hdr-Generate_Go_files_by_processing_source says: > This line must appear before the first non-comment, non-blank text in the file. Original test cases fail with the previous commit because test source does not comply with this spec. So, probably we should update test case to comply with the spec. (This is a breaking change, though)
1 parent 3a0ea51 commit ccb0a08

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎analyzer_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -498,8 +498,8 @@ var _ = Describe("Analyzer", func() {
498498
pkg := testutils.NewTestPackage()
499499
defer pkg.Close()
500500
pkg.AddFile("foo.go", `
501-
package foo
502501
// Code generated some-generator DO NOT EDIT.
502+
package foo
503503
func test() error {
504504
return nil
505505
}
@@ -541,8 +541,8 @@ var _ = Describe("Analyzer", func() {
541541
pkg := testutils.NewTestPackage()
542542
defer pkg.Close()
543543
pkg.AddFile("foo.go", `
544-
package main
545544
// Code generated some-generator DO NOT EDIT.
545+
package main
546546
import (
547547
"fmt"
548548
)

0 commit comments

Comments
 (0)
Please sign in to comment.