-
Notifications
You must be signed in to change notification settings - Fork 0
void test_function(int input)
CountrySideEngineer edited this page Dec 3, 2022
·
1 revision
This page describes the test driver code to test the method like void test_function(int input)
.
(A method with no return and an argument.)
The test driver code in source file is like below:
TEST_F(test_function, test_function_001)
{
int input;
input = input_value;
/*
* Set stub output values if the test_function() has sub function.
*/
test_function(input); // Call test target function.
/*
* Check the result of target function execution with "ASSERT_EQ" macro of googletest.
*/
}
The variable input
is an argument, and its name is same as the name declared in the function argument.