Opened 7 years ago

Closed 7 years ago

#11569 closed Bugs (obsolete)

Insufficient bullet-proofing in boost::unit_test::framework::get

Reported by: William R. Deever <wrdeever@…> Owned by: Gennadiy Rozental
Milestone: To Be Determined Component: test
Version: Boost 1.58.0 Severity: Optimization
Keywords: exception Cc:

Description

When I ran a minimal toy problem (I'm VERY new to BUT), I got an exception after the single test in my "toy problem" completed. In the debugger I traced it to framework.ipp L 388. The exception is almost certainly due to my inexperience, but the code appears to be insufficiently bullet-proof against newbies. I suggest adding something like the following at L387:

if (!res) throw internal_error( "Unknown test unit");

I am running on Mac OS 10.10.5 (Yosemite). I am attaching the case that produced the error but note that I am NOT requesting that you identify my error (unless it helps you with the real issue).

Attachments (3)

Vector.hpp (134 bytes ) - added by William R. Deever <wrdeever@…> 7 years ago.
Minimal test case that throws on completion of unit test
Vector.cpp (199 bytes ) - added by William R. Deever <wrdeever@…> 7 years ago.
main.cpp (526 bytes ) - added by William R. Deever <wrdeever@…> 7 years ago.

Download all attachments as: .zip

Change History (4)

by William R. Deever <wrdeever@…>, 7 years ago

Attachment: Vector.hpp added

Minimal test case that throws on completion of unit test

by William R. Deever <wrdeever@…>, 7 years ago

Attachment: Vector.cpp added

by William R. Deever <wrdeever@…>, 7 years ago

Attachment: main.cpp added

comment:1 by Gennadiy Rozental, 7 years ago

Resolution: obsolete
Status: newclosed

I cannot reproduce any issues with Boost 1.59. Please upgrade to Boost.Test v3

Note: See TracTickets for help on using tickets.