group from class fcf::NTest::TestPath
Property: group
Type:
Class:
Package: fcfTest
File: test.hpp
Available from version: 1.2.4
The name of the intermediate logical grouping (Group) within a Part.
Example: Manual TestPath Construction
Demonstrating how to manually set the
#define FCF_TEST_IMPLEMENTATION
#include <fcfTest/test.hpp>
FCF_TEST_BEFORE_DEFINE ("*", "*", "*", fcf::NTest::FL_GLOBAL ) {
// Initialize the path object to the desired test
fcf::NTest::TestPath path;
path.part = "Core";
path.group = "Math";
path.test = "AdditionTest";
// Add multiple test parameters
fcf::NTest::storage ().appendParamValue (path, (std::string)"one");
fcf::NTest::storage ().appendParamValue (path, (std::string)"two");
fcf::NTest::storage ().appendParamValue (path, (std::string)"three");
}
FCF_TEST_DEFINE ("Core", "Math", "AdditionTest") {
// Get the value of the test parameter
std::string paramValue = *fcf::NTest::state ().param ().cast <std::string>();
fcf::NTest::log () << "Param value: " << paramValue << std::endl;
FCF_TEST (true);
}
int main(int a_argc, char* a_argv[]) {
bool error = false;
fcf::NTest::cmdRun (a_argc, a_argv, fcf::NTest::CRM_RUN , &error);
return error ? 1 : 0;
}
Output:
Performing the test: "Core" -> "Math" -> "AdditionTest" ...
== Parameter set: 1
> Param value: one
== Parameter set: 2
> Param value: two
== Parameter set: 3
> Param value: three
[SUCCESS] Test completed successfully (0.000`014`731 sec)
[SUCCESS] All tests were completed.
Tests: 1 passed, 0 failed, 0 skipped, 1 total
Duration: 0.000`014`731 sec
VPSDime is an industry leading VPS hosting company that provides virtualized server services with high performance, availability and friendly support.