Hemant
Hemant

Reputation: 736

How global fixtures work in BOOST.Test?

I have started using BOOST recently for unit testing. Just need one clarification on global fixtures.

When it got executed? ... for each test module, or each test suite or each test case? Will it be the first before any thing else got executed?

I am using the BOOST_AUTO_TEST_CASE for writing my tests.

Upvotes: 3

Views: 2023

Answers (1)

Sam Miller
Sam Miller

Reputation: 24174

global fixtures are executed once per module since they are defined at file scope. Typically I use them to initialize logging or a database connection should my unit tests need them.

Upvotes: 2

Related Questions