42 lines
895 B
C++
42 lines
895 B
C++
/*
|
|
* TestParser.h
|
|
*
|
|
* Created on: Dec 22, 2012
|
|
* Author: att
|
|
*/
|
|
|
|
#ifndef TESTPARSER_H_
|
|
#define TESTPARSER_H_
|
|
|
|
#include "TestSuite.h"
|
|
#include "../Lexer.h"
|
|
#include "../Parser.h"
|
|
#include "../ASTInspector.h"
|
|
#include <utility>
|
|
#include <vector>
|
|
|
|
|
|
|
|
class TestParser: public TestSuite {
|
|
public:
|
|
TestParser();
|
|
virtual ~TestParser();
|
|
typedef std::pair<std::string, bool> InputOutputPair;
|
|
typedef std::pair<std::string, SenchaObject> SInputOutputPair;
|
|
private:
|
|
std::string test_parsing_and_evaluating_logical_expressions();
|
|
std::string test_adding_new_function();
|
|
std::string test_calling_funtion();
|
|
std::string prepare_some_function_declarations();
|
|
std::string test_writing_and_accessing_array_elements();
|
|
std::string test_changing_letters_in_string();
|
|
|
|
|
|
std::vector<InputOutputPair> prepare_logical_input();
|
|
|
|
virtual std::string all_tests();
|
|
|
|
};
|
|
|
|
#endif /* TESTPARSER_H_ */
|