From 2affd84327b3cb66bbb93bbf422c05c49a15b23e Mon Sep 17 00:00:00 2001 From: Sunrisepeak Date: Sun, 8 Nov 2026 08:25:48 +0900 Subject: [PATCH] docs: the GoogleTest adapter under an mcpp before 2026.11.8.1 Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com> --- adapters/gtest/docs/writing-tests.md | 4 +++- docs/adapters.md | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/adapters/gtest/docs/writing-tests.md b/adapters/gtest/docs/writing-tests.md index b083515..dddcf6e 100644 --- a/adapters/gtest/docs/writing-tests.md +++ b/adapters/gtest/docs/writing-tests.md @@ -16,7 +16,9 @@ TEST(Parsing, Fields) { ``` - The manifest: `[dev-dependencies] mcpplibs.mtest.gtest = "0.1.0"`. A file defines no `main` (mcpp - 2026.11.8.1 or later; an earlier mcpp needs `[test] main = { from = "gtest/main" }`). + 2026.11.8.1 or later). An earlier mcpp needs `[test] main = { from = "mcpplibs.mtest.gtest/main" }` + and `compat.gtest = "1.18.0"` beside it, so that GoogleTest's own `gtest_main.cc` stays out of the + program. - A case's identifier is `/`: `Parsing/EmptyLine`. - `mcpp test --case 'Parsing/*'` runs those cases; `mcpp test --cases` lists them; a failure is named with its place. diff --git a/docs/adapters.md b/docs/adapters.md index d73473f..9866d37 100644 --- a/docs/adapters.md +++ b/docs/adapters.md @@ -7,7 +7,7 @@ conformance suite (`MTEST_CTS_PROGRAM`, a command: a program and its arguments, | Adapter | Level | Use | |---|---|---| | `mcpplibs.mtest` (C++) | 3 | `import mcpplibs.mtest;` — the library itself | -| GoogleTest | 1 | `mcpplibs.mtest.gtest` as a dev-dependency, whose entry begins a test file (mcpp 2026.11.8.1+; earlier: `[test] main = { from = "gtest/main" }`); identifiers are `/` | +| GoogleTest | 1 | `mcpplibs.mtest.gtest` as a dev-dependency, whose entry begins a test file (mcpp 2026.11.8.1+; earlier: `[test] main = { from = "mcpplibs.mtest.gtest/main" }` and `compat.gtest` as a dev-dependency too); identifiers are `/` | | Bash | 3 | `. mtest.sh`, then `mtest_case ID FUNCTION [--tag T ...]` and `mtest_report` | | Python | 3 | `import mtest_report as mt`, `@mt.case("id")`, `mt.report()` | | C ABI | 3 | `include/mtest.h` and `libmtest`, for any language with a C FFI |