Boost Test Library is a portable test framework for performing unit testing in c++
Questions tagged [boost-test]
271 questions
2
votes
1 answer
boost test -- "The ordinal 313 could not be located"
I'm trying to run an application that uses boost test via dynamic link. I have an application's exe file and boost_unit_test_framework-vc120-mt-gd-1_55.dll in the same directory. When I try to launch it gives me the following error:
Why? How can I…

FrozenHeart
- 19,844
- 33
- 126
- 242
2
votes
1 answer
Boost Test BOOST_CHECK_EQUAL with types convertible to array
Here's a simple program using Boost Test which behaves "strangely":
#define BOOST_TEST_DYN_LINK
#define BOOST_TEST_MODULE foo
#include
class C
{
public:
C(char* str) : m_str(str) {}
operator char*() const { return…

John Zwinck
- 239,568
- 38
- 324
- 436
2
votes
1 answer
How do I wrap BOOST_CHECK_CLOSE?
We're using Boost::Test to unit test our code (Visual Studio 2010, win32 C++ project). Since we're often working with Ogre::Vector3 objects (geometrical vectors in 3D space) I've written this wrapper to easily test two Vector3 objects for…

dr. Sybren
- 829
- 5
- 18
2
votes
0 answers
Boost test summary report with failures?
Is there a way to produce a summary report of failures in using Boost test? I know about the existing report options but they produce too much output. My basic problem is that my test suite has grown large enough that I can not longer find the…

edA-qa mort-ora-y
- 30,295
- 39
- 137
- 267
2
votes
1 answer
Boost test setup error: memory access violation
I am getting the above error while running the executable after compiling and running the following file.
#define BOOST_TEST_MAIN
#define BOOST_TEST_DYN_LINK
#include
#include
#include…

user2772739
- 21
- 1
- 3
2
votes
2 answers
Run boost unit tests under debugger
I use VS 2010.
I need to run .exe that consists of BOOST_AUTO_TEST_SUITEs to test my library under debugger because I get memory access violation and memory leaks. I have no main function, just exe (well and the .cpp files).
How to run this exe…

Uylenburgh
- 1,277
- 4
- 20
- 46
2
votes
1 answer
Debugging Boost.Test in Eclipse: debugger won't stop at break points
When I set a breakpoint in eclipse to debug a boost unit test, it doesn't stop. I have it compiled with debugging symbols but it just goes right past the breakpoint.

Sean Lynch
- 2,852
- 4
- 32
- 46
2
votes
1 answer
Is there a way to detect which tests are inside a boost unit-test binary
is there a way to detect which tests are inside a boost unit-test binary? The goal would be to present some kind of user interface to select the tests that need to be run. I checked the exports of the dll created with
#define…

Tobias Langner
- 10,634
- 6
- 46
- 76
2
votes
1 answer
A version of BOOST_CHECK_CLOSE that deals with absolute differences
Is there a version of BOOST_CHECK_CLOSE that works with absolute differences as opposed to percentage? In some cases absolute differences make more sense, e.g. when we are working with money (yeah, I know that double is not the best type for that),…

Grzenio
- 35,875
- 47
- 158
- 240
2
votes
1 answer
boost test and async IO : memory access violation at address : no mapping at fault address
i am trying to setup a boost test for async I/O for tcpip.
my function to send tcp msg:
int TcpClient::sendMsgToServer(string msg) {
if (isConnected == true) {
Logger::debug("Asynch send request for msg: " + msg, __LINE__,
…

Shrouk Khan
- 1,440
- 6
- 27
- 53
2
votes
4 answers
Running BOOST unit tests from Visual Studio 2010
I am just starting to work with QuantLib project. There are quite a few BOOST unit tests defined, hence the question: is there an easy way to run these tests selectively from Visual Studio (and see results)?
I've only used unit testing in .Net…

Grzenio
- 35,875
- 47
- 158
- 240
2
votes
1 answer
Adding test suite instead of test case in BOOST TEST
I have taken over some BOOST TEST code which has been written as a static test setup for testing media files. However, the requirement is to make the test setup dynamic, as the number of media files to be tested can vary over time, i.e. one day…

Lars Bonde
- 21
- 1
1
vote
1 answer
What's the Boost test framework's equivalence of std::cout?
I understand that in my unit test I should do
BOOST_TEST_MESSAGE("message");
instead of
std::cout << "message";
but what if for a function that's expecting std::ostream& ?
so instead of
hexdump(std::cout, buffer, length);
what should I replace…

grokus
- 18,046
- 9
- 29
- 35
1
vote
1 answer
BOOST Test: How to handle << operator redefinition to print the same type in different tests?
The Problem
Given the following 2 test files in BOOST Test (very simplified compared to my real example for MRE)
Foo.cpp
#define BOOST_TEST_MODULE FooTest
#include
#include
#include…

hexaquark
- 883
- 4
- 16
1
vote
1 answer
Can't use main function witch boost tests
About problem
When I include main function to program where I use BOOST TEST I see this:
error: conflicting declaration of C function ‘int main()’
10 | int main(void)
I don't know it should work becouse I started learn Boost test a few days ago. If…

Michael
- 83
- 4