Often I see this type of declaration+implementation in C++ when I read some codes from OpenCV or OpenCascade
TEST(Shape_SCD, regression)
{
const int NSN_val=5;//10;//20; //number of shapes per class
const int NP_val=120; //number of points simplifying the contour
const float CURRENT_MAX_ACCUR_val=95; //99% and 100% reached in several tests, 95 is fixed as minimum boundary
ShapeBaseTest<float, computeShapeDistance_Chi> test(NSN_val, NP_val, CURRENT_MAX_ACCUR_val);
test.safe_run();
}
This can turn out to be a silly question, isn't it? since I don't get what type of declaration this is. It does look like a function but there is no return type. If it is a constructor, why isn't there any type of the variables in argument list?
Thanks
TEST
is a macro. After the macro is expanded, this will be a normal function definition (with a return type). You should be able to see this if you look up the definition of the macro.