Skip to content

Commit e647813

Browse files
mtest 0.4.0: bounds on a case's metrics and analyze trend (#735)
Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
1 parent 37fba14 commit e647813

10 files changed

Lines changed: 93 additions & 4 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@
2222

2323
### Added
2424

25+
- **mtest 0.4.0.** `mcpplibs.mtest`、`mcpplibs.mtest.gtest`、`mcpplibs.mtest.capi`、`mcpplibs.mtest.manifest` 的 0.4.0
26+
(同一标签、同一归档):用例在名字之后声明其度量的界限(`at_most`、`at_least`),库在用例结束时判定(P6.5),列举、
27+
静态清单与各适配器携带同一界限;引擎增加 `analyze trend`,并以替换字符保存非 UTF-8 的输出。测试成员移到 0.4.0,
28+
`mtest` 成员增加一个带界限的 `Bench`。
2529
- **mtest 0.3.0.** `mcpplibs.mtest`、`mcpplibs.mtest.gtest`、`mcpplibs.mtest.capi` 的 0.3.0 与新包
2630
`mcpplibs.mtest.manifest`(同一标签、同一归档):一个对象即一个用例,类型即类别(`UTest`、`CTS`、`E2E`、`Bench`,
2731
`Suite` 不声明类别),名字之后的属性说明它如何运行(资源、时限、隔离、重试、诊断)并由其声明的用例继承;静态用例

‎pkgs/m/mcpplibs.mtest.capi.lua‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ package = {
2121

2222
xpm = {
2323
linux = {
24+
["0.4.0"] = {
25+
url = {
26+
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.4.0.tar.gz",
27+
CN = "https://gitcode.com/mcpp-res/mtest/releases/download/v0.4.0/mtest-v0.4.0.tar.gz",
28+
},
29+
sha256 = "9c90fc7b225a5d0dc562070cf3c2d1336a391c77b56755d62854bc38d2c88040",
30+
},
2431
["0.3.0"] = {
2532
url = {
2633
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.3.0.tar.gz",
@@ -44,6 +51,13 @@ package = {
4451
},
4552
},
4653
macosx = {
54+
["0.4.0"] = {
55+
url = {
56+
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.4.0.tar.gz",
57+
CN = "https://gitcode.com/mcpp-res/mtest/releases/download/v0.4.0/mtest-v0.4.0.tar.gz",
58+
},
59+
sha256 = "9c90fc7b225a5d0dc562070cf3c2d1336a391c77b56755d62854bc38d2c88040",
60+
},
4761
["0.3.0"] = {
4862
url = {
4963
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.3.0.tar.gz",
@@ -67,6 +81,13 @@ package = {
6781
},
6882
},
6983
windows = {
84+
["0.4.0"] = {
85+
url = {
86+
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.4.0.tar.gz",
87+
CN = "https://gitcode.com/mcpp-res/mtest/releases/download/v0.4.0/mtest-v0.4.0.tar.gz",
88+
},
89+
sha256 = "9c90fc7b225a5d0dc562070cf3c2d1336a391c77b56755d62854bc38d2c88040",
90+
},
7091
["0.3.0"] = {
7192
url = {
7293
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.3.0.tar.gz",

‎pkgs/m/mcpplibs.mtest.gtest.lua‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,13 @@ package = {
2020

2121
xpm = {
2222
linux = {
23+
["0.4.0"] = {
24+
url = {
25+
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.4.0.tar.gz",
26+
CN = "https://gitcode.com/mcpp-res/mtest/releases/download/v0.4.0/mtest-v0.4.0.tar.gz",
27+
},
28+
sha256 = "9c90fc7b225a5d0dc562070cf3c2d1336a391c77b56755d62854bc38d2c88040",
29+
},
2330
["0.3.0"] = {
2431
url = {
2532
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.3.0.tar.gz",
@@ -43,6 +50,13 @@ package = {
4350
},
4451
},
4552
macosx = {
53+
["0.4.0"] = {
54+
url = {
55+
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.4.0.tar.gz",
56+
CN = "https://gitcode.com/mcpp-res/mtest/releases/download/v0.4.0/mtest-v0.4.0.tar.gz",
57+
},
58+
sha256 = "9c90fc7b225a5d0dc562070cf3c2d1336a391c77b56755d62854bc38d2c88040",
59+
},
4660
["0.3.0"] = {
4761
url = {
4862
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.3.0.tar.gz",
@@ -66,6 +80,13 @@ package = {
6680
},
6781
},
6882
windows = {
83+
["0.4.0"] = {
84+
url = {
85+
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.4.0.tar.gz",
86+
CN = "https://gitcode.com/mcpp-res/mtest/releases/download/v0.4.0/mtest-v0.4.0.tar.gz",
87+
},
88+
sha256 = "9c90fc7b225a5d0dc562070cf3c2d1336a391c77b56755d62854bc38d2c88040",
89+
},
6990
["0.3.0"] = {
7091
url = {
7192
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.3.0.tar.gz",

‎pkgs/m/mcpplibs.mtest.manifest.lua‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ package = {
2222

2323
xpm = {
2424
linux = {
25+
["0.4.0"] = {
26+
url = {
27+
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.4.0.tar.gz",
28+
CN = "https://gitcode.com/mcpp-res/mtest/releases/download/v0.4.0/mtest-v0.4.0.tar.gz",
29+
},
30+
sha256 = "9c90fc7b225a5d0dc562070cf3c2d1336a391c77b56755d62854bc38d2c88040",
31+
},
2532
["0.3.0"] = {
2633
url = {
2734
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.3.0.tar.gz",
@@ -31,6 +38,13 @@ package = {
3138
},
3239
},
3340
macosx = {
41+
["0.4.0"] = {
42+
url = {
43+
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.4.0.tar.gz",
44+
CN = "https://gitcode.com/mcpp-res/mtest/releases/download/v0.4.0/mtest-v0.4.0.tar.gz",
45+
},
46+
sha256 = "9c90fc7b225a5d0dc562070cf3c2d1336a391c77b56755d62854bc38d2c88040",
47+
},
3448
["0.3.0"] = {
3549
url = {
3650
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.3.0.tar.gz",
@@ -40,6 +54,13 @@ package = {
4054
},
4155
},
4256
windows = {
57+
["0.4.0"] = {
58+
url = {
59+
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.4.0.tar.gz",
60+
CN = "https://gitcode.com/mcpp-res/mtest/releases/download/v0.4.0/mtest-v0.4.0.tar.gz",
61+
},
62+
sha256 = "9c90fc7b225a5d0dc562070cf3c2d1336a391c77b56755d62854bc38d2c88040",
63+
},
4364
["0.3.0"] = {
4465
url = {
4566
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.3.0.tar.gz",

‎pkgs/m/mtest.lua‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@ package = {
2323

2424
xpm = {
2525
linux = {
26+
["0.4.0"] = {
27+
url = {
28+
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.4.0.tar.gz",
29+
CN = "https://gitcode.com/mcpp-res/mtest/releases/download/v0.4.0/mtest-v0.4.0.tar.gz",
30+
},
31+
sha256 = "9c90fc7b225a5d0dc562070cf3c2d1336a391c77b56755d62854bc38d2c88040",
32+
},
2633
["0.3.0"] = {
2734
url = {
2835
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.3.0.tar.gz",
@@ -46,6 +53,13 @@ package = {
4653
},
4754
},
4855
macosx = {
56+
["0.4.0"] = {
57+
url = {
58+
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.4.0.tar.gz",
59+
CN = "https://gitcode.com/mcpp-res/mtest/releases/download/v0.4.0/mtest-v0.4.0.tar.gz",
60+
},
61+
sha256 = "9c90fc7b225a5d0dc562070cf3c2d1336a391c77b56755d62854bc38d2c88040",
62+
},
4963
["0.3.0"] = {
5064
url = {
5165
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.3.0.tar.gz",
@@ -69,6 +83,13 @@ package = {
6983
},
7084
},
7185
windows = {
86+
["0.4.0"] = {
87+
url = {
88+
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.4.0.tar.gz",
89+
CN = "https://gitcode.com/mcpp-res/mtest/releases/download/v0.4.0/mtest-v0.4.0.tar.gz",
90+
},
91+
sha256 = "9c90fc7b225a5d0dc562070cf3c2d1336a391c77b56755d62854bc38d2c88040",
92+
},
7293
["0.3.0"] = {
7394
url = {
7495
GLOBAL = "https://github.com/mcpp-community/mtest/archive/refs/tags/v0.3.0.tar.gz",

‎tests/examples/mtest-capi/mcpp.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ version = "0.1.0"
88
# Use the complete candidate built-in index prepared by tests/run_members.sh.
99

1010
[dependencies]
11-
mcpplibs.mtest.capi = "0.3.0"
11+
mcpplibs.mtest.capi = "0.4.0"

‎tests/examples/mtest-gtest/mcpp.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ version = "0.1.0"
1010

1111
[dev-dependencies]
1212
compat.gtest = "1.18.0"
13-
mcpplibs.mtest.gtest = "0.3.0"
13+
mcpplibs.mtest.gtest = "0.4.0"
1414

1515
[test]
1616
main = { from = "mcpplibs.mtest.gtest/main" }

‎tests/examples/mtest-manifest/mcpp.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ version = "0.1.0"
88
# Use the complete candidate built-in index prepared by tests/run_members.sh.
99

1010
[dependencies]
11-
mcpplibs.mtest.manifest = "0.3.0"
11+
mcpplibs.mtest.manifest = "0.4.0"

‎tests/examples/mtest/mcpp.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ version = "0.1.0"
99
# Use the complete candidate built-in index prepared by tests/run_members.sh.
1010

1111
[dev-dependencies]
12-
mcpplibs.mtest = "0.3.0"
12+
mcpplibs.mtest = "0.4.0"

‎tests/examples/mtest/tests/cases.cpp‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ UTest parsing{"parsing", tag{"fast"}, [] {
77
"a failure reports both sides"_test[expect_failure{"shown"}] = [] { expect(eq(std::string("a"), std::string("b"))); };
88
}};
99
E2E timed{"a case with a time limit", timeout{std::chrono::seconds{30}}, [] { expect(true); }};
10+
Bench measured{"a metric within its bound", at_most{"ready", 15}, [] { metric("ready", 1.0, "s"); }};
1011

1112
int main() {
1213
"parameters"_test = values{2, 4, 6} | [](int v) { expect(eq(v % 2, 0)); };

0 commit comments

Comments
 (0)