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

Unified Diff: build/android/pylib/gtest/test_package_test.py

Issue 441023002: [Android] Fix type-parameterized gtest parsing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: build/android/pylib/gtest/test_package_test.py
diff --git a/build/android/pylib/gtest/test_package_test.py b/build/android/pylib/gtest/test_package_test.py
index 9e91c5ae9bb8d0b0fd66afe11b658d234558e553..c4d552ed23433a0859b0ac9af7bc6f1a51cf71c8 100755
--- a/build/android/pylib/gtest/test_package_test.py
+++ b/build/android/pylib/gtest/test_package_test.py
@@ -30,29 +30,55 @@ class TestPackageTest(unittest.TestCase):
]
self.assertEqual(expected, actual)
- def testParseGTestListTests_parameterized_old(self):
+ def testParseGTestListTests_typeParameterized_old(self):
raw_output = [
- 'PTestCase.',
+ 'TPTestCase/WithTypeParam/0.',
+ ' testOne',
+ ' testTwo',
+ ]
+ actual = test_package.TestPackage._ParseGTestListTests(raw_output)
+ expected = [
+ 'TPTestCase/WithTypeParam/0.testOne',
+ 'TPTestCase/WithTypeParam/0.testTwo',
+ ]
+ self.assertEqual(expected, actual)
+
+ def testParseGTestListTests_typeParameterized_new(self):
+ raw_output = [
+ 'TPTestCase/WithTypeParam/0. # TypeParam = TypeParam0',
+ ' testOne',
+ ' testTwo',
+ ]
+ actual = test_package.TestPackage._ParseGTestListTests(raw_output)
+ expected = [
+ 'TPTestCase/WithTypeParam/0.testOne',
+ 'TPTestCase/WithTypeParam/0.testTwo',
+ ]
+ self.assertEqual(expected, actual)
+
+ def testParseGTestListTests_valueParameterized_old(self):
+ raw_output = [
+ 'VPTestCase.',
' testWithValueParam/0',
' testWithValueParam/1',
]
actual = test_package.TestPackage._ParseGTestListTests(raw_output)
expected = [
- 'PTestCase.testWithValueParam/0',
- 'PTestCase.testWithValueParam/1',
+ 'VPTestCase.testWithValueParam/0',
+ 'VPTestCase.testWithValueParam/1',
]
self.assertEqual(expected, actual)
- def testParseGTestListTests_parameterized_new(self):
+ def testParseGTestListTests_valueParameterized_new(self):
raw_output = [
- 'PTestCase.',
+ 'VPTestCase.',
' testWithValueParam/0 # GetParam() = 0',
' testWithValueParam/1 # GetParam() = 1',
]
actual = test_package.TestPackage._ParseGTestListTests(raw_output)
expected = [
- 'PTestCase.testWithValueParam/0',
- 'PTestCase.testWithValueParam/1',
+ 'VPTestCase.testWithValueParam/0',
+ 'VPTestCase.testWithValueParam/1',
]
self.assertEqual(expected, actual)
« build/android/pylib/gtest/test_package.py ('K') | « 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