| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "shell/command_line_util.h" | 5 #include "shell/command_line_util.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
| 9 | 9 |
| 10 namespace mojo { | |
| 11 namespace shell { | 10 namespace shell { |
| 12 namespace { | 11 namespace { |
| 13 | 12 |
| 14 TEST(CommandLineUtil, ParseArgsFor) { | 13 TEST(CommandLineUtil, ParseArgsFor) { |
| 15 static const struct Expectation { | 14 static const struct Expectation { |
| 16 const char* args; | 15 const char* args; |
| 17 const char* value; | 16 const char* value; |
| 18 } EXPECTATIONS[] = { | 17 } EXPECTATIONS[] = { |
| 19 {"", nullptr}, | 18 {"", nullptr}, |
| 20 {"hello", nullptr}, | 19 {"hello", nullptr}, |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 for (const char** value = expectation.values; *value; ++value) | 72 for (const char** value = expectation.values; *value; ++value) |
| 74 expected_args.push_back(*value); | 73 expected_args.push_back(*value); |
| 75 } | 74 } |
| 76 EXPECT_EQ(expected_args, args); | 75 EXPECT_EQ(expected_args, args); |
| 77 } | 76 } |
| 78 } | 77 } |
| 79 } | 78 } |
| 80 | 79 |
| 81 } // namespace | 80 } // namespace |
| 82 } // namespace shell | 81 } // namespace shell |
| 83 } // namespace mojo | |
| OLD | NEW |