Skip to content

Conversation

@gabritto
Copy link
Member

No description provided.

// IO
const harnessNewLine = "\r\n"

var (
Copy link
Member Author

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

@gabritto gabritto marked this pull request as ready for review January 6, 2025 19:56
// 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
Copy link
Member Author

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.

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) {
Copy link
Member Author

@gabritto gabritto Jan 6, 2025

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.

return result
}

func checkDuplicatedFileName(resultName string, dupeCase map[string]int) string {
Copy link
Member Author

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.

@jakebailey
Copy link
Member

Is there a test we could write for this "now" to verify that it works?

@jakebailey
Copy link
Member

Ah, #115 seems to include it.

Co-authored-by: Jake Bailey <5341706+jakebailey@users.noreply.github.com>
@gabritto gabritto enabled auto-merge (squash) January 8, 2025 03:12
@gabritto gabritto merged commit 07a5e04 into main Jan 8, 2025
12 checks passed
@gabritto gabritto deleted the gabritto/symbolbaseline branch January 8, 2025 03:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants