cmake: discover wrapped test declarations in the scanner (X-QA-03)
This commit is contained in:
1 parent
f158d7b1cc
commit
4bc8a7c59b
2 files changed
+75
-2
No files matched your search
@@ -0,0 +1,38 @@
|
||||
#include <Void/Testing/Assert.hpp>
|
||||
#include <Void/Testing/Fixture.hpp>
|
||||
#include <Void/Testing/Test.hpp>
|
||||
|
||||
// Regression fixture for cmake/VoidTestScanner.cmake (X-QA-03): a test
|
||||
// declaration that wraps across lines must be discovered and registered
|
||||
// exactly like a single-line declaration.
|
||||
|
||||
// Control: the same declaration on one line is already discovered.
|
||||
Void::Testing::Test scanner_single_line_control()
|
||||
{
|
||||
Void::Testing::expect(true);
|
||||
}
|
||||
|
||||
// Wrapped between the return type and the function name.
|
||||
Void::Testing::Test
|
||||
scanner_wrapped_return_type()
|
||||
{
|
||||
Void::Testing::expect(true);
|
||||
}
|
||||
|
||||
// Wrapped between the function name and the empty parameter list.
|
||||
Void::Testing::Test scanner_wrapped_name
|
||||
()
|
||||
{
|
||||
Void::Testing::expect(true);
|
||||
}
|
||||
|
||||
class ScannerWrappedFixture : public Void::Testing::Fixture
|
||||
{
|
||||
public:
|
||||
// Wrapped member declaration inside a fixture class.
|
||||
Void::Testing::Test
|
||||
wrapped_member()
|
||||
{
|
||||
Void::Testing::expect(true);
|
||||
}
|
||||
};
|
||||
Reference in new issue
Block a user