As I - as also a newb - am having similar problems, trying to use boost. unit testing with wxWidgets,Joey Mink <joeymink <at> gmail.com> writes:Hi all,I'm a newbie using the boost unit test framework. I'm getting a run-time exception that presents itself with the following message: Unhandled exception at 0x61c3b130 (msvcr80d.dll) in test.exe: 0xC0000005: Access violation reading location 0xcccccccc.Please post an trimmed example illustrating the problem and also describe how you build both boost library and your test module.
From:
http://www.boost.org/doc/libs/1_41_0/more/getting_started/windows.html#get-boost
bootstrap
.\bjam
My project files - under MSVC 2008 C++ Express
===========
but86.cpp
// but86.cpp : Defines the entry point for the console application.
//
#define BOOST_TEST_MAIN
#include <boost/test/unit_test.hpp>
===================
#include <boost/test/unit_test.hpp>
#include "chip8X86Dllh.h"
/* from
http://www.boost.org/doc/libs/1_36_0/libs/test/doc/html/utf/user-guide/fixture/test-suite-shared.html
*/
#define BOOST_TEST_MODULE example
// -------------------------------------------------------------
class F {
public:
F();
~F(){
BOOST_TEST_MESSAGE( "teardown fixture" );
BOOST_TEST_MESSAGE( "Freeing DLL" );
FreeLibrary( hExeLib );
}
HINSTANCE hExeLib;
wchar_t *psz86DllName;// = ".\\dis8x86.dll";
};
F::F()
{
BOOST_TEST_MESSAGE( "setup fixture" );
BOOST_TEST_MESSAGE( "Loading DLL" );
psz86DllName = L"../chips/chipx86.dll"; <<<< the DLL I need to test
BOOST_REQUIRE( hExeLib != NULL );
}
// -------------------------------------------------------------
// test suite level fixture
BOOST_FIXTURE_TEST_SUITE( s, F )
// -------------------------------------------------------------
BOOST_AUTO_TEST_CASE(TestProcSpecifics)
{
long lProcrSpecifics(4);
BOOST_REQUIRE_EQUAL(4, lProcrSpecifics);
processorSpecifics_t *psProcessorSpecifics;
}
BOOST_AUTO_TEST_SUITE_END()
===============
After returning to this project now after a number of days,-- Fight Spam - report it with wxSR http://www.columbinehoney.net/wxSR.shtml