OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # | 2 # |
3 # Copyright 2008, Google Inc. | 3 # Copyright 2008, Google Inc. |
4 # All rights reserved. | 4 # All rights reserved. |
5 # | 5 # |
6 # Redistribution and use in source and binary forms, with or without | 6 # Redistribution and use in source and binary forms, with or without |
7 # modification, are permitted provided that the following conditions are | 7 # modification, are permitted provided that the following conditions are |
8 # met: | 8 # met: |
9 # | 9 # |
10 # * Redistributions of source code must retain the above copyright | 10 # * Redistributions of source code must retain the above copyright |
(...skipping 27 matching lines...) Expand all Loading... |
38 | 38 |
39 import gtest_test_utils | 39 import gtest_test_utils |
40 import gtest_xml_test_utils | 40 import gtest_xml_test_utils |
41 | 41 |
42 | 42 |
43 GTEST_OUTPUT_SUBDIR = "xml_outfiles" | 43 GTEST_OUTPUT_SUBDIR = "xml_outfiles" |
44 GTEST_OUTPUT_1_TEST = "gtest_xml_outfile1_test_" | 44 GTEST_OUTPUT_1_TEST = "gtest_xml_outfile1_test_" |
45 GTEST_OUTPUT_2_TEST = "gtest_xml_outfile2_test_" | 45 GTEST_OUTPUT_2_TEST = "gtest_xml_outfile2_test_" |
46 | 46 |
47 EXPECTED_XML_1 = """<?xml version="1.0" encoding="UTF-8"?> | 47 EXPECTED_XML_1 = """<?xml version="1.0" encoding="UTF-8"?> |
48 <testsuites tests="1" failures="0" disabled="0" errors="0" time="*" name="AllTes
ts"> | 48 <testsuites tests="1" failures="0" disabled="0" errors="0" time="*" datetime="*"
name="AllTests"> |
49 <testsuite name="PropertyOne" tests="1" failures="0" disabled="0" errors="0" t
ime="*"> | 49 <testsuite name="PropertyOne" tests="1" failures="0" disabled="0" errors="0" t
ime="*"> |
50 <testcase name="TestSomeProperties" status="run" time="*" classname="Propert
yOne" SetUpProp="1" TestSomeProperty="1" TearDownProp="1" /> | 50 <testcase name="TestSomeProperties" status="run" time="*" classname="Propert
yOne" SetUpProp="1" TestSomeProperty="1" TearDownProp="1" /> |
51 </testsuite> | 51 </testsuite> |
52 </testsuites> | 52 </testsuites> |
53 """ | 53 """ |
54 | 54 |
55 EXPECTED_XML_2 = """<?xml version="1.0" encoding="UTF-8"?> | 55 EXPECTED_XML_2 = """<?xml version="1.0" encoding="UTF-8"?> |
56 <testsuites tests="1" failures="0" disabled="0" errors="0" time="*" name="AllTes
ts"> | 56 <testsuites tests="1" failures="0" disabled="0" errors="0" time="*" datetime="*"
name="AllTests"> |
57 <testsuite name="PropertyTwo" tests="1" failures="0" disabled="0" errors="0" t
ime="*"> | 57 <testsuite name="PropertyTwo" tests="1" failures="0" disabled="0" errors="0" t
ime="*"> |
58 <testcase name="TestSomeProperties" status="run" time="*" classname="Propert
yTwo" SetUpProp="2" TestSomeProperty="2" TearDownProp="2" /> | 58 <testcase name="TestSomeProperties" status="run" time="*" classname="Propert
yTwo" SetUpProp="2" TestSomeProperty="2" TearDownProp="2" /> |
59 </testsuite> | 59 </testsuite> |
60 </testsuites> | 60 </testsuites> |
61 """ | 61 """ |
62 | 62 |
63 | 63 |
64 class GTestXMLOutFilesTest(gtest_xml_test_utils.GTestXMLTestCase): | 64 class GTestXMLOutFilesTest(gtest_xml_test_utils.GTestXMLTestCase): |
65 """Unit test for Google Test's XML output functionality.""" | 65 """Unit test for Google Test's XML output functionality.""" |
66 | 66 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 self.NormalizeXml(actual.documentElement) | 123 self.NormalizeXml(actual.documentElement) |
124 self.AssertEquivalentNodes(expected.documentElement, | 124 self.AssertEquivalentNodes(expected.documentElement, |
125 actual.documentElement) | 125 actual.documentElement) |
126 expected.unlink() | 126 expected.unlink() |
127 actual.unlink() | 127 actual.unlink() |
128 | 128 |
129 | 129 |
130 if __name__ == "__main__": | 130 if __name__ == "__main__": |
131 os.environ["GTEST_STACK_TRACE_DEPTH"] = "0" | 131 os.environ["GTEST_STACK_TRACE_DEPTH"] = "0" |
132 gtest_test_utils.Main() | 132 gtest_test_utils.Main() |
OLD | NEW |