Ejemplo n.º 1
0
 def test_check_gteq_no_gteq_defined(self):
     variables=[]
     variables.append(Variable('four', 'TestType', 13))
     gteq = None
     checker = ComplianceChecker()
     with pytest.raises(ComplianceError):
         checker.check_gteq(gteq, variables)
Ejemplo n.º 2
0
 def test_check_gteq_diff_parameter_number_less(self):
     variables=[]
     variables.append(Variable('one', 'int', 10))
     variables.append(Variable('two', 'TestType', 13))
     gteq = Function('gteq', 2)
     gteq.parameters.append(Parameter('one1', 'int'))
     gteq.parameters.append(Parameter('one2', 'int'))
     gteq.returndt = 'bool'
     checker = ComplianceChecker()
     with pytest.raises(ComplianceError):
         checker.check_gteq(gteq, variables)
Ejemplo n.º 3
0
 def test_check_gteq_compliant_gteq(self):
     variables=[]
     variables.append(Variable('one', 'int', 10))
     variables.append(Variable('two', 'TestType', 13))
     gteq = Function('gteq', 2)
     gteq.parameters.append(Parameter('one1', 'int'))
     gteq.parameters.append(Parameter('one2', 'int'))
     gteq.parameters.append(Parameter('two1', 'TestType'))
     gteq.parameters.append(Parameter('two2', 'TestType'))
     gteq.returndt = 'bool'
     checker = ComplianceChecker()
     assert checker.check_gteq(gteq, variables) == True