add runlen test

This commit is contained in:
Alex Groce
2018-12-31 14:20:15 -07:00
parent eb1133825a
commit 40eb4b0117
2 changed files with 20 additions and 0 deletions
+18
View 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)