Boost Testing :
From: David Abrahams (dave_at_[hidden])
Date: 2007-02-28 15:55:42
I'm seeing the following:
1. The test appears to do invoke undefined behavior, almost knowingly.
On line 103, it asks whether a singular range (so named, even) is
empty. This range is made up of singular iterators, the comparison
of which invokes undefined behavior. In a debug build on VC8 this
fires an assertion ("string iterators incompatible"). This problem
should be fixed.
Every major standard library now has some iterator checking. We
should do debug-mode tests of our code with iterator checking on.
2. In VC8 debug builds, the test output is as follows:
Running 1 test case...
hello worldhello worldhello worldhello worldunknown location(0): fatal error in "check_sub_range": C:\Program Files (x86)\Microsoft Visual Studio 8\VC\INCLUDE\xstring(272) : Assertion failed: string iterators incompatible
sub_range.cpp(103): last checkpoint
*** 1 failure detected in test suite "Master Test Suite"
Here, Boost.Test is doing its job and catching the assertion exception.
3. In VC8 release builds, the test invokes the JIT debugger. As a
result, my automated release-mode tests are interfered with.
Nothing kills off the resulting JIT dialog, and my repeating test
task does not complete, which prevents the next repetition from
I can't understand why that would be the case. Doesn't Boost.Test
install an SEH handler?
-- Dave Abrahams Boost Consulting www.boost-consulting.com