OLD | NEW |
1 // Copyright 2008, Google Inc. | 1 // Copyright 2008, Google Inc. |
2 // All rights reserved. | 2 // All rights reserved. |
3 // | 3 // |
4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
5 // modification, are permitted provided that the following conditions are | 5 // modification, are permitted provided that the following conditions are |
6 // met: | 6 // met: |
7 // | 7 // |
8 // * Redistributions of source code must retain the above copyright | 8 // * Redistributions of source code must retain the above copyright |
9 // notice, this list of conditions and the following disclaimer. | 9 // notice, this list of conditions and the following disclaimer. |
10 // * Redistributions in binary form must reproduce the above | 10 // * Redistributions in binary form must reproduce the above |
(...skipping 7886 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7897 namespace testing { | 7897 namespace testing { |
7898 namespace internal { | 7898 namespace internal { |
7899 | 7899 |
7900 #if GTEST_OS_WINDOWS | 7900 #if GTEST_OS_WINDOWS |
7901 // On Windows, '\\' is the standard path separator, but many tools and the | 7901 // On Windows, '\\' is the standard path separator, but many tools and the |
7902 // Windows API also accept '/' as an alternate path separator. Unless otherwise | 7902 // Windows API also accept '/' as an alternate path separator. Unless otherwise |
7903 // noted, a file path can contain either kind of path separators, or a mixture | 7903 // noted, a file path can contain either kind of path separators, or a mixture |
7904 // of them. | 7904 // of them. |
7905 const char kPathSeparator = '\\'; | 7905 const char kPathSeparator = '\\'; |
7906 const char kAlternatePathSeparator = '/'; | 7906 const char kAlternatePathSeparator = '/'; |
7907 const char kPathSeparatorString[] = "\\"; | |
7908 const char kAlternatePathSeparatorString[] = "/"; | 7907 const char kAlternatePathSeparatorString[] = "/"; |
7909 # if GTEST_OS_WINDOWS_MOBILE | 7908 # if GTEST_OS_WINDOWS_MOBILE |
7910 // Windows CE doesn't have a current directory. You should not use | 7909 // Windows CE doesn't have a current directory. You should not use |
7911 // the current directory in tests on Windows CE, but this at least | 7910 // the current directory in tests on Windows CE, but this at least |
7912 // provides a reasonable fallback. | 7911 // provides a reasonable fallback. |
7913 const char kCurrentDirectoryString[] = "\\"; | 7912 const char kCurrentDirectoryString[] = "\\"; |
7914 // Windows CE doesn't define INVALID_FILE_ATTRIBUTES | 7913 // Windows CE doesn't define INVALID_FILE_ATTRIBUTES |
7915 const DWORD kInvalidFileAttributes = 0xffffffff; | 7914 const DWORD kInvalidFileAttributes = 0xffffffff; |
7916 # else | 7915 # else |
7917 const char kCurrentDirectoryString[] = ".\\"; | 7916 const char kCurrentDirectoryString[] = ".\\"; |
7918 # endif // GTEST_OS_WINDOWS_MOBILE | 7917 # endif // GTEST_OS_WINDOWS_MOBILE |
7919 #else | 7918 #else |
7920 const char kPathSeparator = '/'; | 7919 const char kPathSeparator = '/'; |
7921 const char kPathSeparatorString[] = "/"; | |
7922 const char kCurrentDirectoryString[] = "./"; | 7920 const char kCurrentDirectoryString[] = "./"; |
7923 #endif // GTEST_OS_WINDOWS | 7921 #endif // GTEST_OS_WINDOWS |
7924 | 7922 |
7925 // Returns whether the given character is a valid path separator. | 7923 // Returns whether the given character is a valid path separator. |
7926 static bool IsPathSeparator(char c) { | 7924 static bool IsPathSeparator(char c) { |
7927 #if GTEST_HAS_ALT_PATH_SEP_ | 7925 #if GTEST_HAS_ALT_PATH_SEP_ |
7928 return (c == kPathSeparator) || (c == kAlternatePathSeparator); | 7926 return (c == kPathSeparator) || (c == kAlternatePathSeparator); |
7929 #else | 7927 #else |
7930 return c == kPathSeparator; | 7928 return c == kPathSeparator; |
7931 #endif | 7929 #endif |
(...skipping 1651 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9583 posix::Abort(); | 9581 posix::Abort(); |
9584 } | 9582 } |
9585 | 9583 |
9586 return registered_tests; | 9584 return registered_tests; |
9587 } | 9585 } |
9588 | 9586 |
9589 #endif // GTEST_HAS_TYPED_TEST_P | 9587 #endif // GTEST_HAS_TYPED_TEST_P |
9590 | 9588 |
9591 } // namespace internal | 9589 } // namespace internal |
9592 } // namespace testing | 9590 } // namespace testing |
OLD | NEW |