Lines Matching refs:options
78 OptionValueMap options; in TEST() local
108 ASSERT_TRUE(cmd.PreprocessOptions(args, option_formats, &options, &ordered_options, nullptr)); in TEST()
109 ASSERT_TRUE(options.PullBoolValue("--bool-option")); in TEST()
110 auto values = options.PullValues("--str-option").value(); in TEST()
114 values = options.PullValues("--opt-str-option").value(); in TEST()
119 ASSERT_TRUE(options.PullUintValue("--uint-option", &uint_value)); in TEST()
122 ASSERT_TRUE(options.PullDoubleValue("--double-option", &double_value)); in TEST()
124 ASSERT_TRUE(options.values.empty()); in TEST()
128 ASSERT_TRUE(cmd.PreprocessOptions(args, option_formats, &options, &ordered_options, nullptr)); in TEST()
138 ASSERT_TRUE(cmd.PreprocessOptions({"arg1", "--arg2"}, option_formats, &options, &ordered_options, in TEST()
142 ASSERT_TRUE(cmd.PreprocessOptions({"--", "--bool-option"}, option_formats, &options, in TEST()
148 ASSERT_FALSE(cmd.PreprocessOptions({"--unknown-option"}, option_formats, &options, in TEST()
152 cmd.PreprocessOptions({"--str-option"}, option_formats, &options, &ordered_options, nullptr)); in TEST()
154 ASSERT_FALSE(cmd.PreprocessOptions({"--uint-option", "-2"}, option_formats, &options, in TEST()
156 ASSERT_FALSE(cmd.PreprocessOptions({"--double-option", "str"}, option_formats, &options, in TEST()
159 ASSERT_FALSE(cmd.PreprocessOptions({"non_option_args"}, option_formats, &options, in TEST()
167 OptionValueMap options; in TEST() local
169 options.values.emplace("--uint-option", value); in TEST()
170 ASSERT_FALSE(options.PullUintValue("--uint-option", &uint_value, 11)); in TEST()
171 options.values.emplace("--uint-option", value); in TEST()
172 ASSERT_FALSE(options.PullUintValue("--uint-option", &uint_value, 0, 9)); in TEST()
173 options.values.emplace("--uint-option", value); in TEST()
174 ASSERT_TRUE(options.PullUintValue("--uint-option", &uint_value, 10, 10)); in TEST()
178 options.values.emplace("--double-option", value); in TEST()
179 ASSERT_FALSE(options.PullDoubleValue("--double-option", &double_value, 1.0)); in TEST()
180 options.values.emplace("--double-option", value); in TEST()
181 ASSERT_FALSE(options.PullDoubleValue("--double-option", &double_value, -2.0, -1.0)); in TEST()
182 options.values.emplace("--double-option", value); in TEST()
183 ASSERT_TRUE(options.PullDoubleValue("--double-option", &double_value, 0.0, 0.0)); in TEST()