Documentation refactoring. No code changes. (0.40.5)
This commit is contained in:
parent
a47660edc7
commit
63545ed918
136 changed files with 374 additions and 3163 deletions
|
|
@ -1,43 +0,0 @@
|
|||
---
|
||||
layout: page
|
||||
published: true
|
||||
noToc: false
|
||||
noComments: false
|
||||
noDate: false
|
||||
title: Fun - Writing Tests
|
||||
subtitle: How to author new tests for Fun and opcode components.
|
||||
description: How to author new tests for Fun and opcode components.
|
||||
permalink: /documentation/writing-tests/
|
||||
lang: en
|
||||
tags:
|
||||
- author
|
||||
- components
|
||||
- new
|
||||
- opcode
|
||||
- tests
|
||||
- writing
|
||||
---
|
||||
|
||||
|
||||
How to author tests for Fun and its opcode implementations.
|
||||
|
||||
## Test kinds
|
||||
- VM/opcode tests: exercise bytecode operations and VM behavior (target: `test_opcodes`).
|
||||
- Language/runtime tests: exercise user-visible features and stdlib behavior (target: `fun_test`).
|
||||
|
||||
See `documentation/testing.md` for how to build and run these targets with CTest.
|
||||
|
||||
## Adding new tests
|
||||
The exact layout may evolve; generally:
|
||||
- Add new test sources alongside existing ones used by `fun_test`.
|
||||
- For opcode-focused tests, add cases where `test_opcodes` discovers them.
|
||||
|
||||
Aim for:
|
||||
- Small, isolated test cases with clear assertions
|
||||
- One behavior per test; descriptive names
|
||||
- Minimal fixtures and setup
|
||||
|
||||
## Guidelines
|
||||
- Prefer black-box testing via public APIs.
|
||||
- When adding features, include both positive and negative cases.
|
||||
- Keep tests deterministic; avoid non-deterministic timers or random sources unless seeded.
|
||||
Loading…
Add table
Add a link
Reference in a new issue