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
Compiler+version: Visual Studio 2017 Community Edition
The text was updated successfully, but these errors were encountered:
andreaplanet
changed the title
SUBCASEs are executed only once when within a template function
SUBCASEs are executed only once when within a function
Sep 1, 2017
onqtam
changed the title
SUBCASEs are executed only once when within a function
[question] Why are SUBCASEs executed only once when within a function?
Sep 4, 2017
onqtam
changed the title
[question] Why are SUBCASEs executed only once when within a function?
[question] Why are SUBCASEs executed only once when within a function called multiple times?
Sep 4, 2017
This is the expected behavior. Doctest cannot (easily) know from what callstack a subcase is defined - from the point of view of the framework there is only one subcase found while executing the test case and it is uniquely identified by the file and line it is written at (using __FILE__ and __LINE__) and by its name.
What exactly is your testing scenario? Perhaps the subcases can be extracted from the separate function?
Description
SUBCASE's are executed only once if within a function.
I missed the documentation where it is described.
Steps to reproduce
Expected output:
Got output:
Extra information
and
The text was updated successfully, but these errors were encountered: