Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Boost unit test?

1 view
Skip to first unread message

carl

unread,
Nov 27, 2009, 3:50:25 PM11/27/09
to
I am writing unit-test using boost. Now for all the tests (5 at the moment)
I need to load two rather large images.

Is it possible to define a Boost unit test function that gets run once
before all the tests where I can put this loading of images so I don't have
to do it in each of the tests?

Gert-Jan de Vos

unread,
Nov 27, 2009, 4:15:31 PM11/27/09
to

Read about fixtures or the test initialization function in the boost
unit test
documentation. The examples show what you want.

carl

unread,
Nov 27, 2009, 4:33:41 PM11/27/09
to

"Gert-Jan de Vos" <gert-ja...@onsneteindhoven.nl> wrote in message
news:7500bf59-9bed-4b6b...@o10g2000yqa.googlegroups.com...

Thanks this was perfect:

http://www.boost.org/doc/libs/1_37_0/libs/test/doc/html/utf/user-guide/fixture/global.html

Richard

unread,
Nov 30, 2009, 9:15:05 PM11/30/09
to
[Please do not mail me a copy of your followup]

"carl" <carl@.com> spake the secret code
<4b103b94$0$274$1472...@news.sunsite.dk> thusly:

You might want to look at my 5-part tutorial on using Boost.Test:
Part 1 <http://tinyurl.com/ns4bvx>
Part 2 <http://tinyurl.com/mavghy>
Part 3 <http://tinyurl.com/msf4hb>
Part 4 <http://tinyurl.com/meduqo>
Part 5 <http://tinyurl.com/nserw5>
--
"The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download
<http://legalizeadulthood.wordpress.com/the-direct3d-graphics-pipeline/>

Legalize Adulthood! <http://legalizeadulthood.wordpress.com>

0 new messages