Skip to content

various reworks, simplify tests, add benchmarks#38

Open
disruptek wants to merge 11 commits intomainfrom
tests
Open

various reworks, simplify tests, add benchmarks#38
disruptek wants to merge 11 commits intomainfrom
tests

Conversation

@disruptek
Copy link
Contributor

@disruptek disruptek commented Feb 12, 2026

The balls unittest rewrite can end up creating a false-positive in the ASAN test, so we simply revert to a basic assertion-based test program.

Also added a benchmark visualizer via gnuplot.

Made some progress on Ward completion but it's not finished and as I don't use it myself, I'm not too bothered by this.

Reworked the RC handling during ref movement in/out of the queue for, hopefully, greater safety and fewer sanitizer complaints.

Library Fixes:
- Fixed loonySlotCount=0 in nim.cfg causing compilation errors
- Fixed uint16 type mismatch in prn template (properly cast loonySlotCount-1)
- Library now compiles cleanly on NimSkull 0.1.0-dev.21572

Test Suite:
- Created 28 passing tests covering:
  * Queue creation and FIFO operations (8 tests)
  * Ward configuration and functionality (6 tests)
  * Ward creation with all flag types (6 tests)
  * Memory safety with ref types (1 test)
- Tests use ref types exclusively (Loony design requirement)
- All tests pass with --define:debug --define:release --define:danger
- Tests validate core library contracts:
  * Push/pop FIFO ordering maintained
  * Safe and unsafe variant compatibility
  * Ward creation with PopPausable, PushPausable, Pausable, Clearable flags
  * Reference type integrity through the queue
  * Large sequential operations (1000+ items)

Tests run via balls framework:
  env GITHUB_ACTIONS=true balls --define:debug
@shayanhabibi
Copy link
Contributor

Where'd this massive surge of nim related work come from, are you working in a job with Nim again? I'll have a look tomorrow, need to setup my tooling for Nim

@disruptek
Copy link
Contributor Author

Just finishing neglected work before software engineering is rendered completely irrelevant.

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