boost-test

How to process Boost.Test output with Eclipse

浪子不回头ぞ 提交于 2019-11-29 09:18:02
问题 I'm using Eclipse CDT and Boost.Test(with Boost.Build). I would like Eclipse to parse output of Boost.Test generated during by run of test suites during build. Does anybody know how to achieve this? Thanks in advance 回答1: Go to Window > Preferences. In the preferences dialog, choose C/C++ > Build from the options tree. Under error parsers, click "Add..." In the new dialog, replace "Regex Error Parser" with something like "Boost Unit Test Error Parser". In the Error Parser Options pane, add

Using Jenkins with boost.test unit tests

两盒软妹~` 提交于 2019-11-28 20:20:09
问题 I have done a bit of Googling in this area and have found many discussions about getting Jenkins to understand boost.test's XML output format, but no canonical reference. Some people say we simply need to use XLST to convert the XML format, others suggest the XML needs some hacking before that (Anyone have an XSL to convert Boost.Test XML logs to a presentable format?). Some suggest the xUnit plugin can natively understand boost.test XML format, others state it can't Because my search results

CMake: Project structure with unit tests

本小妞迷上赌 提交于 2019-11-28 02:38:05
I am trying to structure my project to include the production sources (in src subfolder) and tests (in test subfolder). I am using CMake to build this. As a minimal example I have the following files: CMakeLists.txt: cmake_minimum_required (VERSION 2.8) project (TEST) add_subdirectory (src) add_subdirectory (test) src/CMakeLists.txt: add_executable (demo main.cpp sqr.cpp) src/sqr.h #ifndef SQR_H #define SQR_H double sqr(double); #endif // SQR_H src/sqr.cpp #include "sqr.h" double sqr(double x) { return x*x; } src/main.cpp - uses sqr, doesn't really matter test/CMakeLists.txt: find_package

CMake: Project structure with unit tests

十年热恋 提交于 2019-11-27 04:09:00
问题 I am trying to structure my project to include the production sources (in src subfolder) and tests (in test subfolder). I am using CMake to build this. As a minimal example I have the following files: CMakeLists.txt: cmake_minimum_required (VERSION 2.8) project (TEST) add_subdirectory (src) add_subdirectory (test) src/CMakeLists.txt: add_executable (demo main.cpp sqr.cpp) src/sqr.h #ifndef SQR_H #define SQR_H double sqr(double); #endif // SQR_H src/sqr.cpp #include "sqr.h" double sqr(double x

CMake: how to add Boost.Test cases with relative directories?

风流意气都作罢 提交于 2019-11-27 03:31:44
问题 I have a working project with CMake and Boost.Test with a directory structure like this (pardon the ASCII art): +-proj |---CMakeLists.txt |---build |---test |\----dir1 | \----foo.cpp // contains one BOOST_AUTO_TEST_SUITE and several BOOST_AUTO_TEST_CASE | |---bar.cpp // contains one BOOST_AUTO_TEST_SUITE and several BOOST_AUTO_TEST_CASE \----dir2 \----foo.cpp // contains one BOOST_AUTO_TEST_SUITE and several BOOST_AUTO_TEST_CASE |---bar.cpp // contains one BOOST_AUTO_TEST_SUITE and several

Comparison of C++ unit test frameworks [closed]

时光总嘲笑我的痴心妄想 提交于 2019-11-26 12:33:58
I know there are already a few questions regarding recommendations for C++ unit test frameworks, but all the answers did not help as they just recommend one of the frameworks but do not provide any information about a (feature) comparison. I think the most interesting frameworks are CppUnit, Boost and the new Google testing framework. Has anybody done any comparison yet? Sam Saffron See this question for some discussion. They recommend the articles: Exploring the C++ Unit Testing Framework Jungle , By Noel Llopis. And the more recent: C++ Test Unit Frameworks I have not found an article that

Comparison of C++ unit test frameworks [closed]

不羁岁月 提交于 2019-11-26 02:59:32
问题 I know there are already a few questions regarding recommendations for C++ unit test frameworks, but all the answers did not help as they just recommend one of the frameworks but do not provide any information about a (feature) comparison. I think the most interesting frameworks are CppUnit, Boost and the new Google testing framework. Has anybody done any comparison yet? 回答1: See this question for some discussion. They recommend the articles: Exploring the C++ Unit Testing Framework Jungle,