SimpleΒΆ
Simple example, without arguments on launch:
add_executable(gauze_simple main.cpp)
gauze_add_test(NAME gauze_simple COMMAND gauze_simple)
User should define int gauze_main(int argc, char** argv)
function instead
of main
:
#include <iostream> // std::cout
#include <cstdlib> // EXIT_SUCCESS
int gauze_main(int argc, char** argv) {
std::cout << "Hello, Gauze!" << std::endl;
return EXIT_SUCCESS;
}
Warning
While migrating to Gauze framework note that gauze_main
unlike main
doesn’t have default return value - you should return explicit int
from function.