Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(161)

Side by Side Diff: build/android/pylib/gtest/test_package_test.py

Issue 441783002: [Android] Update gtest test list parsing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix presubmit errors. Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « build/android/pylib/gtest/test_package.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/usr/bin/env python
2 # Copyright 2014 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 import unittest
7
8 from pylib.gtest import test_package
9
10 # pylint: disable=W0212
11
12
13 class TestPackageTest(unittest.TestCase):
14
15 def testParseGTestListTests_simple(self):
16 raw_output = [
17 'TestCaseOne.',
18 ' testOne',
19 ' testTwo',
20 'TestCaseTwo.',
21 ' testThree',
22 ' testFour',
23 ]
24 actual = test_package.TestPackage._ParseGTestListTests(raw_output)
25 expected = [
26 'TestCaseOne.testOne',
27 'TestCaseOne.testTwo',
28 'TestCaseTwo.testThree',
29 'TestCaseTwo.testFour',
30 ]
31 self.assertEqual(expected, actual)
32
33 def testParseGTestListTests_parameterized_old(self):
34 raw_output = [
35 'PTestCase.',
36 ' testWithValueParam/0',
37 ' testWithValueParam/1',
38 ]
39 actual = test_package.TestPackage._ParseGTestListTests(raw_output)
40 expected = [
41 'PTestCase.testWithValueParam/0',
42 'PTestCase.testWithValueParam/1',
43 ]
44 self.assertEqual(expected, actual)
45
46 def testParseGTestListTests_parameterized_new(self):
47 raw_output = [
48 'PTestCase.',
49 ' testWithValueParam/0 # GetParam() = 0',
50 ' testWithValueParam/1 # GetParam() = 1',
51 ]
52 actual = test_package.TestPackage._ParseGTestListTests(raw_output)
53 expected = [
54 'PTestCase.testWithValueParam/0',
55 'PTestCase.testWithValueParam/1',
56 ]
57 self.assertEqual(expected, actual)
58
59
60 if __name__ == '__main__':
61 unittest.main(verbosity=2)
62
OLDNEW
« no previous file with comments | « build/android/pylib/gtest/test_package.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698