@@ -1316,13 +1316,14 @@ PTF_TEST_CASE(TestPcapNgFileReadWrite)
13161316
13171317PTF_TEST_CASE (TestPcapNgZstdCompressionLevels)
13181318{
1319+ #ifdef USE_Z_STD
13191320 // If the compression level is silently ignored, low and high levels
13201321 // produce identical output sizes. PcapPlusPlus exposes levels 0-10,
13211322 // which the zstd wrapper maps to zstd's native 1-22 range. Test three
13221323 // points to verify the level scales monotonically, not just that the
13231324 // endpoints differ.
1324- int sizes[ 3 ] = { 0 , 0 , 0 };
1325- const int levels[ 3 ] = { 1 , 5 , 10 };
1325+ std::array< int , 3 > sizes = { 0 , 0 , 0 };
1326+ const std::array< int , 3 > levels = { 1 , 5 , 10 };
13261327 for (int i = 0 ; i < 3 ; i++)
13271328 {
13281329 pcpp::PcapNgFileReaderDevice readerDev (EXAMPLE2_PCAPNG_PATH );
@@ -1343,6 +1344,9 @@ PTF_TEST_CASE(TestPcapNgZstdCompressionLevels)
13431344 }
13441345 PTF_ASSERT_GREATER_THAN (sizes[0 ], sizes[1 ]);
13451346 PTF_ASSERT_GREATER_THAN (sizes[1 ], sizes[2 ]);
1347+ #else
1348+ PTF_SKIP_TEST (" Zstd is not configured" );
1349+ #endif
13461350} // TestPcapNgZstdCompressionLevels
13471351
13481352PTF_TEST_CASE (TestPcapNgFileReadWriteAdv)
0 commit comments