#ifndef JSON_SPIRIT_TEST_UTILS #define JSON_SPIRIT_TEST_UTILS // Copyright John W. Wilkinson 2007 - 2011 // Distributed under the MIT License, see accompanying file LICENSE.txt // json spirit version 4.05 #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif #include <cassert> #include <cmath> // these functions allow you to inspect the values that caused a test to fail template< class T1, class T2 > void assert_eq( const T1& t1, const T2& t2 ) { if( t1 == t2 ) return; assert( false ); } template< class T1, class T2 > void assert_neq( const T1& t1, const T2& t2 ) { if( !(t1 == t2) ) return; assert( false ); } void assert_eq( const double d1, const double d2, const double abs_error ); #endif
By viewing downloads associated with this article you agree to the Terms of use and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.
This article, along with any associated source code and files, is licensed under The MIT License
Skills that self-taught computer programmers lack