Use unknown file for invalid source index.

This commit is contained in:
chriseth
2021-07-12 17:35:49 +02:00
parent ef6ad57c9c
commit e5ab68ed71
2 changed files with 3 additions and 7 deletions
+1 -3
View File
@@ -573,9 +573,7 @@ BOOST_AUTO_TEST_CASE(customSourceLocations_reference_original_sloc)
BOOST_REQUIRE(holds_alternative<VariableDeclaration>(result->statements.at(0)));
VariableDeclaration const& varDecl = get<VariableDeclaration>(result->statements.at(0));
// -1 points to original source code, which in this case is `sourceText` (which is also
// available via `0`, that's why the first @src is set to `1` instead.)
CHECK_LOCATION(varDecl.debugData->location, sourceText, 10, 20);
CHECK_LOCATION(varDecl.debugData->location, "", 10, 20);
}
BOOST_AUTO_TEST_SUITE_END()