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

📄 unittest.h

📁 利用C
💻 H
字号:
// Copyright (C) 2007 Anders Logg.// Licensed under the GNU LGPL Version 2.1.//// First added:  2007-05-14// Last changed: 2007-05-24//// Simple macro for DOLFIN unit tests (using cppunit). The macro// DOLFIN_TEST removes the need of repeating the same 8 lines of// code in every single unit test.#include <cppunit/extensions/HelperMacros.h>#include <cppunit/TestRunner.h>#include <cppunit/TestResult.h>#include <cppunit/TestResultCollector.h>#include <cppunit/CompilerOutputter.h>#define DOLFIN_TEST \CppUnit::TestResult result; \CppUnit::TestResultCollector collected_results; \result.addListener(&collected_results); \CppUnit::TestRunner runner; \runner.addTest(CppUnit::TestFactoryRegistry::getRegistry().makeTest()); \runner.run(result); \CppUnit::CompilerOutputter outputter(&collected_results, std::cerr); \outputter.write (); \return collected_results.wasSuccessful () ? 0 : 1;

⌨️ 快捷键说明

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