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
				
			
		|  | @ -106,5 +106,38 @@ TEST(CodedTimeMotionLocation, MalformedData) | |||
|    EXPECT_EQ(dataValid, false); | ||||
| } | ||||
| 
 | ||||
| TEST(CodedTimeMotionLocation, InvalidDirection) | ||||
| { | ||||
|    std::vector<std::string> data = { | ||||
|       "TIME...MOT...LOC 1959Z ZZZDEG 0KT 3253 11464"}; | ||||
| 
 | ||||
|    CodedTimeMotionLocation tml; | ||||
|    bool                    dataValid = tml.Parse(data); | ||||
| 
 | ||||
|    EXPECT_EQ(dataValid, false); | ||||
| } | ||||
| 
 | ||||
| TEST(CodedTimeMotionLocation, InvalidSpeed) | ||||
| { | ||||
|    std::vector<std::string> data = { | ||||
|       "TIME...MOT...LOC 1959Z 254DEG ZKT 3253 11464"}; | ||||
| 
 | ||||
|    CodedTimeMotionLocation tml; | ||||
|    bool                    dataValid = tml.Parse(data); | ||||
| 
 | ||||
|    EXPECT_EQ(dataValid, false); | ||||
| } | ||||
| 
 | ||||
| TEST(CodedTimeMotionLocation, InvalidLocation) | ||||
| { | ||||
|    std::vector<std::string> data = { | ||||
|       "TIME...MOT...LOC 1959Z 254DEG 0KT ZZZZ 11464"}; | ||||
| 
 | ||||
|    CodedTimeMotionLocation tml; | ||||
|    bool                    dataValid = tml.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