OLD | NEW |
1 #!/usr/bin/python2.4 | 1 #!/usr/bin/python2.4 |
2 # -*- coding: utf-8; -*- | 2 # -*- coding: utf-8; -*- |
3 # | 3 # |
4 # cpplint_unittest.py is Copyright (C) 2009 Google Inc. | 4 # Copyright (c) 2009 Google Inc. All rights reserved. |
5 # | 5 # |
6 # It is free software; you can redistribute it and/or modify it under the | 6 # Redistribution and use in source and binary forms, with or without |
7 # terms of either: | 7 # modification, are permitted provided that the following conditions are |
| 8 # met: |
8 # | 9 # |
9 # a) the GNU General Public License as published by the Free Software | 10 # * Redistributions of source code must retain the above copyright |
10 # Foundation; either version 1, or (at your option) any later version, or | 11 # notice, this list of conditions and the following disclaimer. |
| 12 # * Redistributions in binary form must reproduce the above |
| 13 # copyright notice, this list of conditions and the following disclaimer |
| 14 # in the documentation and/or other materials provided with the |
| 15 # distribution. |
| 16 # * Neither the name of Google Inc. nor the names of its |
| 17 # contributors may be used to endorse or promote products derived from |
| 18 # this software without specific prior written permission. |
11 # | 19 # |
12 # b) the "Artistic License". | 20 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 21 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 22 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
| 23 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| 24 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 25 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 26 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 27 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 28 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 29 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 30 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
13 | 31 |
14 """Unit test for cpplint.py.""" | 32 """Unit test for cpplint.py.""" |
15 | 33 |
16 # TODO(unknown): Add a good test that tests UpdateIncludeState. | 34 # TODO(unknown): Add a good test that tests UpdateIncludeState. |
17 | 35 |
18 import codecs | 36 import codecs |
19 import os | 37 import os |
20 import random | 38 import random |
21 import re | 39 import re |
22 import unittest | 40 import unittest |
(...skipping 2719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2742 import sys | 2760 import sys |
2743 # We don't want to run the VerifyAllCategoriesAreSeen() test unless | 2761 # We don't want to run the VerifyAllCategoriesAreSeen() test unless |
2744 # we're running the full test suite: if we only run one test, | 2762 # we're running the full test suite: if we only run one test, |
2745 # obviously we're not going to see all the error categories. So we | 2763 # obviously we're not going to see all the error categories. So we |
2746 # only run VerifyAllCategoriesAreSeen() when no commandline flags | 2764 # only run VerifyAllCategoriesAreSeen() when no commandline flags |
2747 # are passed in. | 2765 # are passed in. |
2748 global _run_verifyallcategoriesseen | 2766 global _run_verifyallcategoriesseen |
2749 _run_verifyallcategoriesseen = (len(sys.argv) == 1) | 2767 _run_verifyallcategoriesseen = (len(sys.argv) == 1) |
2750 | 2768 |
2751 unittest.main() | 2769 unittest.main() |
OLD | NEW |