Fixed a test fail when private test data is not available

This commit is contained in:
Matthias Koefferlein 2023-12-29 23:18:07 +01:00
parent f335ab69af
commit 36f531685c
2 changed files with 3 additions and 0 deletions

View File

@ -595,6 +595,8 @@ TEST(Bug_1474)
db::OASISReader reader (file);
reader.read (layout);
EXPECT_EQ (false, true);
} catch (tl::CancelException &ex) {
// Seen when private test data is not installed
} catch (tl::Exception &ex) {
EXPECT_EQ (ex.msg (), "Cell named ADDHX2 with ID 4 was already given name SEDFFTRX2 (position=763169, cell=)");
}

View File

@ -104,6 +104,7 @@ std::string testdata_private ()
std::string pp = tl::combine_path (tl::testsrc (), "private");
pp = tl::combine_path (pp, "testdata");
if (! tl::file_exists (pp)) {
tl::warn << "Cancelling test as private test data is not available.";
throw tl::CancelException ();
}
return pp;