blob: a875641a4d70ab01e03d14880fc43e31432116e4 [file] [log] [blame]
Igor Murashkinaaebaa02015-01-26 10:55:53 -08001/*
2 * Copyright (C) 2015 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#include "cmdline_parser.h"
18#include "runtime/runtime_options.h"
19#include "runtime/parsed_options.h"
20
21#include "utils.h"
22#include <numeric>
23#include "gtest/gtest.h"
24
25#define EXPECT_NULL(expected) EXPECT_EQ(reinterpret_cast<const void*>(expected), \
26 reinterpret_cast<void*>(NULL));
27
28namespace art {
29 bool UsuallyEquals(double expected, double actual);
30
31 // This has a gtest dependency, which is why it's in the gtest only.
32 bool operator==(const TestProfilerOptions& lhs, const TestProfilerOptions& rhs) {
33 return lhs.enabled_ == rhs.enabled_ &&
34 lhs.output_file_name_ == rhs.output_file_name_ &&
35 lhs.period_s_ == rhs.period_s_ &&
36 lhs.duration_s_ == rhs.duration_s_ &&
37 lhs.interval_us_ == rhs.interval_us_ &&
38 UsuallyEquals(lhs.backoff_coefficient_, rhs.backoff_coefficient_) &&
39 UsuallyEquals(lhs.start_immediately_, rhs.start_immediately_) &&
40 UsuallyEquals(lhs.top_k_threshold_, rhs.top_k_threshold_) &&
41 UsuallyEquals(lhs.top_k_change_threshold_, rhs.top_k_change_threshold_) &&
42 lhs.profile_type_ == rhs.profile_type_ &&
43 lhs.max_stack_depth_ == rhs.max_stack_depth_;
44 }
45
46 bool UsuallyEquals(double expected, double actual) {
47 using FloatingPoint = ::testing::internal::FloatingPoint<double>;
48
49 FloatingPoint exp(expected);
50 FloatingPoint act(actual);
51
52 // Compare with ULPs instead of comparing with ==
53 return exp.AlmostEquals(act);
54 }
55
56 template <typename T>
57 bool UsuallyEquals(const T& expected, const T& actual,
58 typename std::enable_if<
59 detail::SupportsEqualityOperator<T>::value>::type* = 0) {
60 return expected == actual;
61 }
62
63 // Try to use memcmp to compare simple plain-old-data structs.
64 //
65 // This should *not* generate false positives, but it can generate false negatives.
66 // This will mostly work except for fields like float which can have different bit patterns
67 // that are nevertheless equal.
68 // If a test is failing because the structs aren't "equal" when they really are
69 // then it's recommended to implement operator== for it instead.
70 template <typename T, typename ... Ignore>
71 bool UsuallyEquals(const T& expected, const T& actual,
72 const Ignore& ... more ATTRIBUTE_UNUSED,
73 typename std::enable_if<std::is_pod<T>::value>::type* = 0,
74 typename std::enable_if<!detail::SupportsEqualityOperator<T>::value>::type* = 0
75 ) {
76 return memcmp(std::addressof(expected), std::addressof(actual), sizeof(T)) == 0;
77 }
78
79 bool UsuallyEquals(const XGcOption& expected, const XGcOption& actual) {
80 return memcmp(std::addressof(expected), std::addressof(actual), sizeof(expected)) == 0;
81 }
82
83 bool UsuallyEquals(const char* expected, std::string actual) {
84 return std::string(expected) == actual;
85 }
86
87 template <typename TMap, typename TKey, typename T>
88 ::testing::AssertionResult IsExpectedKeyValue(const T& expected,
89 const TMap& map,
90 const TKey& key) {
91 auto* actual = map.Get(key);
92 if (actual != nullptr) {
93 if (!UsuallyEquals(expected, *actual)) {
94 return ::testing::AssertionFailure()
95 << "expected " << detail::ToStringAny(expected) << " but got "
96 << detail::ToStringAny(*actual);
97 }
98 return ::testing::AssertionSuccess();
99 }
100
101 return ::testing::AssertionFailure() << "key was not in the map";
102 }
103
104class CmdlineParserTest : public ::testing::Test {
105 public:
106 CmdlineParserTest() = default;
107 ~CmdlineParserTest() = default;
108
109 protected:
110 using M = RuntimeArgumentMap;
111 using RuntimeParser = ParsedOptions::RuntimeParser;
112
113 static void SetUpTestCase() {
114 art::InitLogging(nullptr); // argv = null
115 }
116
117 virtual void SetUp() {
118 parser_ = ParsedOptions::MakeParser(false); // do not ignore unrecognized options
119 }
120
121 static ::testing::AssertionResult IsResultSuccessful(CmdlineResult result) {
122 if (result.IsSuccess()) {
123 return ::testing::AssertionSuccess();
124 } else {
125 return ::testing::AssertionFailure()
126 << result.GetStatus() << " with: " << result.GetMessage();
127 }
128 }
129
130 static ::testing::AssertionResult IsResultFailure(CmdlineResult result,
131 CmdlineResult::Status failure_status) {
132 if (result.IsSuccess()) {
133 return ::testing::AssertionFailure() << " got success but expected failure: "
134 << failure_status;
135 } else if (result.GetStatus() == failure_status) {
136 return ::testing::AssertionSuccess();
137 }
138
139 return ::testing::AssertionFailure() << " expected failure " << failure_status
140 << " but got " << result.GetStatus();
141 }
142
143 std::unique_ptr<RuntimeParser> parser_;
144};
145
146#define EXPECT_KEY_EXISTS(map, key) EXPECT_TRUE((map).Exists(key))
147#define EXPECT_KEY_VALUE(map, key, expected) EXPECT_TRUE(IsExpectedKeyValue(expected, map, key))
148
149#define EXPECT_SINGLE_PARSE_EMPTY_SUCCESS(argv) \
150 do { \
151 EXPECT_TRUE(IsResultSuccessful(parser_->Parse(argv))); \
152 EXPECT_EQ(0u, parser_->GetArgumentsMap().Size()); \
153 } while (false)
154
155#define _EXPECT_SINGLE_PARSE_EXISTS(argv, key) \
156 do { \
157 EXPECT_TRUE(IsResultSuccessful(parser_->Parse(argv))); \
158 RuntimeArgumentMap args = parser_->ReleaseArgumentsMap(); \
159 EXPECT_EQ(1u, args.Size()); \
160 EXPECT_KEY_EXISTS(args, key); \
161
162#define EXPECT_SINGLE_PARSE_EXISTS(argv, key) \
163 _EXPECT_SINGLE_PARSE_EXISTS(argv, key); \
164 } while (false)
165
166#define EXPECT_SINGLE_PARSE_VALUE(expected, argv, key) \
167 _EXPECT_SINGLE_PARSE_EXISTS(argv, key); \
168 EXPECT_KEY_VALUE(args, key, expected); \
169 } while (false) // NOLINT [readability/namespace] [5]
170
171#define EXPECT_SINGLE_PARSE_VALUE_STR(expected, argv, key) \
172 EXPECT_SINGLE_PARSE_VALUE(std::string(expected), argv, key)
173
174#define EXPECT_SINGLE_PARSE_FAIL(argv, failure_status) \
175 do { \
176 EXPECT_TRUE(IsResultFailure(parser_->Parse(argv), failure_status));\
177 RuntimeArgumentMap args = parser_->ReleaseArgumentsMap();\
178 EXPECT_EQ(0u, args.Size()); \
179 } while (false)
180
181TEST_F(CmdlineParserTest, TestSimpleSuccesses) {
182 auto& parser = *parser_;
183
184 EXPECT_LT(0u, parser.CountDefinedArguments());
185
186 {
187 // Test case 1: No command line arguments
188 EXPECT_TRUE(IsResultSuccessful(parser.Parse("")));
189 RuntimeArgumentMap args = parser.ReleaseArgumentsMap();
190 EXPECT_EQ(0u, args.Size());
191 }
192
193 EXPECT_SINGLE_PARSE_EXISTS("-Xzygote", M::Zygote);
194 EXPECT_SINGLE_PARSE_VALUE_STR("/hello/world", "-Xbootclasspath:/hello/world", M::BootClassPath);
195 EXPECT_SINGLE_PARSE_VALUE("/hello/world", "-Xbootclasspath:/hello/world", M::BootClassPath);
196 EXPECT_SINGLE_PARSE_VALUE(false, "-Xverify:none", M::Verify);
197 EXPECT_SINGLE_PARSE_VALUE(true, "-Xverify:remote", M::Verify);
198 EXPECT_SINGLE_PARSE_VALUE(true, "-Xverify:all", M::Verify);
199 EXPECT_SINGLE_PARSE_VALUE(Memory<1>(234), "-Xss234", M::StackSize);
200 EXPECT_SINGLE_PARSE_VALUE(MemoryKiB(1234*MB), "-Xms1234m", M::MemoryInitialSize);
201 EXPECT_SINGLE_PARSE_VALUE(true, "-XX:EnableHSpaceCompactForOOM", M::EnableHSpaceCompactForOOM);
202 EXPECT_SINGLE_PARSE_VALUE(false, "-XX:DisableHSpaceCompactForOOM", M::EnableHSpaceCompactForOOM);
203 EXPECT_SINGLE_PARSE_VALUE(0.5, "-XX:HeapTargetUtilization=0.5", M::HeapTargetUtilization);
204 EXPECT_SINGLE_PARSE_VALUE(5u, "-XX:ParallelGCThreads=5", M::ParallelGCThreads);
205} // TEST_F
206
207TEST_F(CmdlineParserTest, TestSimpleFailures) {
208 // Test argument is unknown to the parser
209 EXPECT_SINGLE_PARSE_FAIL("abcdefg^%@#*(@#", CmdlineResult::kUnknown);
210 // Test value map substitution fails
211 EXPECT_SINGLE_PARSE_FAIL("-Xverify:whatever", CmdlineResult::kFailure);
212 // Test value type parsing failures
213 EXPECT_SINGLE_PARSE_FAIL("-Xsswhatever", CmdlineResult::kFailure); // invalid memory value
214 EXPECT_SINGLE_PARSE_FAIL("-Xms123", CmdlineResult::kFailure); // memory value too small
215 EXPECT_SINGLE_PARSE_FAIL("-XX:HeapTargetUtilization=0.0", CmdlineResult::kOutOfRange); // toosmal
216 EXPECT_SINGLE_PARSE_FAIL("-XX:HeapTargetUtilization=2.0", CmdlineResult::kOutOfRange); // toolarg
217 EXPECT_SINGLE_PARSE_FAIL("-XX:ParallelGCThreads=-5", CmdlineResult::kOutOfRange); // too small
218 EXPECT_SINGLE_PARSE_FAIL("-Xgc:blablabla", CmdlineResult::kUsage); // not a valid suboption
219} // TEST_F
220
221TEST_F(CmdlineParserTest, TestLogVerbosity) {
222 {
223 const char* log_args = "-verbose:"
224 "class,compiler,gc,heap,jdwp,jni,monitor,profiler,signals,startup,third-party-jni,"
225 "threads,verifier";
226
227 LogVerbosity log_verbosity = LogVerbosity();
228 log_verbosity.class_linker = true;
229 log_verbosity.compiler = true;
230 log_verbosity.gc = true;
231 log_verbosity.heap = true;
232 log_verbosity.jdwp = true;
233 log_verbosity.jni = true;
234 log_verbosity.monitor = true;
235 log_verbosity.profiler = true;
236 log_verbosity.signals = true;
237 log_verbosity.startup = true;
238 log_verbosity.third_party_jni = true;
239 log_verbosity.threads = true;
240 log_verbosity.verifier = true;
241
242 EXPECT_SINGLE_PARSE_VALUE(log_verbosity, log_args, M::Verbose);
243 }
244
245 {
246 const char* log_args = "-verbose:"
247 "class,compiler,gc,heap,jdwp,jni,monitor";
248
249 LogVerbosity log_verbosity = LogVerbosity();
250 log_verbosity.class_linker = true;
251 log_verbosity.compiler = true;
252 log_verbosity.gc = true;
253 log_verbosity.heap = true;
254 log_verbosity.jdwp = true;
255 log_verbosity.jni = true;
256 log_verbosity.monitor = true;
257
258 EXPECT_SINGLE_PARSE_VALUE(log_verbosity, log_args, M::Verbose);
259 }
260
261 EXPECT_SINGLE_PARSE_FAIL("-verbose:blablabla", CmdlineResult::kUsage); // invalid verbose opt
262} // TEST_F
263
264TEST_F(CmdlineParserTest, TestXGcOption) {
265 /*
266 * Test success
267 */
268 {
269 XGcOption option_all_true{}; // NOLINT [readability/braces] [4]
270 option_all_true.collector_type_ = gc::CollectorType::kCollectorTypeCMS;
271 option_all_true.verify_pre_gc_heap_ = true;
272 option_all_true.verify_pre_sweeping_heap_ = true;
273 option_all_true.verify_post_gc_heap_ = true;
274 option_all_true.verify_pre_gc_rosalloc_ = true;
275 option_all_true.verify_pre_sweeping_rosalloc_ = true;
276 option_all_true.verify_post_gc_rosalloc_ = true;
277
278 const char * xgc_args_all_true = "-Xgc:concurrent,"
279 "preverify,presweepingverify,postverify,"
280 "preverify_rosalloc,presweepingverify_rosalloc,"
281 "postverify_rosalloc,precise,"
282 "verifycardtable";
283
284 EXPECT_SINGLE_PARSE_VALUE(option_all_true, xgc_args_all_true, M::GcOption);
285
286 XGcOption option_all_false{}; // NOLINT [readability/braces] [4]
287 option_all_false.collector_type_ = gc::CollectorType::kCollectorTypeMS;
288 option_all_false.verify_pre_gc_heap_ = false;
289 option_all_false.verify_pre_sweeping_heap_ = false;
290 option_all_false.verify_post_gc_heap_ = false;
291 option_all_false.verify_pre_gc_rosalloc_ = false;
292 option_all_false.verify_pre_sweeping_rosalloc_ = false;
293 option_all_false.verify_post_gc_rosalloc_ = false;
294
295 const char* xgc_args_all_false = "-Xgc:nonconcurrent,"
296 "nopreverify,nopresweepingverify,nopostverify,nopreverify_rosalloc,"
297 "nopresweepingverify_rosalloc,nopostverify_rosalloc,noprecise,noverifycardtable";
298
299 EXPECT_SINGLE_PARSE_VALUE(option_all_false, xgc_args_all_false, M::GcOption);
300
301 XGcOption option_all_default{}; // NOLINT [readability/braces] [4]
302
303 option_all_default.collector_type_ = gc::kCollectorTypeDefault;
304 option_all_default.verify_pre_gc_heap_ = false;
305 option_all_default.verify_pre_sweeping_heap_ = kIsDebugBuild;
306 option_all_default.verify_post_gc_heap_ = false;
307 option_all_default.verify_pre_gc_rosalloc_ = kIsDebugBuild;
308 option_all_default.verify_pre_sweeping_rosalloc_ = false;
309 option_all_default.verify_post_gc_rosalloc_ = false;
310
311 const char* xgc_args_blank = "-Xgc:";
312 EXPECT_SINGLE_PARSE_VALUE(option_all_default, xgc_args_blank, M::GcOption);
313 }
314
315 /*
316 * Test failures
317 */
318 EXPECT_SINGLE_PARSE_FAIL("-Xgc:blablabla", CmdlineResult::kUsage); // invalid Xgc opt
319} // TEST_F
320
321/*
322 * {"-Xrunjdwp:_", "-agentlib:jdwp=_"}
323 */
324TEST_F(CmdlineParserTest, TestJdwpOptions) {
325 /*
326 * Test success
327 */
328 {
329 /*
330 * "Example: -Xrunjdwp:transport=dt_socket,address=8000,server=y\n"
331 */
332 JDWP::JdwpOptions opt = JDWP::JdwpOptions();
333 opt.transport = JDWP::JdwpTransportType::kJdwpTransportSocket;
334 opt.port = 8000;
335 opt.server = true;
336
337 const char *opt_args = "-Xrunjdwp:transport=dt_socket,address=8000,server=y";
338
339 EXPECT_SINGLE_PARSE_VALUE(opt, opt_args, M::JdwpOptions);
340 }
341
342 {
343 /*
344 * "Example: -agentlib:jdwp=transport=dt_socket,address=localhost:6500,server=n\n");
345 */
346 JDWP::JdwpOptions opt = JDWP::JdwpOptions();
347 opt.transport = JDWP::JdwpTransportType::kJdwpTransportSocket;
348 opt.host = "localhost";
349 opt.port = 6500;
350 opt.server = false;
351
352 const char *opt_args = "-agentlib:jdwp=transport=dt_socket,address=localhost:6500,server=n";
353
354 EXPECT_SINGLE_PARSE_VALUE(opt, opt_args, M::JdwpOptions);
355 }
356
357 /*
358 * Test failures
359 */
360 EXPECT_SINGLE_PARSE_FAIL("-Xrunjdwp:help", CmdlineResult::kUsage); // usage for help only
361 EXPECT_SINGLE_PARSE_FAIL("-Xrunjdwp:blabla", CmdlineResult::kFailure); // invalid subarg
362 EXPECT_SINGLE_PARSE_FAIL("-agentlib:jdwp=help", CmdlineResult::kUsage); // usage for help only
363 EXPECT_SINGLE_PARSE_FAIL("-agentlib:jdwp=blabla", CmdlineResult::kFailure); // invalid subarg
364} // TEST_F
365
366/*
367 * -D_ -D_ -D_ ...
368 */
369TEST_F(CmdlineParserTest, TestPropertiesList) {
370 /*
371 * Test successes
372 */
373 {
374 std::vector<std::string> opt = {"hello"};
375
376 EXPECT_SINGLE_PARSE_VALUE(opt, "-Dhello", M::PropertiesList);
377 }
378
379 {
380 std::vector<std::string> opt = {"hello", "world"};
381
382 EXPECT_SINGLE_PARSE_VALUE(opt, "-Dhello -Dworld", M::PropertiesList);
383 }
384
385 {
386 std::vector<std::string> opt = {"one", "two", "three"};
387
388 EXPECT_SINGLE_PARSE_VALUE(opt, "-Done -Dtwo -Dthree", M::PropertiesList);
389 }
390} // TEST_F
391
392/*
393* -Xcompiler-option foo -Xcompiler-option bar ...
394*/
395TEST_F(CmdlineParserTest, TestCompilerOption) {
396 /*
397 * Test successes
398 */
399 {
400 std::vector<std::string> opt = {"hello"};
401 EXPECT_SINGLE_PARSE_VALUE(opt, "-Xcompiler-option hello", M::CompilerOptions);
402 }
403
404 {
405 std::vector<std::string> opt = {"hello", "world"};
406 EXPECT_SINGLE_PARSE_VALUE(opt,
407 "-Xcompiler-option hello -Xcompiler-option world",
408 M::CompilerOptions);
409 }
410
411 {
412 std::vector<std::string> opt = {"one", "two", "three"};
413 EXPECT_SINGLE_PARSE_VALUE(opt,
414 "-Xcompiler-option one -Xcompiler-option two -Xcompiler-option three",
415 M::CompilerOptions);
416 }
417} // TEST_F
418
419/*
420* -X-profile-*
421*/
422TEST_F(CmdlineParserTest, TestProfilerOptions) {
423 /*
424 * Test successes
425 */
426
427 {
428 TestProfilerOptions opt;
429 opt.enabled_ = true;
430
431 EXPECT_SINGLE_PARSE_VALUE(opt,
432 "-Xenable-profiler",
433 M::ProfilerOpts);
434 }
435
436 {
437 TestProfilerOptions opt;
438 // also need to test 'enabled'
439 opt.output_file_name_ = "hello_world.txt";
440
441 EXPECT_SINGLE_PARSE_VALUE(opt,
442 "-Xprofile-filename:hello_world.txt ",
443 M::ProfilerOpts);
444 }
445
446 {
447 TestProfilerOptions opt = TestProfilerOptions();
448 // also need to test 'enabled'
449 opt.output_file_name_ = "output.txt";
450 opt.period_s_ = 123u;
451 opt.duration_s_ = 456u;
452 opt.interval_us_ = 789u;
453 opt.backoff_coefficient_ = 2.0;
454 opt.start_immediately_ = true;
455 opt.top_k_threshold_ = 50.0;
456 opt.top_k_change_threshold_ = 60.0;
457 opt.profile_type_ = kProfilerMethod;
458 opt.max_stack_depth_ = 1337u;
459
460 EXPECT_SINGLE_PARSE_VALUE(opt,
461 "-Xprofile-filename:output.txt "
462 "-Xprofile-period:123 "
463 "-Xprofile-duration:456 "
464 "-Xprofile-interval:789 "
465 "-Xprofile-backoff:2.0 "
466 "-Xprofile-start-immediately "
467 "-Xprofile-top-k-threshold:50.0 "
468 "-Xprofile-top-k-change-threshold:60.0 "
469 "-Xprofile-type:method "
470 "-Xprofile-max-stack-depth:1337",
471 M::ProfilerOpts);
472 }
473
474 {
475 TestProfilerOptions opt = TestProfilerOptions();
476 opt.profile_type_ = kProfilerBoundedStack;
477
478 EXPECT_SINGLE_PARSE_VALUE(opt,
479 "-Xprofile-type:stack",
480 M::ProfilerOpts);
481 }
482} // TEST_F
483
484TEST_F(CmdlineParserTest, TestIgnoreUnrecognized) {
485 RuntimeParser::Builder parserBuilder;
486
487 parserBuilder
488 .Define("-help")
489 .IntoKey(M::Help)
490 .IgnoreUnrecognized(true);
491
492 parser_.reset(new RuntimeParser(parserBuilder.Build()));
493
494 EXPECT_SINGLE_PARSE_EMPTY_SUCCESS("-non-existent-option");
495 EXPECT_SINGLE_PARSE_EMPTY_SUCCESS("-non-existent-option1 --non-existent-option-2");
496} // TEST_F
497
498TEST_F(CmdlineParserTest, TestIgnoredArguments) {
499 std::initializer_list<const char*> ignored_args = {
500 "-ea", "-da", "-enableassertions", "-disableassertions", "--runtime-arg", "-esa",
501 "-dsa", "-enablesystemassertions", "-disablesystemassertions", "-Xrs", "-Xint:abdef",
502 "-Xdexopt:foobar", "-Xnoquithandler", "-Xjnigreflimit:ixnay", "-Xgenregmap", "-Xnogenregmap",
503 "-Xverifyopt:never", "-Xcheckdexsum", "-Xincludeselectedop", "-Xjitop:noop",
504 "-Xincludeselectedmethod", "-Xjitthreshold:123", "-Xjitcodecachesize:12345",
505 "-Xjitblocking", "-Xjitmethod:_", "-Xjitclass:nosuchluck", "-Xjitoffset:none",
506 "-Xjitconfig:yes", "-Xjitcheckcg", "-Xjitverbose", "-Xjitprofile",
507 "-Xjitdisableopt", "-Xjitsuspendpoll", "-XX:mainThreadStackSize=1337"
508 };
509
510 // Check they are ignored when parsed one at a time
511 for (auto&& arg : ignored_args) {
512 SCOPED_TRACE(arg);
513 EXPECT_SINGLE_PARSE_EMPTY_SUCCESS(arg);
514 }
515
516 // Check they are ignored when we pass it all together at once
517 std::vector<const char*> argv = ignored_args;
518 EXPECT_SINGLE_PARSE_EMPTY_SUCCESS(argv);
519} // TEST_F
520
521TEST_F(CmdlineParserTest, MultipleArguments) {
522 EXPECT_TRUE(IsResultSuccessful(parser_->Parse(
523 "-help -XX:ForegroundHeapGrowthMultiplier=0.5 "
524 "-Xnodex2oat -Xmethod-trace -XX:LargeObjectSpace=map")));
525
526 auto&& map = parser_->ReleaseArgumentsMap();
527 EXPECT_EQ(5u, map.Size());
528 EXPECT_KEY_VALUE(map, M::Help, Unit{}); // NOLINT [whitespace/braces] [5]
529 EXPECT_KEY_VALUE(map, M::ForegroundHeapGrowthMultiplier, 0.5);
530 EXPECT_KEY_VALUE(map, M::Dex2Oat, false);
531 EXPECT_KEY_VALUE(map, M::MethodTrace, Unit{}); // NOLINT [whitespace/braces] [5]
532 EXPECT_KEY_VALUE(map, M::LargeObjectSpace, gc::space::LargeObjectSpaceType::kMap);
533} // TEST_F
534} // namespace art