2017-09-06 20:15:35 +02:00
|
|
|
import faulthandler
|
2020-07-09 15:25:10 +02:00
|
|
|
from test.support import import_helper
|
2017-09-06 20:15:35 +02:00
|
|
|
import unittest
|
|
|
|
|
2020-07-09 15:25:10 +02:00
|
|
|
_xxtestfuzz = import_helper.import_module('_xxtestfuzz')
|
2017-09-06 20:15:35 +02:00
|
|
|
|
|
|
|
|
|
|
|
class TestFuzzer(unittest.TestCase):
|
|
|
|
"""To keep our https://github.com/google/oss-fuzz API working."""
|
|
|
|
|
|
|
|
def test_sample_input_smoke_test(self):
|
|
|
|
"""This is only a regression test: Check that it doesn't crash."""
|
|
|
|
_xxtestfuzz.run(b"")
|
|
|
|
_xxtestfuzz.run(b"\0")
|
|
|
|
_xxtestfuzz.run(b"{")
|
|
|
|
_xxtestfuzz.run(b" ")
|
|
|
|
_xxtestfuzz.run(b"x")
|
|
|
|
_xxtestfuzz.run(b"1")
|
2019-06-30 07:54:43 +02:00
|
|
|
_xxtestfuzz.run(b"AAAAAAA")
|
|
|
|
_xxtestfuzz.run(b"AAAAAA\0")
|
2017-09-06 20:15:35 +02:00
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
faulthandler.enable()
|
|
|
|
unittest.main()
|