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

Side by Side Diff: net/tools/dafsa/make_dafsa_unittest.py

Issue 1303973009: [DO NOT COMMIT] Re-use the dafsa code for s-w-r histograms (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase to fix patch errors on try bots. Created 5 years, 1 month 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
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright 2014 The Chromium Authors. All rights reserved. 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 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 6
7 import sys 7 import sys
8 import unittest 8 import unittest
9 import make_dafsa 9 import make_dafsa
10 10
(...skipping 737 matching lines...) Expand 10 before | Expand all | Expand 10 after
748 infile = [ '%%', 'aa, 1', 'bbb, 2', 'baa, 1', '%%' ] 748 infile = [ '%%', 'aa, 1', 'bbb, 2', 'baa, 1', '%%' ]
749 bytes = [ 0x02, 0x83, 0xE2, 0x02, 0x83, 0x61, 0x61, 0x81, 0x62, 0x62, 749 bytes = [ 0x02, 0x83, 0xE2, 0x02, 0x83, 0x61, 0x61, 0x81, 0x62, 0x62,
750 0x82 ] 750 0x82 ]
751 outfile = make_dafsa.to_cxx(bytes) 751 outfile = make_dafsa.to_cxx(bytes)
752 self.assertEqual(make_dafsa.words_to_cxx(make_dafsa.parse_gperf(infile)), 752 self.assertEqual(make_dafsa.words_to_cxx(make_dafsa.parse_gperf(infile)),
753 outfile) 753 outfile)
754 754
755 755
756 if __name__ == '__main__': 756 if __name__ == '__main__':
757 unittest.main() 757 unittest.main()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698