diff --git a/CHANGELOG.md b/CHANGELOG.md index aa7c41f9..a7e6df96 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,10 @@ ### Added +- **mtest 0.11.0(mcpplibs.mtest、.manifest、.gtest、.capi)与新包 mcpplibs.mtest.doctest。** 协议的 `step` 与 `exercise` 事件(P5.6); + 用例结束时检查它启动的进程与诊断行;机器的一份预算(O11)与抖动(O12);运行记录机器的类别;`[budget]` 与 `[ledger.*]` + 由门禁判定;GCC 上一个文件的首个用例与期望由 689 ms 降为 265 ms。`mcpplibs.mtest.doctest` 是 doctest 的协议适配器(1 级), + doctest 的实现与入口在包中编译一次,测试文件只包含头文件(mcpp-community/mtest#26)。成员 tests/examples/mtest-doctest。 - **mcpplibs.mwrap.slint 1.19.0.2 与 mcpplibs.slintgen 1.19.0.2:规则的三个名字合为一个名字的三种拼写,使用方只依赖封装包。** 包 `mcpplibs.slintgen`、模块 `mcpp.mcpplibs.slintgen`、命名空间 `mcpp::mcpplibs::slintgen`(与 mcpplibs.openkal-bind 同形,SPEC-007 R9.6);规则不再带 feature,`.slint` 文件是 `options::sources`,封装包 reexport 规则与 SDK,工程的 `mcpp.toml` 只需 `mcpplibs.mwrap.slint`,不需要 `[build-dependencies]`,`[build] sources` 里也不再列 `.slint`。1.19.0.1(模块 `slint.mcpp.plugins` 加 `features = ["slint"]`)保持已发布的字节。 - **mcpplibs.mwrap.slint 1.19.0.1:slint-m,Slint 作为 C++23 模块;mcpplibs.slintgen 1.19.0.1:构建规则,模块 `slint.mcpp.plugins`。** 模块 `mcpplibs.mwrap.slint`(slint、slint::language)、`.interpreter`、`.platform`(仅 Clang;GCC 16 在包着 `slint-platform.h` 的模块上 ICE,故以文本 `#include` 提供)与 `.macros`(13 个 `SLINT_FEATURE_*` 常量),导出面由 SDK 头文件的 AST 生成并审计;链接 compat.slint 1.19.0。规则包 slintgen(同一归档的 `rules/`,与 grpcgen 同形)为每个 `.slint` 文件运行 `slint-compiler`(上游 `slint_target_sources` 的选项、每个输入一条带 depfile 的 action),设置 `module` 后每个文件还生成一个模块单元(`import app.ui;`);工程在 `[build-dependencies]` 写 `features = ["slint"]` 以认领 `.slint`。模块以库名命名而不用 `mcpp.plugins.*`(R9.6 把它留给 mcpp 命名空间,索引不收录此类包);1.19.0 已打标签与镜像但未收录,改名以修订号 1.19.0.1 发布。成员 tests/mwrap/slint-ui;默认模板 `hello`(无头时用软件渲染器)。Linux x86_64、macOS arm64、Windows x86_64(compat.slint 的载荷暂无 Linux aarch64)。 - **compat.slint 1.19.0:Slint 的 C++ SDK(`libslint_cpp`、头文件 `slint/`、`slint-compiler`),上游 CMake 的桌面默认功能集(GPL-3.0-only / Royalty-free-2.0 / Software-3.0 三选一)。** 载荷是生态里的 `xim:slint`(xlings-res/slint,GitHub 与 GitCode 逐字节相同;Linux x86_64、macOS arm64、Windows x86_64),由发布 tag 经 cargo 按默认功能集构建:Linux 上 `libslint_cpp` 只 NEEDED fontconfig 与 C 运行时(X11、Wayland、GL 均 dlopen)。描述符把载荷的 include、lib(Windows 为 bin 的 DLL)与 `slint-compiler` 放进包的目录,`SLINT_FEATURE_*` 由 `` 的默认功能集定义。成员 tests/examples/slint:SharedString、VectorModel、Color,解释器编译一段源码并在无头平台上驱动组件。Linux aarch64 暂缺:`xim:fontconfig` 尚无 aarch64 载荷。 diff --git a/mcpp.toml b/mcpp.toml index b0376019..22a0a57d 100644 --- a/mcpp.toml +++ b/mcpp.toml @@ -145,6 +145,7 @@ members = [ "tests/examples/mio", "tests/examples/mtest", "tests/examples/mtest-capi", + "tests/examples/mtest-doctest", "tests/examples/mtest-gtest", "tests/examples/mtest-manifest", "tests/examples/muduo", diff --git a/pkgs/m/mcpplibs.mtest.capi.lua b/pkgs/m/mcpplibs.mtest.capi.lua index b4fd1a0a..6ce9a80a 100644 --- a/pkgs/m/mcpplibs.mtest.capi.lua +++ b/pkgs/m/mcpplibs.mtest.capi.lua @@ -21,6 +21,13 @@ package = { xpm = { linux = { + ["0.11.0"] = { + url = { + GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.11.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/mtest/releases/download/v0.11.0/mtest-v0.11.0.tar.gz", + }, + sha256 = "457635770e34e1915b0ed87032c12f435f45a1477caaa60a4ffe9da56da7d398", + }, ["0.10.0"] = { url = { GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.10.0.tar.gz", @@ -156,6 +163,13 @@ package = { }, }, macosx = { + ["0.11.0"] = { + url = { + GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.11.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/mtest/releases/download/v0.11.0/mtest-v0.11.0.tar.gz", + }, + sha256 = "457635770e34e1915b0ed87032c12f435f45a1477caaa60a4ffe9da56da7d398", + }, ["0.10.0"] = { url = { GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.10.0.tar.gz", @@ -291,6 +305,13 @@ package = { }, }, windows = { + ["0.11.0"] = { + url = { + GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.11.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/mtest/releases/download/v0.11.0/mtest-v0.11.0.tar.gz", + }, + sha256 = "457635770e34e1915b0ed87032c12f435f45a1477caaa60a4ffe9da56da7d398", + }, ["0.10.0"] = { url = { GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.10.0.tar.gz", diff --git a/pkgs/m/mcpplibs.mtest.doctest.lua b/pkgs/m/mcpplibs.mtest.doctest.lua new file mode 100644 index 00000000..4c54cb50 --- /dev/null +++ b/pkgs/m/mcpplibs.mtest.doctest.lua @@ -0,0 +1,53 @@ +-- mcpplibs.mtest.doctest --- doctest speaking the mtest test protocol. +-- +-- A package of mcpp-community/mtest (one tag, one archive): a test main that +-- lists, selects and reports doctest's cases by the protocol, level 1, and doctest's +-- implementation compiled once in the package (mtest 0.11.0). +package = { + spec = "1", + namespace = "mcpplibs.mtest", + name = "doctest", + description = "doctest speaking the mtest test protocol: doctest's implementation and a test main that lists, selects and reports its cases", + licenses = {"Apache-2.0"}, + repo = "https://github.com/mcpp-community/mtest", + type = "package", + + extensions = { + autoupdate = { + tag = "v${version}", + url = "https://github.com/mcpp-community/mtest/archive/refs/tags/${tag}.tar.gz", + }, + }, + + xpm = { + linux = { + ["0.11.0"] = { + url = { + GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.11.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/mtest/releases/download/v0.11.0/mtest-v0.11.0.tar.gz", + }, + sha256 = "457635770e34e1915b0ed87032c12f435f45a1477caaa60a4ffe9da56da7d398", + }, + }, + macosx = { + ["0.11.0"] = { + url = { + GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.11.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/mtest/releases/download/v0.11.0/mtest-v0.11.0.tar.gz", + }, + sha256 = "457635770e34e1915b0ed87032c12f435f45a1477caaa60a4ffe9da56da7d398", + }, + }, + windows = { + ["0.11.0"] = { + url = { + GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.11.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/mtest/releases/download/v0.11.0/mtest-v0.11.0.tar.gz", + }, + sha256 = "457635770e34e1915b0ed87032c12f435f45a1477caaa60a4ffe9da56da7d398", + }, + }, + }, + + mcpp = "*/adapters/doctest/mcpp.toml", +} diff --git a/pkgs/m/mcpplibs.mtest.gtest.lua b/pkgs/m/mcpplibs.mtest.gtest.lua index 062316c0..23fa8fc2 100644 --- a/pkgs/m/mcpplibs.mtest.gtest.lua +++ b/pkgs/m/mcpplibs.mtest.gtest.lua @@ -20,6 +20,13 @@ package = { xpm = { linux = { + ["0.11.0"] = { + url = { + GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.11.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/mtest/releases/download/v0.11.0/mtest-v0.11.0.tar.gz", + }, + sha256 = "457635770e34e1915b0ed87032c12f435f45a1477caaa60a4ffe9da56da7d398", + }, ["0.10.0"] = { url = { GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.10.0.tar.gz", @@ -155,6 +162,13 @@ package = { }, }, macosx = { + ["0.11.0"] = { + url = { + GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.11.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/mtest/releases/download/v0.11.0/mtest-v0.11.0.tar.gz", + }, + sha256 = "457635770e34e1915b0ed87032c12f435f45a1477caaa60a4ffe9da56da7d398", + }, ["0.10.0"] = { url = { GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.10.0.tar.gz", @@ -290,6 +304,13 @@ package = { }, }, windows = { + ["0.11.0"] = { + url = { + GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.11.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/mtest/releases/download/v0.11.0/mtest-v0.11.0.tar.gz", + }, + sha256 = "457635770e34e1915b0ed87032c12f435f45a1477caaa60a4ffe9da56da7d398", + }, ["0.10.0"] = { url = { GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.10.0.tar.gz", diff --git a/pkgs/m/mcpplibs.mtest.manifest.lua b/pkgs/m/mcpplibs.mtest.manifest.lua index 6cce7f72..74afd324 100644 --- a/pkgs/m/mcpplibs.mtest.manifest.lua +++ b/pkgs/m/mcpplibs.mtest.manifest.lua @@ -22,6 +22,13 @@ package = { xpm = { linux = { + ["0.11.0"] = { + url = { + GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.11.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/mtest/releases/download/v0.11.0/mtest-v0.11.0.tar.gz", + }, + sha256 = "457635770e34e1915b0ed87032c12f435f45a1477caaa60a4ffe9da56da7d398", + }, ["0.10.0"] = { url = { GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.10.0.tar.gz", @@ -143,6 +150,13 @@ package = { }, }, macosx = { + ["0.11.0"] = { + url = { + GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.11.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/mtest/releases/download/v0.11.0/mtest-v0.11.0.tar.gz", + }, + sha256 = "457635770e34e1915b0ed87032c12f435f45a1477caaa60a4ffe9da56da7d398", + }, ["0.10.0"] = { url = { GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.10.0.tar.gz", @@ -264,6 +278,13 @@ package = { }, }, windows = { + ["0.11.0"] = { + url = { + GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.11.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/mtest/releases/download/v0.11.0/mtest-v0.11.0.tar.gz", + }, + sha256 = "457635770e34e1915b0ed87032c12f435f45a1477caaa60a4ffe9da56da7d398", + }, ["0.10.0"] = { url = { GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.10.0.tar.gz", diff --git a/pkgs/m/mtest.lua b/pkgs/m/mtest.lua index 1d5ccd59..d3b4f21f 100644 --- a/pkgs/m/mtest.lua +++ b/pkgs/m/mtest.lua @@ -52,6 +52,11 @@ -- -- 0.10.0 records a timed-out program's processes, asks it to end, and ends what still -- runs after its grace (`grace`, `timeout_record`). +-- +-- 0.11.0 writes a case's steps and the surface it used (P5.6), checks a case's processes +-- and diagnostic lines at its end, holds one budget for the machine (O11), waits at +-- contention points under jitter (O12), records the machine's class, judges [budget] and +-- [ledger.*] in the gate, and costs a file's first case and expectation 265 ms under GCC. package = { spec = "1", namespace = "mcpplibs", @@ -70,6 +75,13 @@ package = { xpm = { linux = { + ["0.11.0"] = { + url = { + GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.11.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/mtest/releases/download/v0.11.0/mtest-v0.11.0.tar.gz", + }, + sha256 = "457635770e34e1915b0ed87032c12f435f45a1477caaa60a4ffe9da56da7d398", + }, ["0.10.0"] = { url = { GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.10.0.tar.gz", @@ -205,6 +217,13 @@ package = { }, }, macosx = { + ["0.11.0"] = { + url = { + GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.11.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/mtest/releases/download/v0.11.0/mtest-v0.11.0.tar.gz", + }, + sha256 = "457635770e34e1915b0ed87032c12f435f45a1477caaa60a4ffe9da56da7d398", + }, ["0.10.0"] = { url = { GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.10.0.tar.gz", @@ -340,6 +359,13 @@ package = { }, }, windows = { + ["0.11.0"] = { + url = { + GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.11.0.tar.gz", + CN = "https://gitcode.com/mcpp-res/mtest/releases/download/v0.11.0/mtest-v0.11.0.tar.gz", + }, + sha256 = "457635770e34e1915b0ed87032c12f435f45a1477caaa60a4ffe9da56da7d398", + }, ["0.10.0"] = { url = { GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.10.0.tar.gz", diff --git a/tests/examples/mtest-doctest/mcpp.toml b/tests/examples/mtest-doctest/mcpp.toml new file mode 100644 index 00000000..db683e52 --- /dev/null +++ b/tests/examples/mtest-doctest/mcpp.toml @@ -0,0 +1,12 @@ +# mcpplibs.mtest.doctest test project: doctest's cases begun by the adapter's main, which reports +# them by the mtest protocol. The test file includes doctest's header and defines no +# DOCTEST_CONFIG_IMPLEMENT*: the implementation is compiled once, in the adapter. +[package] +name = "mtest-doctest-tests" +version = "0.1.0" + +[indices] +# Use the complete candidate built-in index prepared by tests/run_members.sh. + +[dev-dependencies] +mcpplibs.mtest.doctest = "0.11.0" diff --git a/tests/examples/mtest-doctest/tests/suite.cpp b/tests/examples/mtest-doctest/tests/suite.cpp new file mode 100644 index 00000000..23e0d41f --- /dev/null +++ b/tests/examples/mtest-doctest/tests/suite.cpp @@ -0,0 +1,5 @@ +#include +TEST_SUITE("arithmetic") { + TEST_CASE("adds") { CHECK(1 + 1 == 2); } + TEST_CASE("multiplies") { CHECK(2 * 3 == 6); } +}