Boost logo

Boost Users :

From: Ranji Raghavan (ranji.raghavan_at_[hidden])
Date: 2007-02-08 22:51:27


I have downloaded and built the BOOST libraries using VS2005 - I have
pointed the VC++ directories INCLUDE files to the BOOST install directory
and the Library files to the folder where the BOOST libraries were built to.
But when I try even the simplest of test programs from one of the examples
you had written - see below

#include <boost/test/unit_test.hpp>
using boost::unit_test_framework::test_suite;

// most frequently you implement test cases as a free functions
void free_test_function()
{
    // reports 'error in "free_test_function": test 2 == 1 failed'
    BOOST_CHECK(2 == 1); // non-critical test => continue after failure
}

test_suite* init_unit_test_suite( int, char**) {
    test_suite* test= BOOST_TEST_SUITE( "Unit test example 1" );

    // this example will pass cause we know ahead of time number of expected
failures
    test->add( BOOST_TEST_CASE( &free_test_function ), 1 /* expected one
error */ );

    return test;
}

I receive LINK errors - any suggestions ?

-----Original Message-----
From: boost-users-bounces_at_[hidden]
[mailto:boost-users-bounces_at_[hidden]] On Behalf Of Gennadiy Rozental
Sent: Wednesday, February 07, 2007 4:09 PM
To: boost-users_at_[hidden]
Subject: Re: [Boost-users] Question about Boost.Test

"Ranji Raghavan" <ranji.raghavan_at_[hidden]> wrote in message
news:000a01c74a28$df145f30$e90a0a0a_at_openspirit.com...
> Actually, I am just looking into BOOST reading the documentation etc
> Do you recommend any particular version of BOOST that I should install and
> play with?

I recommend you to use the latest version. Try 1.34 RC.

> I am looking to define all the test data in XML files - maybe
> 1000's of them - have a class that parses this XML file (some tests have
> about 7-8 pieces of disparate primitive data types string, double, int
> etc)and pass the array of class instances to a test method for repetitive
> testing. If this is not pragmatic, could you recommend another way?

Use BOOST_PARAM_TEST_CASE. It works differently in latest version then
before. You will have less problems with parametrs object lifetime
management.
Let me know if you have any problems.

Gennadiy

_______________________________________________
Boost-users mailing list
Boost-users_at_[hidden]
http://lists.boost.org/mailman/listinfo.cgi/boost-users


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net