mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 06:30:05 +00:00 
			
		
		
		
	Robust coded location error handling
This commit is contained in:
		
							parent
							
								
									7d503ec506
								
							
						
					
					
						commit
						8f3baaa7c3
					
				
					 4 changed files with 131 additions and 13 deletions
				
			
		|  | @ -228,5 +228,29 @@ TEST(CodedLocation, MalformedData) | |||
|    EXPECT_EQ(dataValid, false); | ||||
| } | ||||
| 
 | ||||
| TEST(CodedLocation, InvalidWFOToken) | ||||
| { | ||||
|    std::vector<std::string> data = { | ||||
|       "LAT...LON abcd 14509 1371 18195 1348 14463 1325 14492"}; | ||||
| 
 | ||||
|    CodedLocation location; | ||||
|    bool          dataValid = location.Parse(data); | ||||
| 
 | ||||
|    EXPECT_EQ(dataValid, false); | ||||
| } | ||||
| 
 | ||||
| TEST(CodedLocation, InvalidNCToken) | ||||
| { | ||||
|    std::vector<std::string> data = { | ||||
|       "LAT...LON 4731abcd 47216795 46466767 45436766 44756779", | ||||
|       "      44216834 43816943 43706970 43837006 44497009", | ||||
|       "      45306974 46356946 46976921"}; | ||||
| 
 | ||||
|    CodedLocation location; | ||||
|    bool          dataValid = location.Parse(data); | ||||
| 
 | ||||
|    EXPECT_EQ(dataValid, false); | ||||
| } | ||||
| 
 | ||||
| } // namespace awips
 | ||||
| } // namespace scwx
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat