def setUp(self): self.test_location = code_location.CodeLocation(1, 1) self.test_expression = expressions.GreaterThan(self.test_location, 5, 4) self.test_block = block.Block(self.test_location, []) self.test_if = ql_statements.If(self.test_location, self.test_expression, self.test_block)
def setUp(self): self.test_location = code_location.CodeLocation(1, 1) self.test_expression_1 = expressions.GreaterThan( self.test_location, 5, 4) self.test_expression_2 = expressions.Addition(self.test_location, 2, 2) self.test_binary_expression = expressions.BinaryExpression( self.test_location, self.test_expression_1, self.test_expression_2)
def setUp(self): self.test_location = code_location.CodeLocation(1, 1) self.test_identifier = "identifier" self.test_text = "text" self.test_type = "boolean" self.test_expression = expressions.GreaterThan(self.test_location, 5, 4) self.test_computed_question = ql_statements.ComputedQuestion( self.test_location, self.test_identifier, self.test_text, self.test_type, self.test_expression)
def setUp(self): self.test_location = code_location.CodeLocation(1, 1) self.test_expression_1 = expressions.GreaterThan(self.test_location, 5, 4) self.test_expression_2 = expressions.Addition(self.test_location, 2, 2) self.expressions = [expressions.Multiplication, expressions.Division, expressions.Addition, expressions.Subtraction, expressions.GreaterThan, expressions.LessThan, expressions.GreaterThanOrEqual, expressions.LessThanOrEqual, expressions.Equals, expressions.NotEquals, expressions.And, expressions.Or] self.test_expressions = [] for expression in self.expressions: self.test_expressions.append(expression(self.test_location, self.test_expression_1, self.test_expression_2))
def setUp(self): self.test_location = code_location.CodeLocation(1, 1) self.test_expression = expressions.GreaterThan(self.test_location, 5, 4) self.test_unary_expression = expressions.UnaryExpression( self.test_location, self.test_expression)