cppunit/1.15.1

CppUnit is the C++ port of the famous JUnit framework for unit testing. Test output is in XML for automatic testing and GUI based for supervised tests.
Recipe info
LGPL-2.1-or-later
2023-02-16

Available packages
Linux
Windows
macOS
macOS Apple Silicon

Install
Add the following line to your conanfile.txt:
[requires]
cppunit/1.15.1

Using cppunit

Note

If you are a new Conan user, we recommend reading the how to consume packages tutorial.

If you need additional assistance, please ask a question in the Conan Center Index repository.

Simplest use case consuming this recipe and assuming CMake as your local build tool:

[requires]
cppunit/1.15.1
[generators]
CMakeDeps
CMakeToolchain
[layout]
cmake_layout
from conan import ConanFile
from conan.tools.cmake import cmake_layout


class ExampleRecipe(ConanFile):
    settings = "os", "compiler", "build_type", "arch"
    generators = "CMakeDeps", "CMakeToolchain"

    def requirements(self):
        self.requires("cppunit/1.15.1")

    def layout(self):
        cmake_layout(self)

Now, you can run this Conan command to locally install (and build if necessary) this recipe and its dependencies (if any):

$ conan install conanfile.txt --build=missing

Useful information to take into account to consume this library:


These are the main declared targets:

  • CMake package name(s): cppunit
  • CMake target name(s): cppunit::cppunit
  • pkg-config file name(s): cppunit.pc

A simple use case using the CMake file name and the global target:

# ...
find_package(cppunit REQUIRED)
# ...
target_link_libraries(YOUR_TARGET cppunit::cppunit)

These are all the available headers. Some of these ones might be non-public; make sure of it by visiting the cppunit homepage listed above:

#include "cppunit/AdditionalMessage.h"
#include "cppunit/Asserter.h"
#include "cppunit/BriefTestProgressListener.h"
#include "cppunit/CompilerOutputter.h"
#include "cppunit/Exception.h"
#include "cppunit/Message.h"
#include "cppunit/Outputter.h"
#include "cppunit/Portability.h"
#include "cppunit/Protector.h"
#include "cppunit/SourceLine.h"
#include "cppunit/SynchronizedObject.h"
#include "cppunit/Test.h"
#include "cppunit/TestAssert.h"
#include "cppunit/TestCaller.h"
#include "cppunit/TestCase.h"
#include "cppunit/TestComposite.h"
#include "cppunit/TestFailure.h"
#include "cppunit/TestFixture.h"
#include "cppunit/TestLeaf.h"
#include "cppunit/TestListener.h"
#include "cppunit/TestPath.h"
#include "cppunit/TestResult.h"
#include "cppunit/TestResultCollector.h"
#include "cppunit/TestRunner.h"
#include "cppunit/TestSuccessListener.h"
#include "cppunit/TestSuite.h"
#include "cppunit/TextOutputter.h"
#include "cppunit/TextTestProgressListener.h"
#include "cppunit/TextTestResult.h"
#include "cppunit/TextTestRunner.h"
#include "cppunit/XmlOutputter.h"
#include "cppunit/XmlOutputterHook.h"
#include "cppunit/config-auto.h"
#include "cppunit/config/CppUnitApi.h"
#include "cppunit/config/SelectDllLoader.h"
#include "cppunit/config/SourcePrefix.h"
#include "cppunit/config/config-bcb5.h"
#include "cppunit/config/config-evc4.h"
#include "cppunit/config/config-mac.h"
#include "cppunit/config/config-msvc6.h"
#include "cppunit/extensions/AutoRegisterSuite.h"
#include "cppunit/extensions/ExceptionTestCaseDecorator.h"
#include "cppunit/extensions/HelperMacros.h"
#include "cppunit/extensions/Orthodox.h"
#include "cppunit/extensions/RepeatedTest.h"
#include "cppunit/extensions/TestCaseDecorator.h"
#include "cppunit/extensions/TestDecorator.h"
#include "cppunit/extensions/TestFactory.h"
#include "cppunit/extensions/TestFactoryRegistry.h"
#include "cppunit/extensions/TestFixtureFactory.h"
#include "cppunit/extensions/TestNamer.h"
#include "cppunit/extensions/TestSetUp.h"
#include "cppunit/extensions/TestSuiteBuilderContext.h"
#include "cppunit/extensions/TestSuiteFactory.h"
#include "cppunit/extensions/TypeInfoHelper.h"
#include "cppunit/plugin/DynamicLibraryManager.h"
#include "cppunit/plugin/DynamicLibraryManagerException.h"
#include "cppunit/plugin/PlugInManager.h"
#include "cppunit/plugin/PlugInParameters.h"
#include "cppunit/plugin/TestPlugIn.h"
#include "cppunit/plugin/TestPlugInDefaultImpl.h"
#include "cppunit/portability/FloatingPoint.h"
#include "cppunit/portability/Stream.h"
#include "cppunit/tools/Algorithm.h"
#include "cppunit/tools/StringHelper.h"
#include "cppunit/tools/StringTools.h"
#include "cppunit/tools/XmlDocument.h"
#include "cppunit/tools/XmlElement.h"
#include "cppunit/ui/text/TestRunner.h"
#include "cppunit/ui/text/TextTestRunner.h"