mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 06:00:05 +00:00
Adding 2002 ARCHIVE2 file to Level 2 test set
This commit is contained in:
parent
9071c4751e
commit
6af8e398dd
2 changed files with 20 additions and 15 deletions
|
|
@ -1 +1 @@
|
|||
Subproject commit 6632ffd6ba35b799dd803e9711281d54a3858a29
|
||||
Subproject commit e3e743a5cc9c065d05f00151380fea892fb2156c
|
||||
|
|
@ -1,7 +1,5 @@
|
|||
#include <scwx/wsr88d/ar2v_file.hpp>
|
||||
|
||||
#include <fstream>
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
namespace scwx
|
||||
|
|
@ -9,25 +7,32 @@ namespace scwx
|
|||
namespace wsr88d
|
||||
{
|
||||
|
||||
TEST(ar2v_file, klsx)
|
||||
class Ar2vValidFileTest :
|
||||
public testing::TestWithParam<std::pair<std::string, std::size_t>>
|
||||
{
|
||||
};
|
||||
|
||||
TEST_P(Ar2vValidFileTest, ValidFile)
|
||||
{
|
||||
auto& param = GetParam();
|
||||
|
||||
Ar2vFile file;
|
||||
bool fileValid =
|
||||
file.LoadFile(std::string(SCWX_TEST_DATA_DIR) +
|
||||
"/nexrad/level2/Level2_KLSX_20210527_1757.ar2v");
|
||||
file.LoadFile(std::string(SCWX_TEST_DATA_DIR) + param.first);
|
||||
|
||||
EXPECT_EQ(fileValid, true);
|
||||
EXPECT_EQ(file.message_count(), param.second);
|
||||
}
|
||||
|
||||
TEST(ar2v_file, tstl)
|
||||
{
|
||||
Ar2vFile file;
|
||||
bool fileValid =
|
||||
file.LoadFile(std::string(SCWX_TEST_DATA_DIR) +
|
||||
"/nexrad/level2/Level2_TSTL_20220213_2357.ar2v");
|
||||
|
||||
EXPECT_EQ(fileValid, true);
|
||||
}
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
Ar2vFile,
|
||||
Ar2vValidFileTest,
|
||||
testing::Values(std::pair<std::string, std::size_t> //
|
||||
{"/nexrad/level2/KCLE20021110_221234", 4031},
|
||||
std::pair<std::string, std::size_t> //
|
||||
{"/nexrad/level2/Level2_KLSX_20210527_1757.ar2v", 11167},
|
||||
std::pair<std::string, std::size_t> //
|
||||
{"/nexrad/level2/Level2_TSTL_20220213_2357.ar2v", 5763}));
|
||||
|
||||
} // namespace wsr88d
|
||||
} // namespace scwx
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue