Skip to content

Commit cac1bb7

Browse files
committed
what am i even doing
1 parent dff4aab commit cac1bb7

File tree

2 files changed

+26
-14
lines changed

2 files changed

+26
-14
lines changed

tests/unittests/Main.cpp

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
#include "TestsHelper.hpp"
2-
3-
41
#include <boost/ut.hpp>
52
#include <fmt/format.h>
63
#include <fmt/chrono.h>
@@ -10,6 +7,31 @@
107
#include <string>
118
#include <chrono>
129

10+
void tt(const std::string& folder, std::function<void(const std::string&)>&& run)
11+
{
12+
boost::ut::test(folder) = [=] {
13+
for (const std::string& name : {
14+
"11111111111111111111111111111111111111111111111111111111",
15+
"2222222222222222222222222222222222222222222222222222222222",
16+
"2222222222222222222222222222222222222222222222222222222222",
17+
"333333333333333333333333333333333333333333333333333333333333"})
18+
{
19+
run(name);
20+
}
21+
};
22+
}
23+
24+
boost::ut::suite<"Main"> main_suite = [] {
25+
using namespace boost::ut;
26+
27+
tt("main", [](const std::string& name) {
28+
should("parametrized " + name) = [] {
29+
expect(true);
30+
expect(false);
31+
};
32+
});
33+
};
34+
1335
int main(const int argc, char** argv)
1436
{
1537
using namespace boost;
@@ -21,15 +43,6 @@ int main(const int argc, char** argv)
2143
if (argc >= 2 && std::string(argv[1]) != "update")
2244
filter = argv[1];
2345

24-
auto show = [](const std::string& res) {
25-
const auto path = getResourcePath(res);
26-
for (const auto& entry : std::filesystem::directory_iterator(path))
27-
std::cout << "# " << entry.path().generic_string() << std::endl;
28-
};
29-
show("DiagnosticsSuite/compileTime");
30-
show("DiagnosticsSuite/runtime");
31-
show("DiagnosticsSuite/typeChecking");
32-
3346
bool failed = false;
3447
const auto start = std::chrono::high_resolution_clock::now();
3548

tests/unittests/TestsHelper.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@ void iterTestFiles(const std::string& folder, std::function<void(const TestData&
5858
.is_folder = is_directory(entry.path())
5959
};
6060

61-
std::cout << "test on '" << entry.path().generic_string() << "'" << std::endl;
62-
test(data);
61+
// test(data);
6362
}
6463
};
6564
}

0 commit comments

Comments
 (0)