43 #if GTEST_OS_WINDOWS_MOBILE
45 #elif GTEST_OS_WINDOWS
47 #endif // GTEST_OS_WINDOWS_MOBILE
54 #define GTEST_IMPLEMENTATION_ 1
56 #undef GTEST_IMPLEMENTATION_
63 FilePath GetAbsolutePathOf(
const FilePath& relative_path) {
69 TEST(XmlOutputTest, GetOutputFormatDefault) {
74 TEST(XmlOutputTest, GetOutputFormat) {
79 TEST(XmlOutputTest, GetOutputFileDefault) {
81 EXPECT_EQ(GetAbsolutePathOf(FilePath(
"test_detail.xml")).
string(),
85 TEST(XmlOutputTest, GetOutputFileSingleFile) {
87 EXPECT_EQ(GetAbsolutePathOf(FilePath(
"filename.abc")).
string(),
91 TEST(XmlOutputTest, GetOutputFileFromDirectoryPath) {
102 EXPECT_EQ(expected_output_file, output_file.c_str());
110 _strcmpi(
"gtest-options_test", exe_str.c_str()) == 0 ||
111 _strcmpi(
"gtest-options-ex_test", exe_str.c_str()) == 0 ||
112 _strcmpi(
"gtest_all_test", exe_str.c_str()) == 0 ||
113 _strcmpi(
"gtest_dll_test", exe_str.c_str()) == 0;
118 exe_str ==
"gtest-options_test" ||
119 exe_str ==
"gtest_all_test" ||
120 exe_str ==
"lt-gtest_all_test" ||
121 exe_str ==
"gtest_dll_test";
122 #endif // GTEST_OS_WINDOWS
124 FAIL() <<
"GetCurrentExecutableName() returns " << exe_str;
127 class XmlOutputChangeDirTest :
public Test {
129 virtual void SetUp() {
137 virtual void TearDown() {
144 TEST_F(XmlOutputChangeDirTest, PreserveOriginalWorkingDirWithDefault) {
147 FilePath(
"test_detail.xml")).
string(),
151 TEST_F(XmlOutputChangeDirTest, PreserveOriginalWorkingDirWithDefaultXML) {
154 FilePath(
"test_detail.xml")).
string(),
158 TEST_F(XmlOutputChangeDirTest, PreserveOriginalWorkingDirWithRelativeFile) {
161 FilePath(
"filename.abc")).
string(),
165 TEST_F(XmlOutputChangeDirTest, PreserveOriginalWorkingDirWithRelativePath) {
177 EXPECT_EQ(expected_output_file, output_file.c_str());
181 TEST_F(XmlOutputChangeDirTest, PreserveOriginalWorkingDirWithAbsoluteFile) {
184 EXPECT_EQ(FilePath(
"c:\\tmp\\filename.abc").
string(),
188 EXPECT_EQ(FilePath(
"/tmp/filename.abc").
string(),
193 TEST_F(XmlOutputChangeDirTest, PreserveOriginalWorkingDirWithAbsolutePath) {
209 EXPECT_EQ(expected_output_file, output_file.c_str());