| Index: tools/code_coverage/croc_test.py
|
| diff --git a/tools/code_coverage/croc_test.py b/tools/code_coverage/croc_test.py
|
| old mode 100644
|
| new mode 100755
|
| index 36fc546e768edeb332fe1ea39fd307ca7243cc2c..7c2521ca3dfd6be9d143c4750813852ebe490774
|
| --- a/tools/code_coverage/croc_test.py
|
| +++ b/tools/code_coverage/croc_test.py
|
| @@ -1,33 +1,7 @@
|
| -#!/usr/bin/python2.4
|
| -#
|
| -# Copyright 2009, Google Inc.
|
| -# All rights reserved.
|
| -#
|
| -# Redistribution and use in source and binary forms, with or without
|
| -# modification, are permitted provided that the following conditions are
|
| -# met:
|
| -#
|
| -# * Redistributions of source code must retain the above copyright
|
| -# notice, this list of conditions and the following disclaimer.
|
| -# * Redistributions in binary form must reproduce the above
|
| -# copyright notice, this list of conditions and the following disclaimer
|
| -# in the documentation and/or other materials provided with the
|
| -# distribution.
|
| -# * Neither the name of Google Inc. nor the names of its
|
| -# contributors may be used to endorse or promote products derived from
|
| -# this software without specific prior written permission.
|
| -#
|
| -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
| -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
| -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
| -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
| -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
| -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
| -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
| -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
| -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
| -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
| -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| +#!/usr/bin/env python
|
| +# Copyright (c) 2011 The Chromium Authors. All rights reserved.
|
| +# Use of this source code is governed by a BSD-style license that can be
|
| +# found in the LICENSE file.
|
|
|
| """Unit tests for Crocodile."""
|
|
|
| @@ -36,8 +10,6 @@ import StringIO
|
| import unittest
|
| import croc
|
|
|
| -#------------------------------------------------------------------------------
|
| -
|
|
|
| class TestCoverageStats(unittest.TestCase):
|
| """Tests for croc.CoverageStats."""
|
| @@ -62,8 +34,6 @@ class TestCoverageStats(unittest.TestCase):
|
| c.Add({'a': 4, 'd': 3})
|
| self.assertEqual(c, {'a': 5, 'b': 0, 'c': 5, 'd': 3})
|
|
|
| -#------------------------------------------------------------------------------
|
| -
|
|
|
| class TestCoveredFile(unittest.TestCase):
|
| """Tests for croc.CoveredFile."""
|
| @@ -144,8 +114,6 @@ class TestCoveredFile(unittest.TestCase):
|
| 'files_covered': 1,
|
| })
|
|
|
| -#------------------------------------------------------------------------------
|
| -
|
|
|
| class TestCoveredDir(unittest.TestCase):
|
| """Tests for croc.CoveredDir."""
|
| @@ -193,8 +161,6 @@ class TestCoveredDir(unittest.TestCase):
|
| d2.subdirs = {'/a/b/d': d4, '/a/b/e': d5}
|
| self.assertEqual(d1.GetTree(), 'a/\n b/\n d/\n e/\n c/')
|
|
|
| -#------------------------------------------------------------------------------
|
| -
|
|
|
| class TestCoverage(unittest.TestCase):
|
| """Tests for croc.Coverage."""
|
| @@ -787,7 +753,6 @@ GetStat('nosuch') = 42
|
| # ParseLcovFile()
|
| # PrintTree()
|
|
|
| -#------------------------------------------------------------------------------
|
|
|
| if __name__ == '__main__':
|
| unittest.main()
|
|
|