-
Notifications
You must be signed in to change notification settings - Fork 579
Add symbol baseliner #191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add symbol baseliner #191
Conversation
@@ -19,12 +19,6 @@ import ( | |||
// IO | |||
const harnessNewLine = "\r\n" | |||
|
|||
var ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved to internal/testutil/baseline/util.go
@@ -1123,7 +1123,7 @@ func IsDeclaration(node *Node) bool { | |||
|
|||
// True if `name` is the name of a declaration node | |||
func IsDeclarationName(name *Node) bool { | |||
return !IsSourceFile(name) && !IsBindingPattern(name) && IsDeclaration(name.Parent) | |||
return !IsSourceFile(name) && !IsBindingPattern(name) && IsDeclaration(name.Parent) && name.Parent.Name() == name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bug fix.
@@ -15,11 +15,11 @@ type Options struct { | |||
|
|||
const NoContent = "<no content>" | |||
|
|||
func Run(t testing.TB, fileName string, actual string, opts Options) { | |||
func Run(t *testing.T, fileName string, actual string, opts Options) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had to make this change from testing.TB
to testing.T
because I wanted to use t.Run
in one symbol baseline function and so I changed it everywhere else, too.
@@ -253,19 +246,6 @@ func iterateErrorBaseline(t testing.TB, inputFiles []*TestFile, inputDiagnostics | |||
return result | |||
} | |||
|
|||
func checkDuplicatedFileName(resultName string, dupeCase map[string]int) string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I realized this was essentially unused in the old test infra.
Is there a test we could write for this "now" to verify that it works? |
Ah, #115 seems to include it. |
Co-authored-by: Jake Bailey <5341706+jakebailey@users.noreply.github.com>
No description provided.