add runlen test
This commit is contained in:
parent
eb1133825a
commit
40eb4b0117
@ -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
|
||||
|
||||
18
tests/test_runlen.py
Normal file
18
tests/test_runlen.py
Normal file
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user