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

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

Issue 2785483002: Reland of V2 of //tools/binary_size rewrite (diffs). (Closed)
Patch Set: add missing name= 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
8 import unittest 7 import unittest
9 8
10 import function_signature 9 import function_signature
11 10
12 11
13 class AnalyzeTest(unittest.TestCase): 12 class AnalyzeTest(unittest.TestCase):
14 13
15 def testParseFunctionSignature(self): 14 def testParseFunctionSignature(self):
16 def check(ret_part, name_part, params_part, after_part=''): 15 def check(ret_part, name_part, params_part, after_part=''):
17 signature = ''.join((name_part, params_part, after_part)) 16 signature = ''.join((name_part, params_part, after_part))
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 SIG = '(anonymous namespace)::Foo::Baz() const::GLSLFP::onData(Foo, Bar)' 80 SIG = '(anonymous namespace)::Foo::Baz() const::GLSLFP::onData(Foo, Bar)'
82 got_full, got_name = function_signature.Parse(SIG) 81 got_full, got_name = function_signature.Parse(SIG)
83 self.assertEqual('(anonymous namespace)::Foo::Baz', got_name) 82 self.assertEqual('(anonymous namespace)::Foo::Baz', got_name)
84 self.assertEqual(SIG, got_full) 83 self.assertEqual(SIG, got_full)
85 84
86 85
87 if __name__ == '__main__': 86 if __name__ == '__main__':
88 logging.basicConfig(level=logging.DEBUG, 87 logging.basicConfig(level=logging.DEBUG,
89 format='%(levelname).1s %(relativeCreated)6d %(message)s') 88 format='%(levelname).1s %(relativeCreated)6d %(message)s')
90 unittest.main() 89 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