⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 testassert.cpp

📁 开发源代码的CPU卡的COS源程序。
💻 CPP
字号:
#if HAVE_CMATH#   include <cmath>#else#   include <math.h>#endif#include <cppunit/TestAssert.h>#include <cppunit/NotEqualException.h>namespace CppUnit {#ifdef CPPUNIT_ENABLE_SOURCELINE_DEPRECATED/// Check for a failed general assertion void TestAssert::assertImplementation( bool condition,                                  std::string conditionExpression,                                  long lineNumber,                                  std::string fileName ){  Asserter::failIf( condition,                     conditionExpression,                     SourceLine( fileName, lineNumber ) );}/// Reports failed equalityvoid TestAssert::assertNotEqualImplementation( std::string expected,                                          std::string actual,                                          long lineNumber,                                          std::string fileName ){  Asserter::failNotEqual( expected,                           actual,                           SouceLine( fileName, lineNumber ), "" );}/// Check for a failed equality assertionvoid TestAssert::assertEquals( double expected,                           double actual,                           double delta,                          long lineNumber,                          std::string fileName ){   if (fabs (expected - actual) > delta)     assertNotEqualImplementation( assertion_traits<double>::toString(expected),                                  assertion_traits<double>::toString(actual),                                  lineNumber,                                   fileName ); }#else  // CPPUNIT_ENABLE_SOURCELINE_DEPRECATEDvoid TestAssert::assertDoubleEquals( double expected,                                double actual,                                double delta,                                SourceLine sourceLine ){  Asserter::failNotEqualIf( fabs( expected - actual ) > delta,                            assertion_traits<double>::toString(expected),                            assertion_traits<double>::toString(actual),                            sourceLine );}#endif}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -