wavefnd / wavefnd/Wave

Add unit tests for the Wave corpus checker

Open
#354 0 comments 0 reactions 0 assignees View on GitHub
good first issue needs testing
Dominant language
Rust
Stars
53
Forks
16
Avg merge
4h 22m
Merged PRs (30d)
46

Description

## Problem

`tools/check_wave_corpus.py` is a required CI gate for examples and standard-library sources, but it has no dedicated unit tests.

## Scope

Add isolated Python tests using temporary directories and a small fake compiler process. Cover:

- Explicit `--wavec` selection.
- The `WAVEC` environment variable.
- Default local build candidates.
- Deterministic example/std source discovery.
- A successful compiler result.
- A nonzero compiler result with stdout/stderr details.
- Per-file timeout handling.
- Installation of the repository stdlib into an isolated temporary `HOME`.

Do not require LLVM or a real Wave compiler in these unit tests.

## Completion criteria

- [ ] Tests are deterministic on Linux, macOS, and Windows runners.
- [ ] No test reads or writes the developer's real home directory.
- [ ] CI runs the new test module with the existing Python tooling tests.
- [ ] Production corpus behavior is unchanged.

Contributor guide

Open the contributing guide

Research direction

Start with tools/check_wave_corpus.py and the repository's existing Python tooling-test command. Add deterministic tests using temporary directories and a fake compiler process, covering the listed compiler selection, discovery, result, timeout, and isolated HOME cases. Done means the module runs in CI on Linux, macOS, and Windows without LLVM, a real compiler, or the developer's home directory, while production behavior is unchanged.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.