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

Side by Side Diff: tools/binary_size/function_signature_test.py

Issue 2778963003: Revert of V2 of //tools/binary_size rewrite (diffs). (Closed)
Patch Set: Created 3 years, 8 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 | « tools/binary_size/file_format.py ('k') | tools/binary_size/helpers.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2017 The Chromium Authors. All rights reserved. 2 # Copyright 2017 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 import logging 6 import logging
7 import sys
7 import unittest 8 import unittest
8 9
9 import function_signature 10 import function_signature
10 11
11 12
12 class AnalyzeTest(unittest.TestCase): 13 class AnalyzeTest(unittest.TestCase):
13 14
14 def testParseFunctionSignature(self): 15 def testParseFunctionSignature(self):
15 def check(ret_part, name_part, params_part, after_part=''): 16 def check(ret_part, name_part, params_part, after_part=''):
16 signature = ''.join((name_part, params_part, after_part)) 17 signature = ''.join((name_part, params_part, after_part))
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 SIG = '(anonymous namespace)::Foo::Baz() const::GLSLFP::onData(Foo, Bar)' 81 SIG = '(anonymous namespace)::Foo::Baz() const::GLSLFP::onData(Foo, Bar)'
81 got_full, got_name = function_signature.Parse(SIG) 82 got_full, got_name = function_signature.Parse(SIG)
82 self.assertEqual('(anonymous namespace)::Foo::Baz', got_name) 83 self.assertEqual('(anonymous namespace)::Foo::Baz', got_name)
83 self.assertEqual(SIG, got_full) 84 self.assertEqual(SIG, got_full)
84 85
85 86
86 if __name__ == '__main__': 87 if __name__ == '__main__':
87 logging.basicConfig(level=logging.DEBUG, 88 logging.basicConfig(level=logging.DEBUG,
88 format='%(levelname).1s %(relativeCreated)6d %(message)s') 89 format='%(levelname).1s %(relativeCreated)6d %(message)s')
89 unittest.main() 90 unittest.main()
OLDNEW
« no previous file with comments | « tools/binary_size/file_format.py ('k') | tools/binary_size/helpers.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698