mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 07:50:04 +00:00
Text product files
This commit is contained in:
parent
55d856a745
commit
e5c40b9eb5
7 changed files with 172 additions and 4 deletions
|
|
@ -1 +1 @@
|
|||
Subproject commit c1d6d76c56f75d8f68b6d7dd8f223b0a199c6e36
|
||||
Subproject commit 9d377550477ba00b9da3b594b838ba08d3ebcaaf
|
||||
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
|
||||
|
|
@ -7,12 +7,12 @@ namespace scwx
|
|||
namespace wsr88d
|
||||
{
|
||||
|
||||
class ValidFileTest :
|
||||
class Level3ValidFileTest :
|
||||
public testing::TestWithParam<std::pair<int16_t, std::string>>
|
||||
{
|
||||
};
|
||||
|
||||
TEST_P(ValidFileTest, ValidFile)
|
||||
TEST_P(Level3ValidFileTest, ValidFile)
|
||||
{
|
||||
Level3File file;
|
||||
|
||||
|
|
@ -31,7 +31,7 @@ TEST_P(ValidFileTest, ValidFile)
|
|||
|
||||
INSTANTIATE_TEST_SUITE_P(
|
||||
Level3File,
|
||||
ValidFileTest,
|
||||
Level3ValidFileTest,
|
||||
testing::Values(
|
||||
std::pair<int16_t, std::string> {2, "KLSX_NXUS63_GSMLSX_202112110238"},
|
||||
std::pair<int16_t, std::string> {19, "KLSX_SDUS53_N0RLSX_202105041639"},
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ find_package(BZip2)
|
|||
find_package(GTest)
|
||||
|
||||
set(SRC_MAIN source/scwx/wxtest.cpp)
|
||||
set(SRC_AWIPS_TESTS source/scwx/awips/text_product_file.test.cpp)
|
||||
set(SRC_COMMON_TESTS source/scwx/common/color_table.test.cpp)
|
||||
set(SRC_QT_MANAGER_TESTS source/scwx/qt/manager/settings_manager.test.cpp)
|
||||
set(SRC_UTIL_TESTS source/scwx/util/rangebuf.test.cpp
|
||||
|
|
@ -17,12 +18,14 @@ set(SRC_WSR88D_TESTS source/scwx/wsr88d/ar2v_file.test.cpp
|
|||
source/scwx/wsr88d/level3_file.test.cpp)
|
||||
|
||||
add_executable(wxtest ${SRC_MAIN}
|
||||
${SRC_AWIPS_TESTS}
|
||||
${SRC_COMMON_TESTS}
|
||||
${SRC_QT_MANAGER_TESTS}
|
||||
${SRC_UTIL_TESTS}
|
||||
${SRC_WSR88D_TESTS})
|
||||
|
||||
source_group("Source Files\\main" FILES ${SRC_MAIN})
|
||||
source_group("Source Files\\awips" FILES ${SRC_AWIPS_TESTS})
|
||||
source_group("Source Files\\common" FILES ${SRC_COMMON_TESTS})
|
||||
source_group("Source Files\\qt\\manager" FILES ${SRC_QT_MANAGER_TESTS})
|
||||
source_group("Source Files\\util" FILES ${SRC_UTIL_TESTS})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue