Beispiel #1
0
 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)
Beispiel #2
0
 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)
Beispiel #3
0
 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_question = ql_statements.Question(self.test_location,
                                                 self.test_identifier,
                                                 self.test_text,
                                                 self.test_type)
Beispiel #4
0
 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)
Beispiel #5
0
    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_statement = statement.Statement(self.test_location)
Beispiel #7
0
 def setUp(self):
     self.test_location = code_location.CodeLocation(1, 1)
     self.test_literal = expressions.Literal(self.test_location)
Beispiel #8
0
 def setUp(self):
     self.test_location = code_location.CodeLocation(1, 1)
     self.test_expression = expressions.Expression(self.test_location)
Beispiel #9
0
 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)
Beispiel #10
0
 def setUp(self):
     self.test_location = code_location.CodeLocation(1, 1)
     self.test_identifier = "identifier"
     self.test_identifier_class = expressions.Identifier(
         self.test_location, self.test_identifier)
Beispiel #11
0
 def setUp(self):
     self.test_location = code_location.CodeLocation(1, 1)
     self.test_identifier = "identifier"
     self.test_block = block.Block(self.test_location, [])
     self.test_form = form.Form(self.test_location, self.test_identifier,
                                self.test_block)