ddt 1.2.1
|
#include <gtest/gtest.h>
#include <array>
#include <boost/algorithm/string/classification.hpp>
#include <boost/algorithm/string/split.hpp>
#include <boost/format.hpp>
#include "ddt/commandLineParser.hpp"
Classes | |
class | CommandLineParserSpy |
class | CommandLineParserTest |
class | CommandLineParserHelpTest |
class | CommandLineParserViewerTest |
class | CommandLineParserSubscriberTest |
class | CommandLineParserPublisherTest |
Variables | |
string | h0 = "test -h" |
string | h1 = "test --help" |
string | h2 = "test -h -s stream" |
string | sv0 |
string | sv1 = "test --broker %1% -s %2% -v %3% -r %4% -a %5%" |
string | sv2 = "test --statistics %5% %1% %2% %3% %4%" |
string | p0 |
string | p1 = "test -b %1% -s %2% -v %3% -u %4% -i %5% -m %6% -c %7%" |
string | p2 = "test --checksum %7% %1% %2% %3% %4% %5% %6%" |
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST | ( | CommandLineParserHelpTest | ) |
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST | ( | CommandLineParserPublisherTest | ) |
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST | ( | CommandLineParserSubscriberTest | ) |
INSTANTIATE_TEST_SUITE_P | ( | ParsePublisherTests | , |
CommandLineParserPublisherTest | , | ||
::testing::Values(p0, p1, p2) | ) |
INSTANTIATE_TEST_SUITE_P | ( | ParseSubscriberTests | , |
CommandLineParserSubscriberTest | , | ||
::testing::Values(sv0, sv1, sv2) | ) |
INSTANTIATE_TEST_SUITE_P | ( | ShowHelpTests | , |
CommandLineParserHelpTest | , | ||
::testing::Values(h0, h1, h2) | ) |
int main | ( | int | argc, |
char ** | argv ) |
void splitString | ( | string | input, |
vector< char * > & | v ) |
TEST | ( | CommandLineParserTestUtility | , |
TestSplitString | ) |
TEST_F | ( | CommandLineParserTest | , |
setOptionsPubTwo | ) |
TEST_F | ( | CommandLineParserTest | , |
setOptionsSub | ) |
TEST_F | ( | CommandLineParserTest | , |
setOptionsViewer | ) |
TEST_F | ( | CommandLineParserViewerTest | , |
ParseViewer | ) |
Test the parsing of the help option.
This test verifies that -h and –help print the help to stdout.
TEST_F | ( | CommandLineParserViewerTest | , |
ParseViewerFileName | ) |
TEST_F | ( | CommandLineParserViewerTest | , |
ParseViewerStream | ) |
string h0 = "test -h" |
string h1 = "test --help" |
string h2 = "test -h -s stream" |
string p0 |
string p1 = "test -b %1% -s %2% -v %3% -u %4% -i %5% -m %6% -c %7%" |
string p2 = "test --checksum %7% %1% %2% %3% %4% %5% %6%" |
string sv0 |
string sv1 = "test --broker %1% -s %2% -v %3% -r %4% -a %5%" |
string sv2 = "test --statistics %5% %1% %2% %3% %4%" |