mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 06:10:04 +00:00 
			
		
		
		
	Add IEM warnings provider test
This commit is contained in:
		
							parent
							
								
									59a8fdbf56
								
							
						
					
					
						commit
						f06191f290
					
				
					 2 changed files with 35 additions and 0 deletions
				
			
		
							
								
								
									
										34
									
								
								test/source/scwx/provider/iem_warnings_provider.test.cpp
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										34
									
								
								test/source/scwx/provider/iem_warnings_provider.test.cpp
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,34 @@ | ||||||
|  | #include <scwx/provider/iem_warnings_provider.hpp> | ||||||
|  | 
 | ||||||
|  | #include <gtest/gtest.h> | ||||||
|  | 
 | ||||||
|  | namespace scwx | ||||||
|  | { | ||||||
|  | namespace provider | ||||||
|  | { | ||||||
|  | 
 | ||||||
|  | TEST(IemWarningsProviderTest, LoadUpdatedFiles) | ||||||
|  | { | ||||||
|  |    using namespace std::chrono; | ||||||
|  |    using sys_days = time_point<system_clock, days>; | ||||||
|  | 
 | ||||||
|  |    IemWarningsProvider provider {}; | ||||||
|  | 
 | ||||||
|  |    auto date = sys_days {2023y / March / 25d}; | ||||||
|  | 
 | ||||||
|  |    auto torProducts = provider.ListTextProducts(date, {}, "TOR"); | ||||||
|  | 
 | ||||||
|  |    EXPECT_EQ(torProducts.size(), 35); | ||||||
|  | 
 | ||||||
|  |    if (torProducts.size() >= 1) | ||||||
|  |    { | ||||||
|  |       EXPECT_EQ(torProducts.at(0), "202303250016-KMEG-WFUS54-TORMEG"); | ||||||
|  |    } | ||||||
|  |    if (torProducts.size() >= 35) | ||||||
|  |    { | ||||||
|  |       EXPECT_EQ(torProducts.at(34), "202303252015-KFFC-WFUS52-TORFFC"); | ||||||
|  |    } | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | } // namespace provider
 | ||||||
|  | } // namespace scwx
 | ||||||
|  | @ -19,6 +19,7 @@ set(SRC_GR_TESTS source/scwx/gr/placefile.test.cpp) | ||||||
| set(SRC_NETWORK_TESTS source/scwx/network/dir_list.test.cpp) | set(SRC_NETWORK_TESTS source/scwx/network/dir_list.test.cpp) | ||||||
| set(SRC_PROVIDER_TESTS source/scwx/provider/aws_level2_data_provider.test.cpp | set(SRC_PROVIDER_TESTS source/scwx/provider/aws_level2_data_provider.test.cpp | ||||||
|                        source/scwx/provider/aws_level3_data_provider.test.cpp |                        source/scwx/provider/aws_level3_data_provider.test.cpp | ||||||
|  |                        source/scwx/provider/iem_warnings_provider.test.cpp | ||||||
|                        source/scwx/provider/warnings_provider.test.cpp) |                        source/scwx/provider/warnings_provider.test.cpp) | ||||||
| set(SRC_QT_CONFIG_TESTS source/scwx/qt/config/county_database.test.cpp | set(SRC_QT_CONFIG_TESTS source/scwx/qt/config/county_database.test.cpp | ||||||
|                         source/scwx/qt/config/radar_site.test.cpp) |                         source/scwx/qt/config/radar_site.test.cpp) | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat