Skip to content

0.3.0: an object is a case, its type its kind; how a case is run stated with it - #4

Merged
Sunrisepeak merged 5 commits into
mainfrom
release/0.3.0
Nov 8, 2026
Merged

Sunrisepeak merged 5 commits into
mainfrom
release/0.3.0

Conversation

@Sunrisepeak

@Sunrisepeak Sunrisepeak commented Nov 8, 2026 •

Copy link
Copy Markdown
Member

mtest 0.3.0 (mcpp-community/mcpp design 2026-11-08, W9): a case states in code what it is and what it needs; the runner acts on that statement and records what it did.

Library

  • UTest, E2E, CTS, Bench and Suite (of no kind) take a name, attributes and a body. An object is one case: listed with its attributes, scheduled by them, its body run when it is selected. Cases the body declares are under its name, inherit its attributes and are selectable alone; a scope that runs only for a selected case is reported only when its own statement fails (P3.4). suite remains.
  • How a case is run: timeout{}, isolate{}, retries{n}, diagnose{.env, .limit}.
  • shared<T>: made when a case first uses it; reported by the fixture event.

Protocol (version 1, fields added, P9.2)

  • P3.3: timeout, isolation, retries, diagnose; a case with no kind is of its program's.
  • P3.4: begin may carry kind, tags, clauses; the scope rule.
  • P5.2: fixture.

Engine

  • Per-case isolation, time limits, retries, diagnostic reruns (mtest explain names the output), the run's timeline (--report-json's timeline: start, duration and resources of each program).
  • Kinds: the program's statement, mtest.toml, the directory (docs/layout.md), unit.
  • [cases."<glob>"] in the library's vocabulary (clauses, artifacts, isolation, retries, diagnose, skip, expect_fail); what the program states comes first.
  • The static manifest is its own package, mcpplibs.mtest.manifest (the engine and editors depend on it without linking the test library); it reads suite types, the file's own derived suite types and attributes; list --static agrees with list (manifest/tests/listing.cpp).
  • **/ in discovery globs matches no directory too.

Adapters

Bash (--timeout, --isolate, --retries, --diagnose-env, --diagnose-timeout) and the C ABI state the same; neither states unit for a case of no kind.

Tests: lib/tests/suites.cpp (listing, scopes, inheritance, shared objects, the text against the listing), five engine cases (layout kinds, case time limits, static suites, isolation/retries/diagnosis, mtest.toml alignment, timeline); the conformance suite passes for the library, the Bash and Python fixtures, the C ABI and GoogleTest.

Co-authored-by: speak-agent [email protected]

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.

1 participant