Boost Test Library is a portable test framework for performing unit testing in c++
Questions tagged [boost-test]
271 questions
0
votes
1 answer
installed boost, but libboost_unit_test_framework.a not found in /usr/local/lib/
I installed the entire boost form its official site, boost 1.57.0
Right now, I just need the boost test library, and I downloaded an example from github https://github.com/jsankey/boost.test-examples
In its makefile, I deleted other targets and only…

user2751691
- 401
- 2
- 10
- 32
0
votes
2 answers
How to define Boosts tests to run in code?
Using Boost.Test I'm trying to specify the BOOST_TESTS_TO_RUN environment variable in code, so that only some tests will be executed. Using #define BOOST_TESTS_TO_RUN.
The command line parameter --run_tests works fine. But I'd like to do it via the…

Sergio Basurco
- 3,488
- 2
- 22
- 40
0
votes
1 answer
Explicitly specializing template, static vs. duplicate symbols
In a bunch of legacy code I have inherited, unit tests are implemented using Boost.Test. To enable checking std::wstring and icu::UnicodeString for equality via BOOST_CHECK_EQUAL(), the original author implemented explicit template specializations…

DevSolar
- 67,862
- 21
- 134
- 209
0
votes
1 answer
Boost Unit Test Framework dependencies execution order
I am trying to set dependencies in the Boost Unit Testing Framework.
I have found this thread tbat has an example of how to use the test_unit::depends_on() method. So far so good, I can write some magickery around that to smooth it out.
However, the…

namezero
- 2,203
- 3
- 24
- 37
0
votes
1 answer
Boost unit test Qt signal
Using Boost Unit Test framework to perform unit test on C++\Qt code.
We are basically using BOOST_FIXTURE_TEST_CASE macro as shown in documentation. For each test we create an instance of QApplication to setup the event loop and enable the test code…

LarsA
- 595
- 2
- 6
- 14
0
votes
0 answers
What to do when an error occurs in Boost Test fixture?
I want to be able to prematurely exit a test suite (in Boost Test) from within the fixture constructor due to the possibility of errors in the initialization code (non-existent input file in particular). Should I just call exit() or is there a…

Elektito
- 3,863
- 8
- 42
- 72
0
votes
1 answer
Error while running boost test project: testcaseName: No such file or directory
I'm trying to make use of boost unit test suite.
#define BOOST_TEST_DYN_LINK
#define BOOST_TEST_MODULE main_test_module
#include
#include
.... // introducing some functions and variables…

Roman
- 1,396
- 4
- 15
- 39
0
votes
1 answer
Boost.Test howto create "test dependency"
I'm using boost.test as test suite. I want to know if is possible make some prerequisite for test. For example
uniqut_ptr< MyClass > g_class;
BOOST_AUTO_TEST_CASE( test1 )
{
BOOST_REQUIRE_NO_THROW( g_class = CreateMyClass()…

Elvis Dukaj
- 7,142
- 12
- 43
- 85
0
votes
0 answers
Difference between CLOSE and CLOSE_FRACTION
Can anybody explain the difference between BOOST_CHECK_CLOSE and BOOST_CHECK_CLOSE_FRACTION?
I just skimmed through the boost.test Testing Tools Reference and I'm pretty sure that they have an equal description.

anhoppe
- 4,287
- 3
- 46
- 58
0
votes
2 answers
BOOST_CHECK_EQUAL_COLLECTIONS in Google Test
I have been trying to find an assertion in the Google C++ Testing Framework / gtest which is equivalent to the BOOST_CHECK_EQUAL_COLLECTIONS assertion found in the Boost Test Library.
However; without success. So my question is two-fold:
Does gtest…

safl
- 1,077
- 3
- 11
- 17
0
votes
1 answer
trouble building boost test with cmake
I'm rather new to C++, Boost test, and CMake, so please pardon my stumblings here.
Here is my top level CMakeLists.txt
cmake_minimum_required(VERSION 2.8)
project(JANKEN)
set ( CMAKE_CXX_COMPILER gcc )
set(CMAKE_CXX_FLAGS "-g -std=c++11 -Wall…

piyo
- 461
- 1
- 5
- 18
0
votes
3 answers
Strange execution errors in application
I've got a unit test I'm writing which seems to have some kind of a pointer problem. Basically, it's testing a class that, once constructed, returns information about a file. If all the files expected are detected, then the test operates correctly.…

Billy ONeal
- 104,103
- 58
- 317
- 552
0
votes
0 answers
boost unit test cpp file can not see one object file in a library
I have a test.cpp file, written for using boost unit test.
test.cpp :
#define BOOST_TEST_DYN_LINK
#include
.........
I am trying to linking this test.cpp with a library named liba.
g++ test.cpp -L/liba_directory -la …

user1470393
- 317
- 4
- 12
0
votes
0 answers
link problems when using a test dll and a production dll
I want to write unit tests for internal components of a DLL, and in the testing project I can only access exported symbols. I want to test internal classes also, and I don't want to export them just for the tests.
I'm using boost test, visual…

shoren
- 931
- 8
- 20
0
votes
1 answer
Using BoostTest to run unit tests multiple times without quitting test runner
I want to use Boost Test to run unit tests multiple times without quitting the test runner. Here is the pseudo-code to demonstrate what I want to do:
void main() {
for(int i = 0; i < 10; ++i)
{
char *arguments[] ={…

Pankaj Nathani
- 1
- 1