OLD | NEW |
---|---|
(Empty) | |
1 #!/usr/bin/env python | |
M-A Ruel
2012/07/25 16:03:20
This file is not executable.
csharp
2012/07/25 16:55:22
Done.
| |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | |
3 # Use of this source code is governed by a BSD-style license that can be | |
4 # found in the LICENSE file. | |
5 | |
6 """Provide common functionality to simulate a google-test executable. | |
7 | |
8 http://code.google.com/p/googletest/ | |
9 """ | |
10 | |
11 def get_test_output(test_name): | |
12 fixture, case = test_name.split('.', 1) | |
13 return ( | |
14 '[==========] Running 1 test from 1 test case.\n' | |
15 '[----------] Global test environment set-up.\n' | |
16 '[----------] 1 test from %(fixture)s\n' | |
17 '[ RUN ] %(fixture)s.%(case)s\n' | |
18 '[ OK ] %(fixture)s.%(case)s (0 ms)\n' | |
19 '[----------] 1 test from %(fixture)s (0 ms total)\n' | |
20 '\n') % { | |
21 'fixture': fixture, | |
22 'case': case, | |
23 } | |
24 | |
25 | |
26 def get_footer(number, total): | |
27 return ( | |
28 '[----------] Global test environment tear-down\n' | |
29 '[==========] %(number)d test from %(total)d test case ran. (0 ms total)\n' | |
30 '[ PASSED ] %(number)d test.\n' | |
31 '\n' | |
32 ' YOU HAVE 5 DISABLED TESTS\n' | |
33 '\n' | |
34 ' YOU HAVE 2 tests with ignored failures (FAILS prefix)\n') % { | |
35 'number': number, | |
36 'total': total, | |
37 } | |
OLD | NEW |