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

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

Issue 2101243005: Add a snapshot of flutter/engine/src/build to our sdk (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: add README.dart Created 4 years, 5 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
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 gtest_test_instance
9
10
11 class GtestTestInstanceTests(unittest.TestCase):
12
13 def testParseGTestListTests_simple(self):
14 raw_output = [
15 'TestCaseOne.',
16 ' testOne',
17 ' testTwo',
18 'TestCaseTwo.',
19 ' testThree',
20 ' testFour',
21 ]
22 actual = gtest_test_instance.ParseGTestListTests(raw_output)
23 expected = [
24 'TestCaseOne.testOne',
25 'TestCaseOne.testTwo',
26 'TestCaseTwo.testThree',
27 'TestCaseTwo.testFour',
28 ]
29 self.assertEqual(expected, actual)
30
31 def testParseGTestListTests_typeParameterized_old(self):
32 raw_output = [
33 'TPTestCase/WithTypeParam/0.',
34 ' testOne',
35 ' testTwo',
36 ]
37 actual = gtest_test_instance.ParseGTestListTests(raw_output)
38 expected = [
39 'TPTestCase/WithTypeParam/0.testOne',
40 'TPTestCase/WithTypeParam/0.testTwo',
41 ]
42 self.assertEqual(expected, actual)
43
44 def testParseGTestListTests_typeParameterized_new(self):
45 raw_output = [
46 'TPTestCase/WithTypeParam/0. # TypeParam = TypeParam0',
47 ' testOne',
48 ' testTwo',
49 ]
50 actual = gtest_test_instance.ParseGTestListTests(raw_output)
51 expected = [
52 'TPTestCase/WithTypeParam/0.testOne',
53 'TPTestCase/WithTypeParam/0.testTwo',
54 ]
55 self.assertEqual(expected, actual)
56
57 def testParseGTestListTests_valueParameterized_old(self):
58 raw_output = [
59 'VPTestCase.',
60 ' testWithValueParam/0',
61 ' testWithValueParam/1',
62 ]
63 actual = gtest_test_instance.ParseGTestListTests(raw_output)
64 expected = [
65 'VPTestCase.testWithValueParam/0',
66 'VPTestCase.testWithValueParam/1',
67 ]
68 self.assertEqual(expected, actual)
69
70 def testParseGTestListTests_valueParameterized_new(self):
71 raw_output = [
72 'VPTestCase.',
73 ' testWithValueParam/0 # GetParam() = 0',
74 ' testWithValueParam/1 # GetParam() = 1',
75 ]
76 actual = gtest_test_instance.ParseGTestListTests(raw_output)
77 expected = [
78 'VPTestCase.testWithValueParam/0',
79 'VPTestCase.testWithValueParam/1',
80 ]
81 self.assertEqual(expected, actual)
82
83
84 if __name__ == '__main__':
85 unittest.main(verbosity=2)
86
OLDNEW
« no previous file with comments | « build/android/pylib/gtest/gtest_test_instance.py ('k') | build/android/pylib/gtest/local_device_gtest_run.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698