41 #if !defined(GTEST_CUSTOM_INIT_GOOGLE_TEST_FUNCTION_)
48 template <
typename Char,
int M,
int N>
55 ASSERT_EQ(N, argc) <<
"The new argv has wrong number of elements.";
57 for (
int i = 0;
i <
N;
i++) {
65 TEST(InitGoogleMockTest, ParsesInvalidCommandLine) {
66 const char* argv[] = {
70 const char* new_argv[] = {
77 TEST(InitGoogleMockTest, ParsesEmptyCommandLine) {
78 const char* argv[] = {
83 const char* new_argv[] = {
91 TEST(InitGoogleMockTest, ParsesSingleFlag) {
92 const char* argv[] = {
94 "--gmock_verbose=info",
98 const char* new_argv[] = {
106 TEST(InitGoogleMockTest, ParsesUnrecognizedFlag) {
107 const char* argv[] = {
109 "--non_gmock_flag=blah",
113 const char* new_argv[] = {
115 "--non_gmock_flag=blah",
122 TEST(InitGoogleMockTest, ParsesGoogleMockFlagAndUnrecognizedFlag) {
123 const char* argv[] = {
125 "--non_gmock_flag=blah",
126 "--gmock_verbose=error",
130 const char* new_argv[] = {
132 "--non_gmock_flag=blah",
139 TEST(WideInitGoogleMockTest, ParsesInvalidCommandLine) {
140 const wchar_t* argv[] = {
144 const wchar_t* new_argv[] = {
151 TEST(WideInitGoogleMockTest, ParsesEmptyCommandLine) {
152 const wchar_t* argv[] = {
157 const wchar_t* new_argv[] = {
165 TEST(WideInitGoogleMockTest, ParsesSingleFlag) {
166 const wchar_t* argv[] = {
168 L"--gmock_verbose=info",
172 const wchar_t* new_argv[] = {
180 TEST(WideInitGoogleMockTest, ParsesUnrecognizedFlag) {
181 const wchar_t* argv[] = {
183 L"--non_gmock_flag=blah",
187 const wchar_t* new_argv[] = {
189 L"--non_gmock_flag=blah",
196 TEST(WideInitGoogleMockTest, ParsesGoogleMockFlagAndUnrecognizedFlag) {
197 const wchar_t* argv[] = {
199 L"--non_gmock_flag=blah",
200 L
"--gmock_verbose=error",
204 const wchar_t* new_argv[] = {
206 L"--non_gmock_flag=blah",
213 #endif // !defined(GTEST_CUSTOM_INIT_GOOGLE_TEST_FUNCTION_)
216 TEST(FlagTest, IsAccessibleInCode) {