mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 14:00:06 +00:00
Text product files
This commit is contained in:
parent
55d856a745
commit
e5c40b9eb5
7 changed files with 172 additions and 4 deletions
39
test/source/scwx/awips/text_product_file.test.cpp
Normal file
39
test/source/scwx/awips/text_product_file.test.cpp
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
#include <scwx/awips/text_product_file.hpp>
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include <boost/log/trivial.hpp>
|
||||
|
||||
namespace scwx
|
||||
{
|
||||
namespace awips
|
||||
{
|
||||
|
||||
static const std::string logPrefix_ = "[scwx::awips::text_product_file.test] ";
|
||||
|
||||
class TextProductValidFileTest : public testing::TestWithParam<std::string>
|
||||
{
|
||||
};
|
||||
|
||||
TEST_P(TextProductValidFileTest, ValidFile)
|
||||
{
|
||||
TextProductFile file;
|
||||
|
||||
auto param = GetParam();
|
||||
|
||||
const std::string filename {std::string(SCWX_TEST_DATA_DIR) + param};
|
||||
file.LoadFile(filename);
|
||||
|
||||
EXPECT_GT(file.message_count(), 0);
|
||||
}
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
TextProductFile,
|
||||
TextProductValidFileTest,
|
||||
testing::Values("/warnings/warnings_20210604_21.txt",
|
||||
"/warnings/warnings_20210606_15.txt",
|
||||
"/warnings/warnings_20210606_22-59.txt",
|
||||
"/nexrad/level3/KLSX_NOUS63_FTMLSX_202201041404"));
|
||||
|
||||
} // namespace awips
|
||||
} // namespace scwx
|
||||
Loading…
Add table
Add a link
Reference in a new issue