Skip to content

Commit

Permalink
Fix test: update test to comply with the spec of generated sources
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
nobishino authored and ccojocar committed Mar 8, 2024
1 parent 3a0ea51 commit ccb0a08
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions analyzer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -498,8 +498,8 @@ var _ = Describe("Analyzer", func() {
pkg := testutils.NewTestPackage()
defer pkg.Close()
pkg.AddFile("foo.go", `
package foo
// Code generated some-generator DO NOT EDIT.
package foo
func test() error {
return nil
}
Expand Down Expand Up @@ -541,8 +541,8 @@ var _ = Describe("Analyzer", func() {
pkg := testutils.NewTestPackage()
defer pkg.Close()
pkg.AddFile("foo.go", `
package main
// Code generated some-generator DO NOT EDIT.
package main
import (
"fmt"
)
Expand Down

0 comments on commit ccb0a08

Please sign in to comment.