diff --git a/.travis.yml b/.travis.yml index 2cc49e8..fb8741a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,6 +23,7 @@ env: - TASK=ONEOF - TASK=OVERFLOW - TASK=PRIMES +- TASK=RUNLEN - TASK=STREAMINGANDFORMATTING - TASK=TAKEOVER script: @@ -34,6 +35,7 @@ script: - if [ $TASK = KLEE ]; then nosetests tests/test_klee.py ; fi - if [ $TASK = LISTS ]; then nosetests tests/test_lists.py ; fi - if [ $TASK = ONEOF ]; then nosetests tests/test_oneof.py ; fi +- if [ $TASK = RUNLEN ]; then nosetests tests/test_runlen.py ; fi - if [ $TASK = OVERFLOW ]; then nosetests tests/test_overflow.py ; fi - if [ $TASK = PRIMES ]; then nosetests tests/test_primes.py ; fi - if [ $TASK = STREAMINGANDFORMATTING ]; then nosetests tests/test_streamingandformatting.py ; fi diff --git a/tests/test_runlen.py b/tests/test_runlen.py new file mode 100644 index 0000000..a466f13 --- /dev/null +++ b/tests/test_runlen.py @@ -0,0 +1,18 @@ +from __future__ import print_function +import deepstate_base +import logrun + + +class RunlenTest(deepstate_base.DeepStateTestCase): + def run_deepstate(self, deepstate): + (r, output) = logrun.logrun([deepstate, "build/examples/Runlen"], + "deepstate.out", 1800) + self.assertEqual(r, 0) + + self.assertTrue("Passed: Runlength_EncodeDecode" in output) + foundCrashSave = False + for line in output.split("\n"): + if ("Saving input to" in line) and (".crash" in line): + foundCrashSave = True + self.assertTrue(foundCrashSave) +