blob: 61bb2bb871750b798ed8bc2f75923a7601474ebb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
/*
* TestASTInspector.h
*
* Created on: Dec 18, 2012
* Author: att
*/
#ifndef TESTASTINSPECTOR_H_
#define TESTASTINSPECTOR_H_
#include "TestSuite.h"
#include "../ASTInspector.h"
#include "../AST/BasicExpression.h"
#include "../AST/ConstantExpression.h"
/**
* TestASTInspector checks some basic features of ASTInspector.
*/
class TestASTInspector: public TestSuite {
public:
TestASTInspector();
virtual ~TestASTInspector();
virtual std::string all_tests();
private:
//tests
std::string test_inspecting_basic_expression();
std::string test_inspecting_simple_AST();
//helper functions
BasicExpression * build_basic_expression(std::string oper, SenchaObject arg1, SenchaObject arg2);
BasicExpression * build_simple_AST(std::string oper, BasicExpression * left, BasicExpression * right);
//instance of ASTInspector
ASTInspector inspector;
};
#endif /* TESTASTINSPECTOR_H_ */
|