Skip to content

Extract duplicated test helpers into internal/testutil#76

Merged
campoy merged 4 commits intomasterfrom
extract-test-helpers
Feb 13, 2026
Merged

Extract duplicated test helpers into internal/testutil#76
campoy merged 4 commits intomasterfrom
extract-test-helpers

Conversation

@campoy
Copy link
Owner

@campoy campoy commented Feb 12, 2026

Summary

  • Create internal/testutil package with shared EqErr, Ptr, Str, EqPtr helpers
  • Remove duplicated eqErr from main_test.go and embedmd/command_test.go
  • Remove duplicated ptr, str, eqPtr from embedmd/command_test.go
  • Add t.Helper() for correct line reporting in test failures

Test plan

  • go build ./... passes
  • go vet ./... passes
  • go test -run 'TestExtract|TestParser|TestParseCommand|TestEmbedStreams|TestEmbedFiles' ./... passes

🤖 Generated with Claude Code

Francesc Campoy and others added 4 commits February 11, 2026 17:44
Move shared test helpers (eqErr, ptr, str, eqPtr) from duplicated
definitions across test files into a single internal/testutil package.
Add t.Helper() for correct line reporting.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file was newly created and not part of the original Google-authored
code.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Update indented code blocks in doc comments to use tabs per modern gofmt
rules.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@campoy campoy merged commit 185bef7 into master Feb 13, 2026
3 checks passed
@campoy campoy deleted the extract-test-helpers branch February 13, 2026 17:15
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.

1 participant