OLD | NEW |
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 739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
750 infile = [ '%%', 'aa, 1', 'bbb, 2', 'baa, 1', '%%' ] | 750 infile = [ '%%', 'aa, 1', 'bbb, 2', 'baa, 1', '%%' ] |
751 bytes = [ 0x02, 0x83, 0xE2, 0x02, 0x83, 0x61, 0x61, 0x81, 0x62, 0x62, | 751 bytes = [ 0x02, 0x83, 0xE2, 0x02, 0x83, 0x61, 0x61, 0x81, 0x62, 0x62, |
752 0x82 ] | 752 0x82 ] |
753 outfile = make_dafsa.to_cxx(bytes) | 753 outfile = make_dafsa.to_cxx(bytes) |
754 self.assertEqual(make_dafsa.words_to_cxx(make_dafsa.parse_gperf(infile)), | 754 self.assertEqual(make_dafsa.words_to_cxx(make_dafsa.parse_gperf(infile)), |
755 outfile) | 755 outfile) |
756 | 756 |
757 | 757 |
758 if __name__ == '__main__': | 758 if __name__ == '__main__': |
759 unittest.main() | 759 unittest.main() |
OLD | NEW |