• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 import faulthandler
2 import test.support
3 import unittest
4 
5 _xxtestfuzz = test.support.import_module('_xxtestfuzz')
6 
7 
8 class TestFuzzer(unittest.TestCase):
9     """To keep our https://github.com/google/oss-fuzz API working."""
10 
11     def test_sample_input_smoke_test(self):
12         """This is only a regression test: Check that it doesn't crash."""
13         _xxtestfuzz.run(b"")
14         _xxtestfuzz.run(b"\0")
15         _xxtestfuzz.run(b"{")
16         _xxtestfuzz.run(b" ")
17         _xxtestfuzz.run(b"x")
18         _xxtestfuzz.run(b"1")
19         _xxtestfuzz.run(b"AAAAAAA")
20         _xxtestfuzz.run(b"AAAAAA\0")
21 
22 
23 if __name__ == "__main__":
24     faulthandler.enable()
25     unittest.main()
26