Skip to content

Fix hash_test.go to compile with updated NewParser signature#268

Merged
hbarthels merged 1 commit into
mainfrom
hb-fix-hash-test-newparser
Jul 13, 2026
Merged

Fix hash_test.go to compile with updated NewParser signature#268
hbarthels merged 1 commit into
mainfrom
hb-fix-hash-test-newparser

Conversation

@hbarthels

Copy link
Copy Markdown
Contributor

What changed

sdks/go/src/hash_test.go called NewParser([]Token{}) with a single argument, but NewParser (in sdks/go/src/parser.go) now has the signature func NewParser(tokens []Token, input string) *Parser. This one-line fix passes the missing input argument.

Why

The test was never updated when NewParser gained its input parameter, so cd sdks/go && go test ./src/... has failed to compile since before v0.5.5. The canonical suite (go test ./test/...) and go build ./... were unaffected, which is why it went unnoticed.

Notes for reviewers

TestRelationIdFromString only exercises relationIdFromString, which never reads input/lineStarts, so "" is the correct argument. Verified with cd sdks/go && go test ./src/... — passes.

🤖 Generated with Claude Code

NewParser gained an `input string` parameter, but sdks/go/src/hash_test.go
was never updated, so `go test ./src/...` failed to compile. The test only
exercises relationIdFromString, which does not read input, so pass "".

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@hbarthels hbarthels marked this pull request as ready for review July 13, 2026 15:25
@hbarthels hbarthels merged commit c932f0d into main Jul 13, 2026
5 checks passed
@hbarthels hbarthels deleted the hb-fix-hash-test-newparser branch July 13, 2026 16:22
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.

2 participants