Boost logo

Boost :

Subject: [boost] More tests running with Boost.Test than registered
From: Jon Black (jon_black_at_[hidden])
Date: 2011-09-22 16:07:12

I have a large solution in Visual Studio (100+) projects, of which most
are dll's. The test code is in the DLL's and the tests are run using the
provided console_test_runner.

At the moment, each DLL has a single passing test. However, when I run
the console_test_runner on a single dll, the output indicates that there
are more tests. For example:

D:\Projects\MyProject\console_test_runner.exe --test MyDll1.dll
Running 5 test cases...

*** No errors detected

So I put a print statement in the test in each DLL and ran it again, and
here's what happened:

D:\Projects\MyProject\console_test_runner.exe --test MyDll1.dll
Running 5 test cases...

*** No errors detected

The project for MyDll1 depends on the other projects. That can't be a
coincidence! I'm confused though, why is the console_test_runner
executing tests in other DLL's when I've only specified MyDll1 on the
command line? Each DLL has its own unit_test_init() function declared in
the pre-compiled header, so I'm really lost on what is happening here.
Is it possible that the other dll tests are getting registered as well?

Boost list run by bdawes at, gregod at, cpdaniel at, john at