Skip to content

Commit 556eac2

Browse files
committed
cpp test
1 parent e91e730 commit 556eac2

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

test/extensions/language/sql_databases/cpp/DbWithRelocationTest.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,5 +185,16 @@ TEST_F(DbWithRelocationTest, attachedDatabases)
185185
ASSERT_EQ(0, m_attachedDatabasesNames.count("main"));
186186
}
187187

188+
TEST_F(DbWithRelocationTest, invalidDbName)
189+
{
190+
const std::string dbName = "language/sql_databases/db_with_relocation_test_invalid_db_name.sqlite";
191+
EuropeDb::TRelocationMap reloc1{
192+
{"inval id", "language/sql_databases/db_with_relocation_test_invalid1.sqlite"}};
193+
EuropeDb::TRelocationMap reloc2{
194+
{"in?valid", "language/sql_databases/db_with_relocation_test_invalid2.sqlite"}};
195+
ASSERT_THROW({ EuropeDb db(dbName, reloc1); }, zserio::SqliteException);
196+
ASSERT_THROW({ EuropeDb db(dbName, reloc2); }, zserio::SqliteException);
197+
}
198+
188199
} // namespace db_with_relocation
189200
} // namespace sql_databases

0 commit comments

Comments
 (0)