Skip to content

chore: add test suite#28

Merged
hendriknielaender merged 2 commits intomainfrom
improved-test-suite
Jun 30, 2025
Merged

chore: add test suite#28
hendriknielaender merged 2 commits intomainfrom
improved-test-suite

Conversation

@hendriknielaender
Copy link
Owner

@hendriknielaender hendriknielaender commented Jun 30, 2025

closes #17

…st coverage

- Remove dead code: LogEvent.initLegacy() and Span.initLegacy()
- Add comprehensive tests for all modules (trace, field, config, event, redaction, correlation)
- Ensure all public functions are tested to address Zig's lazy compilation
- Remove 66+ lines of unused legacy code and associated tests

This ensures the Zig compiler type-checks all functions since Zig only compiles code that's actually used.
…tLegacy functions

- Add tests for field.zig: Field constructors, value types, constraints
- Add tests for config.zig: Level methods, Config defaults and custom values
- Add tests for event.zig: LogEvent creation and formatting
- Add tests for redaction.zig: RedactionConfig operations and RedactionOptions
- Add tests for correlation.zig: Span, TaskContext, CorrelationContext operations
- Remove unused initLegacy functions from event.zig and correlation.zig

This ensures all public functions are tested to address Zig's lazy compilation where untested code doesn't get type-checked.
@hendriknielaender hendriknielaender self-assigned this Jun 30, 2025
@hendriknielaender hendriknielaender merged commit 94c2cf7 into main Jun 30, 2025
4 checks passed
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.

Better tests

1 participant