unittest++

How to access private class fields from a test using UnitTest++?

Hello all, I'm facing a nuisance when coding my unit tests using UnitTest++. I'm wondering how to access private member class fields in a clean way (or maybe any way...) By now, I have a solution to access protected members using a class fixture deriving from the class under test. The following code shows the idea: struct MyFixture : C...

Unittest++: test for multiple possible values

Hi there, i am currently implementing a simple ray tracer in c++. I have a class named OrthonormalBasis, which generates three orthogonal unit vectors from one or two specified vectors, for example: void OrthonormalBasis::init_from_u ( const Vector& u ) { Vector n(1,0,0); Vector m(0,1,0); u_ = unify(u); v_ = cross(u_,n)...

Configuring a library to be included with C++ test

Hello, I would like to utilize the UnitTest++ library in a testing file. However, I am having some difficulty getting the library to be included at compile time. So here is my current directory structure: tests/ UnitTests++/ libUnitTest++.a src/ UnitTests++.h unit/ test.cpp I have just used the UnitTest++ gettin...

UnitTest++ creates cmd windows, which can't be closed

Hello, I have a setup for using UnitTest++ like this in VS2008. Sometimes the cmd window, which shows the console output of the unit tests just hangs. I can move the window, resize and stuff, but I'm unable to close it. I see the window in the App tab of the Task Manager, but not in the Process tab, "Switch to process" doesn't work e...

UnitTest++ constructing fixtures multiple times?

I'm writing some unit tests in UnitTest++ and want to write a bunch of tests which share some common resources. I thought that this should work via their TEST_FIXTURE setup, but it seems to be constructing a new fixture for every test. Sample code: #include <UnitTest++.h> struct SomeFixture { SomeFixture() { // this line is...

Configuring xUnit test output in Hudson

I have a simple PoC project in Hudson. The PoC has unit tests written via UnitTest++ and outputs the results as XML for consumption by xUnit to munge into jUnit format. Here are the salient relevant I have my project configured to use MSBuild to build the 2008 solution. The project contains both the dll it is to build and the unit t...

How do I run a single test with UnitTest++ ?

How do I run a single test with UnitTest++ ? ...