Skip to content

Commit

Permalink
fix reset test bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
TomyYamy committed Mar 25, 2022
1 parent dd29b61 commit 3806739
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/cpp/test_stl_reset_cpp.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import unittest

from rtamt.spec.stl.discrete_time.specification import STLDiscreteTimeSpecification
from rtamt.spec.stl.discrete_time.specification import StlDiscreteTimeOnlineSpecificationCpp

class TestSTLReset(unittest.TestCase):
def __init__(self, *args, **kwargs):
super(TestSTLReset, self).__init__(*args, **kwargs)

def test_constant(self):
spec = STLDiscreteTimeSpecification()
spec = StlDiscreteTimeOnlineSpecificationCpp()
spec.declare_var('out', 'float')
spec.spec = 'out = 5'
spec.parse()
Expand All @@ -24,7 +24,7 @@ def test_constant(self):
self.assertEqual(5, out, 'Constant reset assertion')

def test_variable(self):
spec = STLDiscreteTimeSpecification()
spec = StlDiscreteTimeOnlineSpecificationCpp()
spec.declare_var('req', 'float')
spec.declare_var('out', 'float')
spec.spec = 'out = req'
Expand All @@ -42,7 +42,7 @@ def test_variable(self):
self.assertEqual(3.3, out, 'Variable reset assertion')

def test_abs(self):
spec = STLDiscreteTimeSpecification()
spec = StlDiscreteTimeOnlineSpecificationCpp()
spec.declare_var('req', 'float')
spec.declare_var('out', 'float')
spec.spec = 'out = abs(req)'
Expand All @@ -60,7 +60,7 @@ def test_abs(self):
self.assertEqual(3.3, out, 'Abs reset assertion')

def test_addition(self):
spec = STLDiscreteTimeSpecification()
spec = StlDiscreteTimeOnlineSpecificationCpp()
spec.declare_var('req', 'float')
spec.declare_var('gnt', 'float')
spec.declare_var('out', 'float')
Expand All @@ -79,7 +79,7 @@ def test_addition(self):
self.assertEqual(3.3 + 4.3, out, 'Addition reset assertion')

def test_subtraction(self):
spec = STLDiscreteTimeSpecification()
spec = StlDiscreteTimeOnlineSpecificationCpp()
spec.declare_var('req', 'float')
spec.declare_var('gnt', 'float')
spec.declare_var('out', 'float')
Expand Down

0 comments on commit 3806739

Please sign in to comment.