mirror of
				https://github.com/catchorg/Catch2.git
				synced 2025-10-31 12:17:11 +01:00 
			
		
		
		
	Fix bug in WithinAbs::match() and add tests for it
This commit is contained in:
		| @@ -88,7 +88,7 @@ namespace Floating { | ||||
|     // Performs equivalent check of std::fabs(lhs - rhs) <= margin | ||||
|     // But without the subtraction to allow for INFINITY in comparison | ||||
|     bool WithinAbsMatcher::match(double const& matchee) const { | ||||
|         return (matchee + m_margin >= m_target) && (m_target + m_margin >= m_margin); | ||||
|         return (matchee + m_margin >= m_target) && (m_target + m_margin >= matchee); | ||||
|     } | ||||
|  | ||||
|     std::string WithinAbsMatcher::describe() const { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 jsc
					jsc