mirror of
https://github.com/open-goal/jak-project
synced 2026-08-18 05:48:28 -04:00
remove match param (#127)
This commit is contained in:
@@ -38,7 +38,7 @@ void CompilerTestRunner::run_static_test(inja::Environment& env,
|
||||
std::string& testCategory,
|
||||
const std::string& test_file,
|
||||
const std::vector<std::string>& expected,
|
||||
MatchParam<int> truncate) {
|
||||
std::optional<int> truncate) {
|
||||
env.write(test_file, {}, test_file);
|
||||
run_test(testCategory, test_file, expected, truncate);
|
||||
}
|
||||
@@ -46,13 +46,13 @@ void CompilerTestRunner::run_static_test(inja::Environment& env,
|
||||
void CompilerTestRunner::run_test(const std::string& test_category,
|
||||
const std::string& test_file,
|
||||
const std::vector<std::string>& expected,
|
||||
MatchParam<int> truncate) {
|
||||
std::optional<int> truncate) {
|
||||
fprintf(stderr, "Testing %s\n", test_file.c_str());
|
||||
auto result =
|
||||
c->run_test_from_file("test/goalc/source_generated/" + test_category + "/" + test_file);
|
||||
if (!truncate.is_wildcard) {
|
||||
if (truncate.has_value()) {
|
||||
for (auto& x : result) {
|
||||
x = x.substr(0, truncate.value);
|
||||
x = x.substr(0, truncate.value());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user