mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-06 10:44:41 +01:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user