Skip to content

0.5.2: a copy of a test program that does something else is an object (child) - #9

Merged
Sunrisepeak merged 3 commits into
mainfrom
mtest-0.5.2
Nov 9, 2026
Merged

Sunrisepeak merged 3 commits into
mainfrom
mtest-0.5.2

Conversation

@Sunrisepeak

Copy link
Copy Markdown
Member

Summary

  • child{name, body} declares what a copy of the test program does; child_command(name, args) is the program again as that child. mtest's entry enters the child named by --mtest-child <name> before any case; the copy runs no case and reports nothing; an undeclared name exits 2.
  • A file that starts copies of itself therefore defines no main, and the files of one directory are one program (mcpp [test] programs = "directory") however many of them start copies. docs/layout.md and lib/docs/writing-tests.md state the form.

Tests

  • lib/tests/children.cpp (no main; the package's entry begins it): a child runs with the arguments after its name and its exit status; an undeclared name is refused.

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

Sunrisepeak and others added 3 commits November 9, 2026 12:24
… (child)

A test that starts copies of itself declares what a copy does (`child`) and
starts one with `child_command(name, args)`; the entry enters the child named
by the copy's arguments before any case. Such a file defines no `main`, so the
files of one directory are one program however many of them start copies.

Co-authored-by: speak-agent <[email protected]>
…t the package's entry; sources as clang-format writes them

Co-authored-by: speak-agent <[email protected]>
@Sunrisepeak
Sunrisepeak merged commit a27736c into main Nov 9, 2026
8 checks passed
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