Skip to content

Commit

Permalink
Define function use with WITH_TEST_DATA only if WITH_TEST_DATA.
Browse files Browse the repository at this point in the history
Or else, they will be detected as defined but not used.
  • Loading branch information
mgautierfr committed Aug 31, 2023
1 parent 4d0e787 commit 62496cc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/archive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ TEST(ZimArchive, validate)
EXPECT_BROKEN_ZIMFILE(testfile.path, expected)
}
}
#endif


void checkEquivalence(const zim::Archive& archive1, const zim::Archive& archive2)
{
Expand Down Expand Up @@ -559,7 +559,6 @@ void checkEquivalence(const zim::Archive& archive1, const zim::Archive& archive2
#endif
}

#if WITH_TEST_DATA
TEST(ZimArchive, multipart)
{
auto nonSplittedZims = getDataFilePath("wikibooks_be_all_nopic_2017-02.zim");
Expand Down Expand Up @@ -617,6 +616,8 @@ TEST(ZimArchive, openZIMFileEmbeddedInAnotherFile)
#endif // not _WIN32
#endif // WITH_TEST_DATA


#if WITH_TEST_DATA
zim::Blob readItemData(const zim::Item::DirectAccessInfo& dai, zim::size_type size)
{
zim::DEFAULTFS::FD fd(zim::DEFAULTFS::openFile(dai.first));
Expand All @@ -625,7 +626,6 @@ zim::Blob readItemData(const zim::Item::DirectAccessInfo& dai, zim::size_type si
return zim::Blob(data, size);
}

#if WITH_TEST_DATA
TEST(ZimArchive, getDirectAccessInformation)
{
for(auto& testfile:getDataFilePath("small.zim")) {
Expand Down

0 comments on commit 62496cc

Please sign in to comment.