Boost Test Library is a portable test framework for performing unit testing in c++
Questions tagged [boost-test]
271 questions
1
vote
1 answer
Run Boost unit test with my own main function for debugging
I have a library inside which there are some testing programs written using Boost.Test. The test files don't have #define BOOST_TEST_DYN_LINK or #include . They only have #include . So the…

ayandas
- 2,070
- 1
- 13
- 26
1
vote
1 answer
print a std::vector of std::tuple with BOOST_CHECK_EQUAL_COLLECTION in Boost.Test
Hello I'm trying to use Boost.Test for my unit tests. However some of my functions return a collection of tuples, in a std::vector< std::tuple< TypeA, TypeB > >.
To work with BOOST_CHECK_EQUALS and BOOST_CHECK_EQUAL_COLLECTION, I specialized…

Lærne
- 3,010
- 1
- 22
- 33
1
vote
1 answer
Boost.Test Custom Type using decorator boost::unit_test::tolerance
I'm using Boost.Test to test for numerical values quite a lot. Often I have to compare the values of mathematical objects. Below is a toy example showing how I have to test quite a lot.
#define BOOST_TEST_MODULE VektorTest
#include…

Aleph0
- 5,816
- 4
- 29
- 80
1
vote
1 answer
boost-test 'filename'.test.report.xml not found
I use Visual Studio adapter for Boost.Test. I built boost.test[v1.59] project using cmake.
I didn't have any compile problems but when I tried to run tests I got the output like below:
Executing: -> [BoostUnitTestSample]
filestream was found to…

Roman Bedichevskii
- 305
- 2
- 6
1
vote
1 answer
Using Boost.Build and Boost.Test - linker errors
I'm stuck trying to figure out why my tests won't link. I'm using Boost.Build and Boost.Test from Boost 1.59 on Ubuntu. I built and installed the boost libraries from source.
I am specifying /boost//unit_test_framework as part of the unit…

Anthony
- 12,177
- 9
- 69
- 105
1
vote
0 answers
Multiple test adapters in TFS 2013 build
I am developing a software that contains multiple solution and uses:
Nunit Test Adapter: C# Solution
Boost Test Adapter: C++ Solution
until now what i am doing is use a version control path to custom assemblies, I have tried to decompress both of…

Kanekotic
- 2,824
- 3
- 21
- 35
1
vote
0 answers
boost: how to specify specific msvcrt.lib while building boost test
I am trying to build boost with specific msvcrt.lib file used for building other project. I didn't find flag or config section, where I can control this lib.
by default boost uses what is installed on machine. is there a way to overwrite this with…

Abhay
- 564
- 6
- 14
1
vote
2 answers
Boost.Test and Forking
I'm using Boost.Test for Unit testing and am currently running various mock servers in separate threads which get launched from within each test. In order to more accurately test my code the mock server's should really be in separate processes.
I…

Robert S. Barnes
- 39,711
- 30
- 131
- 179
1
vote
1 answer
Boost.Tests: Specify function name instead of main
I am working on a project using the cmake build system. By default CMake has a nice framework for generating a single executable from a set of C/C++ code. The cmake function is called create_test_sourcelist. What it does is generate a C/C++…

malat
- 12,152
- 13
- 89
- 158
1
vote
0 answers
Boost test: #include not found. How to link, config on MAC
I am new to boost.test library. I have boost downloaded before by MacPorts, and I can locate locally /usr/local/boost_1_57_0/boost/test/unit_test.hpp
Then I find an open source, and downloaded the zip folder. The url is here:…

user2751691
- 401
- 2
- 10
- 32
1
vote
3 answers
How to properly configure boost test with cmake
Boost.Test is a very nice unit-testing library, but allways when I try to configure it in a new project it is a major pain.
How to configure my project, that uses cmake, to use boost with following requirements (this is really a list of things I…

jb.
- 23,300
- 18
- 98
- 136
1
vote
1 answer
Switching on/off test suits with boost
I have a Class A (implemented in A.cpp and A.h). I have created a file testA.cpp and implemented tests for the class A. testA.cpp basically has the form:
#define BOOST_TEST_MODULE…

arthur
- 1,034
- 2
- 17
- 31
1
vote
1 answer
Hide cerr output during BOOST_CHECK_EQUAL
I am testing a function that returns an integer error code. I am using BOOST_CHECK_EQUAL to compare the functions return to the error code. Similar to this:
BOOST_CHECK_EQUAL( foo(a), 12 ) // where 12 is an error code
The function foo has a cerr…

Cory-G
- 1,025
- 14
- 26
1
vote
0 answers
Configure Visual Studio to use Boost::Tests for C++ command line app
How to properly configure Visual Studio solution to achieve:
Testing classes used in the application using Boost::Test unit tests
Building an executable file - the developed, command line application
That is what i currently have tried (basing on…

damgad
- 1,446
- 9
- 24
1
vote
1 answer
boost test on windows with mingw compiler error: putenv not declared
I'm trying to compile a library on windows with mingw, that uses boost.
I compiled boost with:
bootstrap mingw
b2 toolset=gcc
After that I build the library with cmake and mingw.
Building the dll itself works fine, but when I try to build the…

schlicht
- 4,735
- 1
- 13
- 23