|
|
@@ -152,13 +152,15 @@ TEST(LongOptionRepeatTest, RepeatingArgumentsAppends) {
|
|
|
struct LongOptionRepeatWithDefaultTest
|
|
|
: program::Arguments<LongOptionRepeatWithDefaultTest> {
|
|
|
using Arguments::Arguments;
|
|
|
-
|
|
|
- std::vector<int> port = option("port") = std::vector{8080};
|
|
|
+
|
|
|
+ std::vector<int> port = option("port") = 8080;
|
|
|
+ std::vector<int> default_ports = option("default_ports") = {80, 443};
|
|
|
};
|
|
|
|
|
|
TEST(LongOptionRepeatWithDefaultTest, DefaultIsProvided) {
|
|
|
auto const options = parse<LongOptionRepeatWithDefaultTest>({""});
|
|
|
EXPECT_THAT(options.port, ElementsAre(8080));
|
|
|
+ EXPECT_THAT(options.default_ports, ElementsAre(80, 443));
|
|
|
}
|
|
|
|
|
|
TEST(LongOptionRepeatWithDefaultTest, ArgumentOverwritesDefault) {
|