
My problem is "access violation" in unit_test_example1.cpp can not be caught with vc80. Do I need to set some compiler or linker option? When I ran unit_test_example1 (compiled with vc71, boost version 1.32.0) I used to get this output. The access violation was reported and the test continued.
Running 1 test case... c:/development/projects/test/boosttest/main.cpp(17): error in "free_test_function": check 2 == 1 failed unknown location(0): fatal error in "free_test_function": memory access violation
*** 1 failure detected (1 failure expected) in test suite "Unit test example 1" Press any key to continue
But with vc80 (both with 1.33.1 and cvs head), when I run unit_test_example1 I get the access violation dialog and after selecting "Don't Send" I get this output. Note I also get some memory leak dump if I ran it the debug version.
Running 1 test case... ./main.cpp(17): error in "free_test_function": check 2 == 1 failed Press any key to continue . . .
What am I missing? Thanks Orhun Birsoy

My problem is "access violation" in unit_test_example1.cpp can not be caught with vc80. Do I need to set some compiler or linker option?
Yes. VC-8.0 do not turn async exception support by default (as previos versions did) and without option Boost.Test couldn't catch access violation (some people believe it shouldn't do this in a first place). Anyway you need to add /EHa option. Gennadiy

Gennadiy Rozental wrote:
wrote in message news:061320062224.21485.448F3B04000D934B000053ED220073747897019C9D070D01@comcast.net... My problem is "access violation" in unit_test_example1.cpp can not be caught with vc80. Do I need to set some compiler or linker option?
Yes. VC-8.0 do not turn async exception support by default (as previos versions did) and without option Boost.Test couldn't catch access violation (some people believe it shouldn't do this in a first place). Anyway you need to add /EHa option.
Gennadiy
Adding /EHa to my application did not solve the problem. Do I need to compile boost.test with this option as well? Orhun Birsoy

"Orhun Birsoy"
Gennadiy Rozental wrote:
wrote in message news:061320062224.21485.448F3B04000D934B000053ED220073747897019C9D070D01@comcast.net... My problem is "access violation" in unit_test_example1.cpp can not be caught with vc80. Do I need to set some compiler or linker option?
Yes. VC-8.0 do not turn async exception support by default (as previos versions did) and without option Boost.Test couldn't catch access violation (some people believe it shouldn't do this in a first place). Anyway you need to add /EHa option.
Gennadiy
Adding /EHa to my application did not solve the problem. Do I need to compile boost.test with this option as well?
Yes. Gennadiy
participants (3)
-
Gennadiy Rozental
-
obirsoy@comcast.net
-
Orhun Birsoy