Plot Script
Functions
interpreter_tests.cpp File Reference
#include "catch.hpp"
#include <string>
#include <sstream>
#include <fstream>
#include <iostream>
#include "semantic_error.hpp"
#include "interpreter.hpp"
#include "expression.hpp"
Include dependency graph for interpreter_tests.cpp:

Functions

Expression run (const std::string &program)
 
 TEST_CASE ("Test Interpreter parser with expected input", "[interpreter]")
 
 TEST_CASE ("Test Interpreter parser with numerical literals", "[interpreter]")
 
 TEST_CASE ("Test Interpreter parser with truncated input", "[interpreter]")
 
 TEST_CASE ("Test Interpreter parser with extra input", "[interpreter]")
 
 TEST_CASE ("Test Interpreter parser with single non-keyword", "[interpreter]")
 
 TEST_CASE ("Test Interpreter parser with empty input", "[interpreter]")
 
 TEST_CASE ("Test Interpreter parser with empty expression", "[interpreter]")
 
 TEST_CASE ("Test Interpreter parser with bad number string", "[interpreter]")
 
 TEST_CASE ("Test Interpreter parser with incorrect input. Regression Test", "[interpreter]")
 
 TEST_CASE ("Test Interpreter result with literal expressions", "[interpreter]")
 
 TEST_CASE ("Test Interpreter result with simple procedures (add)", "[interpreter]")
 
 TEST_CASE ("Test Interpreter special forms: begin and define", "[interpreter]")
 
 TEST_CASE ("Test a medium-sized expression", "[interpreter]")
 
 TEST_CASE ("Test arithmetic procedures", "[interpreter]")
 
 TEST_CASE ("Test some semantically invalid expresions", "[interpreter]")
 
 TEST_CASE ("Test for exceptions from semantically incorrect input", "[interpreter]")
 
 TEST_CASE ("Test malformed define", "[interpreter]")
 
 TEST_CASE ("Test using number as procedure", "[interpreter]")
 

Function Documentation

◆ run()

Expression run ( const std::string &  program)

◆ TEST_CASE() [1/18]

TEST_CASE ( "Test Interpreter parser with expected input"  ,
""  [interpreter] 
)

◆ TEST_CASE() [2/18]

TEST_CASE ( "Test Interpreter parser with numerical literals"  ,
""  [interpreter] 
)

◆ TEST_CASE() [3/18]

TEST_CASE ( "Test Interpreter parser with truncated input"  ,
""  [interpreter] 
)

◆ TEST_CASE() [4/18]

TEST_CASE ( "Test Interpreter parser with extra input"  ,
""  [interpreter] 
)

◆ TEST_CASE() [5/18]

TEST_CASE ( "Test Interpreter parser with single non-keyword"  ,
""  [interpreter] 
)

◆ TEST_CASE() [6/18]

TEST_CASE ( "Test Interpreter parser with empty input"  ,
""  [interpreter] 
)

◆ TEST_CASE() [7/18]

TEST_CASE ( "Test Interpreter parser with empty expression"  ,
""  [interpreter] 
)

◆ TEST_CASE() [8/18]

TEST_CASE ( "Test Interpreter parser with bad number string"  ,
""  [interpreter] 
)

◆ TEST_CASE() [9/18]

TEST_CASE ( "Test Interpreter parser with incorrect input. Regression Test"  ,
""  [interpreter] 
)

◆ TEST_CASE() [10/18]

TEST_CASE ( "Test Interpreter result with literal expressions"  ,
""  [interpreter] 
)

◆ TEST_CASE() [11/18]

TEST_CASE ( "Test Interpreter result with simple procedures (add)"  ,
""  [interpreter] 
)

◆ TEST_CASE() [12/18]

TEST_CASE ( "Test Interpreter special forms: begin and define"  ,
""  [interpreter] 
)

◆ TEST_CASE() [13/18]

TEST_CASE ( "Test a medium-sized expression"  ,
""  [interpreter] 
)

◆ TEST_CASE() [14/18]

TEST_CASE ( "Test arithmetic procedures"  ,
""  [interpreter] 
)

◆ TEST_CASE() [15/18]

TEST_CASE ( "Test some semantically invalid expresions"  ,
""  [interpreter] 
)

◆ TEST_CASE() [16/18]

TEST_CASE ( "Test for exceptions from semantically incorrect input"  ,
""  [interpreter] 
)

◆ TEST_CASE() [17/18]

TEST_CASE ( "Test malformed define"  ,
""  [interpreter] 
)

◆ TEST_CASE() [18/18]

TEST_CASE ( "Test using number as procedure"  ,
""  [interpreter] 
)