You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello!
I just have a couple of questions about concurrent environments.
I am using a library for which I have to run everything on a separate thread that needs initialization. However, in order to debug and test everything properly, I need to initialize the test runner thread as well.
My questions are:
Are all the test fixtures, test cases, and subcases run on the same thread?
Are they all run on the same thread from which we implement doctest with DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN?
The reason is that I could just run the thread initialization in my main doctest implementation and not worry about it later.
Thank you in advance!
Extra information
doctest version: v2.4.1
Operating System: Windows
Compiler+version: Visual Studio Community 2019
The text was updated successfully, but these errors were encountered:
Are all the test fixtures, test cases, and subcases run on the same thread?
Yes, they are all ran from whichever thread doctest::Context::run() is called - sequentially.
Are they all run on the same thread from which we implement doctest with DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN?
DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN just drags the implementation of the test runner into the respective translation unit in order to be compiled - the thread the tests will be running from is the one from which you call doctest::Context::run() on your doctest context and that depends entirely on your preference.
Hello!
I just have a couple of questions about concurrent environments.
I am using a library for which I have to run everything on a separate thread that needs initialization. However, in order to debug and test everything properly, I need to initialize the test runner thread as well.
My questions are:
Are all the test fixtures, test cases, and subcases run on the same thread?
Are they all run on the same thread from which we implement doctest with DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN?
The reason is that I could just run the thread initialization in my main doctest implementation and not worry about it later.
Thank you in advance!
Extra information
The text was updated successfully, but these errors were encountered: