Questions tagged [boost-test]

Boost Test Library is a portable test framework for performing unit testing in c++

271 questions
2
votes
1 answer

Shall I test different classes separately using Boost.Test?

I'm using Boost.Test with Xcode to test my C++ program. There are several ways to do so. Test each class separately. That is, I should start multiple projects, one project for each class. Boost should provide the main(). I should use my own main()…
Ying Zhou
  • 189
  • 3
  • 16
2
votes
0 answers

fatal error: 'boost/test/unit_test.hpp' file not found

I need to incorporate Boost.Test into my C++ program on macOS. Before doing so I first need to test makefiles using an example: https://github.com/jsankey/boost.test-examples The makefile included does not work so I modified it. TARGETS=main hello…
Ying Zhou
  • 189
  • 3
  • 16
2
votes
4 answers

CoInitializeEx for a boost::test::unit_test

The other day, I decided that I needed to know about test driven development for C++ on the Windows platform (using Visual Studio 2010 Premium). I had a look around before settling on trying out boost's unit test framework. I should say that I…
user206705
2
votes
1 answer

boost test fails to find custom print

For some reason boost::test can't manage to compile the following code #define BOOST_TEST_MODULE EPUTests #include #include using epu8 = uint8_t __attribute__((vector_size(16))); std::ostream…
hivert
  • 10,579
  • 3
  • 31
  • 56
2
votes
2 answers

Can ctest output all log messages from the test program, e.g. boost test?

The boost test library supports various logging options, for example: --log_level=all or log_level=test_suite. And the ctest test driver program has the option --output-on-failure which nicely outputs the messages from boost test. Is it possible to…
user6309798
2
votes
2 answers

How to run Boost Test and produce Minidumps?

Our project uses Boost.Test for our units tests. We would like to get minidumps when unexpected exceptions occur during our test cases as well, so we've started integrating Google Breakpad to write the minidumps. It looks like Boost.Test is…
mbradber
  • 489
  • 5
  • 17
2
votes
1 answer

When does a dataset(and samples) destruct in boost::test?

I am trying to learn how to use boost::test's data-driven test functionality. How ever I ran into a trouble which I believe related to dataset(and samples)'s destruction. Take the following code snippet as example: #define BOOST_TEST_MODULE…
Jinpei Li
  • 21
  • 1
  • 5
2
votes
1 answer

Cannot read from pseudoterminal

I've a written a high level wrapper and command collection that uses the RProc/RPMsg interface to communicate with a microprocessor, in order to test as much as possible I've written unit tests for it that use a Linux pseudoterminal in place of the…
cmannett85
  • 21,725
  • 8
  • 76
  • 119
2
votes
1 answer

Issues Installing and using Boost unit testing framework

I installed boost on my mac like so brew install boost and then created a file called BoostTest.cpp containing the following minimal example: #define BOOST_TEST_DYN_LINK #define BOOST_TEST_MODULE BoostTest #include int…
SomeRandomPhysicist
  • 1,531
  • 4
  • 19
  • 42
2
votes
1 answer

libboost 1.62 error option --log_sink

I just install boost 1.62 and run boost unit test option with --log_sink=output.xml but i got an error. here is my command line ./App --log_level=test_suite --log_format=JUNIT --log_sink=output.xml and i got this error message from boost test setup…
user3773632
  • 445
  • 6
  • 20
2
votes
1 answer

Best practice using boost test and tests that should not compile

I'm looking for a reasonable approach to test C++ template based software, where I want to check template arguments. If the argument do not fit certain criteria, I want the compiler to issue an error. So far so good... Now I want to test that…
Torsten Robitzki
  • 3,041
  • 1
  • 21
  • 35
2
votes
0 answers

Boost.Test alternative test module initialization function cannot convert parameter to 'boost::unit_test::init_unit_test_func'

I started working with Boost.Test and trying some examples, and things were going so-far-so-good. But I'm having trouble with http://www.boost.org/doc/libs/1_57_0/libs/test/doc/html/utf/user-guide/test-organization/manual-nullary-test-case.html,…
Jeff M
  • 2,492
  • 3
  • 22
  • 38
2
votes
1 answer

SIGSEGV in boost::unit_test::output::compiler_log_formatter start and finish

SIGSEGV in boost::unit_test::output::compiler_log_formatter::log_start() call to ostream::_M_insert() Hi, all! I'm trying to compile a code which uses the Boost.Test module, and while playing around with some of the parameters it seems to have…
Inon
  • 2,106
  • 3
  • 12
  • 17
2
votes
2 answers

Getting access to Boost Test classes - test_results and results_collector

I've been able to configure Boost Test to create a report when the tests are complete but what I'd also like to do is while running a set of tests to be able to print the pass/fail state of each test to the console as the tests are running. So I…
ksl
  • 4,519
  • 11
  • 65
  • 106
2
votes
1 answer

How to log Boost.Test output to both stdout in HRF and to a file in XML?

I would like to enable logging of Boost.Test output to both the stdout/sterr and to a logfile. However, I would also like to have the stdout logging be in HumanReadableFormat and only the file output be in XML format. Generating a report file seems…
Martin Ba
  • 37,187
  • 33
  • 183
  • 337