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 14 matching lines...) Expand all Loading... |
25 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | 25 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
26 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 26 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
27 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 27 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
28 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 28 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
29 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 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. | 30 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
31 | 31 |
32 """Tests the text output of Google C++ Mocking Framework. | 32 """Tests the text output of Google C++ Mocking Framework. |
33 | 33 |
34 SYNOPSIS | 34 SYNOPSIS |
35 gmock_output_test.py --gmock_build_dir=BUILD/DIR --gengolden | 35 gmock_output_test.py --build_dir=BUILD/DIR --gengolden |
36 # where BUILD/DIR contains the built gmock_output_test_ file. | 36 # where BUILD/DIR contains the built gmock_output_test_ file. |
37 gmock_output_test.py --gengolden | 37 gmock_output_test.py --gengolden |
38 gmock_output_test.py | 38 gmock_output_test.py |
39 """ | 39 """ |
40 | 40 |
41 __author__ = 'wan@google.com (Zhanyong Wan)' | 41 __author__ = 'wan@google.com (Zhanyong Wan)' |
42 | 42 |
43 import os | 43 import os |
44 import re | 44 import re |
45 import sys | 45 import sys |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 | 171 |
172 | 172 |
173 if __name__ == '__main__': | 173 if __name__ == '__main__': |
174 if sys.argv[1:] == [GENGOLDEN_FLAG]: | 174 if sys.argv[1:] == [GENGOLDEN_FLAG]: |
175 (output, _) = GetNormalizedCommandOutputAndLeakyTests(COMMAND) | 175 (output, _) = GetNormalizedCommandOutputAndLeakyTests(COMMAND) |
176 golden_file = open(GOLDEN_PATH, 'wb') | 176 golden_file = open(GOLDEN_PATH, 'wb') |
177 golden_file.write(output) | 177 golden_file.write(output) |
178 golden_file.close() | 178 golden_file.close() |
179 else: | 179 else: |
180 gmock_test_utils.Main() | 180 gmock_test_utils.Main() |
OLD | NEW |