Allow defining .h files in tests without trying to compile them as Carbon files (#4667)

This would be used to test interop with C++.
#4666
This commit is contained in:
Boaz Brickner
2024-12-12 22:19:24 +00:00
committed by GitHub
parent 3ce0df67bb
commit 9ea1534535
2 changed files with 29 additions and 2 deletions
+5 -2
View File
@@ -378,8 +378,11 @@ auto FileTestBase::DoArgReplacements(
}
it = test_args.erase(it);
for (const auto& file : test_files) {
it = test_args.insert(it, file.filename);
++it;
const std::string& filename = file.filename;
if (!filename.ends_with(".h")) {
it = test_args.insert(it, filename);
++it;
}
}
// Back up once because the for loop will advance.
--it;