"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "googletest/test/gtest_xml_test_utils.py" between
googletest-release-1.11.0.tar.gz and googletest-release-1.12.0.tar.gz

About: GoogleTest is Google's (unit) testing and mocking framework for C++ tests.

gtest_xml_test_utils.py  (googletest-release-1.11.0):gtest_xml_test_utils.py  (googletest-release-1.12.0)
skipping to change at line 34 skipping to change at line 34
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
"""Unit test utilities for gtest_xml_output""" """Unit test utilities for gtest_xml_output"""
import re import re
from xml.dom import minidom, Node from xml.dom import minidom, Node
import gtest_test_utils from googletest.test import gtest_test_utils
GTEST_DEFAULT_OUTPUT_FILE = 'test_detail.xml' GTEST_DEFAULT_OUTPUT_FILE = 'test_detail.xml'
class GTestXMLTestCase(gtest_test_utils.TestCase): class GTestXMLTestCase(gtest_test_utils.TestCase):
""" """
Base class for tests of Google Test's XML output functionality. Base class for tests of Google Test's XML output functionality.
""" """
def AssertEquivalentNodes(self, expected_node, actual_node): def AssertEquivalentNodes(self, expected_node, actual_node):
""" """
skipping to change at line 172 skipping to change at line 172
* The "type_param" attribute of <testcase> elements is replaced with a * The "type_param" attribute of <testcase> elements is replaced with a
single asterisk (if it sn non-empty) as it is the type name returned single asterisk (if it sn non-empty) as it is the type name returned
by the compiler and is platform dependent. by the compiler and is platform dependent.
* The line info reported in the first line of the "message" * The line info reported in the first line of the "message"
attribute and CDATA section of <failure> elements is replaced with the attribute and CDATA section of <failure> elements is replaced with the
file's basename and a single asterisk for the line number. file's basename and a single asterisk for the line number.
* The directory names in file paths are removed. * The directory names in file paths are removed.
* The stack traces are removed. * The stack traces are removed.
""" """
if element.tagName == 'testcase':
source_file = element.getAttributeNode('file')
if source_file:
source_file.value = re.sub(r'^.*[/\\](.*)', '\\1', source_file.value)
if element.tagName in ('testsuites', 'testsuite', 'testcase'): if element.tagName in ('testsuites', 'testsuite', 'testcase'):
timestamp = element.getAttributeNode('timestamp') timestamp = element.getAttributeNode('timestamp')
timestamp.value = re.sub(r'^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d\.\d\d\d$', timestamp.value = re.sub(r'^\d{4}-\d\d-\d\dT\d\d:\d\d:\d\d\.\d\d\d$',
'*', timestamp.value) '*', timestamp.value)
if element.tagName in ('testsuites', 'testsuite', 'testcase'): if element.tagName in ('testsuites', 'testsuite', 'testcase'):
time = element.getAttributeNode('time') time = element.getAttributeNode('time')
time.value = re.sub(r'^\d+(\.\d+)?$', '*', time.value) time.value = re.sub(r'^\d+(\.\d+)?$', '*', time.value)
type_param = element.getAttributeNode('type_param') type_param = element.getAttributeNode('type_param')
if type_param and type_param.value: if type_param and type_param.value:
type_param.value = '*' type_param.value = '*'
 End of changes. 2 change blocks. 
1 lines changed or deleted 5 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)