mirror of
				https://github.com/jbeder/yaml-cpp.git
				synced 2025-10-27 14:31:20 +00:00 
			
		
		
		
	Fixed negative infinity parsing
This commit is contained in:
		| @@ -822,13 +822,13 @@ namespace Test | ||||
| 			parser.GetNextDocument(doc); | ||||
| 			 | ||||
| 			for(unsigned i=0;i<doc.size();i++) | ||||
| 				if(doc[i].to<double>() != std::numeric_limits<double>::infinity()) | ||||
| 				if(doc[i].to<double>() != (i < 6 ? +1 : -1) * std::numeric_limits<double>::infinity()) | ||||
| 					return false; | ||||
| 			for(unsigned i=0;i<doc.size();i++) | ||||
| 				if(doc[i].to<long double>() != std::numeric_limits<long double>::infinity()) | ||||
| 				if(doc[i].to<long double>() != (i < 6 ? +1 : -1) * std::numeric_limits<long double>::infinity()) | ||||
| 					return false; | ||||
| 			for(unsigned i=0;i<doc.size();i++) | ||||
| 				if(doc[i].to<float>() != std::numeric_limits<float>::infinity()) | ||||
| 				if(doc[i].to<float>() != (i < 6 ? +1 : -1) * std::numeric_limits<float>::infinity()) | ||||
| 					return false; | ||||
| 			return true; | ||||
| 		} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Jesse Beder
					Jesse Beder