summaryrefslogtreecommitdiff
path: root/internal/rpn/operations_stack_test.go
AgeCommit message (Collapse)Author
2026-05-24fix(rpn): change variadic NewRPN/NewOperations to single optional ↵Paul Buetow
MetricReader (task ok)
2026-05-23test: add unit tests for Operations.Show() with diverse stack typesPaul Buetow
Expand operations_stack_test.go from 1 test to 10 tests covering: - Empty stack returns 'Stack is empty' - Boolean values display as 'true'/'false' - Symbols display as ':name' (prefix with colon) - StringNum values display their string content - Mixed types (bool, symbol, string, number, metric) in one stack - Multiple metric values with different suffixes (Mbps, hr) - Rational numbers (Rat) display correctly - Rational booleans display as 'true'/'false' - Stack values order (bottom-to-top) - Existing metric suffix test (Cool vs non-Cool)
2026-05-22feat(rpn): show metric suffix in stack displayPaul Buetow
Task 9d: Operations.Show() now appends metric suffix for non-Cool metrics (e.g., '100Mbps 42 5.5Mbps'). Cool numbers display as plain numbers. Added TestShowWithMetrics.