amath  1.8.5
Simple command line calculator
TestProgram Class Reference

Test control class. More...

#include <program_test.h>

Inheritance diagram for TestProgram:
Collaboration diagram for TestProgram:

Public Member Functions

 TestProgram (bool silent)
 
virtual ~TestProgram ()
 
virtual void Initialize (int argc, char **argv)
 
virtual void Start ()
 
virtual void Exit ()
 
- Public Member Functions inherited from Program
 Program ()
 
virtual ~Program ()
 
void NewPositionalInput (short unsigned int base, short unsigned int digits)
 
void NewPositionalOutput (short unsigned int base, short unsigned int digits)
 
void SetLastResult (Number *number)
 
void SetPrompt (const char *text) const
 
int GetExitStatus () const
 
bool GetAnsiMode () const
 
void SetAnsiMode (bool value)
 
struct NumberGetLastResult () const
 

Private Member Functions

void RunTests ()
 
void RunTestset01 ()
 
void RunTestset02 ()
 
void RunTestset03 ()
 
void RunTestset04 ()
 
void RunTestset05 ()
 
void RunTestset06 ()
 
void RunTestset07 ()
 
void RunTestset08 ()
 
void RunTestset09 ()
 
void RunTestset10 ()
 
void RunTestset11 ()
 
void TestExpression (const char *expression, const char *result)
 
void TestStatement (const char *statement, const char *result)
 
void PerformTest (const char *input, const char *result, bool show, bool check)
 
void TestExecution (const char *statement)
 

Private Attributes

bool silent
 
int pass
 
int fail
 

Additional Inherited Members

- Public Attributes inherited from Program
class LanguageLanguage
 
class ConsoleBaseConsole
 
class PreferencesBasePreferences
 
class FilesystemBaseFilesystem
 
class NumeralSystemInput
 
class NumeralSystemOutput
 
class VariableListVariables
 
class FunctionListFunctions
 
class GraphList * Graphs
 
- Protected Member Functions inherited from Program
void InitAnsiMode ()
 
- Protected Attributes inherited from Program
bool shellMode
 
bool ansiMode
 
int status
 

Detailed Description

Test control class.

This control class handle the execution of tests.

Definition at line 44 of file program_test.h.

Constructor & Destructor Documentation

◆ TestProgram()

TestProgram::TestProgram ( bool  silent)
explicit

◆ ~TestProgram()

virtual TestProgram::~TestProgram ( )
virtual

Member Function Documentation

◆ Exit()

virtual void TestProgram::Exit ( )
virtual

Reimplemented from Program.

◆ Initialize()

virtual void TestProgram::Initialize ( int  argc,
char **  argv 
)
virtual

Implements Program.

◆ PerformTest()

void TestProgram::PerformTest ( const char *  input,
const char *  result,
bool  show,
bool  check 
)
private

◆ RunTests()

void TestProgram::RunTests ( )
private

◆ RunTestset01()

void TestProgram::RunTestset01 ( )
private

◆ RunTestset02()

void TestProgram::RunTestset02 ( )
private

◆ RunTestset03()

void TestProgram::RunTestset03 ( )
private

◆ RunTestset04()

void TestProgram::RunTestset04 ( )
private

◆ RunTestset05()

void TestProgram::RunTestset05 ( )
private

◆ RunTestset06()

void TestProgram::RunTestset06 ( )
private

◆ RunTestset07()

void TestProgram::RunTestset07 ( )
private

◆ RunTestset08()

void TestProgram::RunTestset08 ( )
private

◆ RunTestset09()

void TestProgram::RunTestset09 ( )
private

◆ RunTestset10()

void TestProgram::RunTestset10 ( )
private

◆ RunTestset11()

void TestProgram::RunTestset11 ( )
private

◆ Start()

virtual void TestProgram::Start ( )
virtual

Implements Program.

◆ TestExecution()

void TestProgram::TestExecution ( const char *  statement)
private

◆ TestExpression()

void TestProgram::TestExpression ( const char *  expression,
const char *  result 
)
private

◆ TestStatement()

void TestProgram::TestStatement ( const char *  statement,
const char *  result 
)
private

Member Data Documentation

◆ fail

int TestProgram::fail
private

Definition at line 56 of file program_test.h.

◆ pass

int TestProgram::pass
private

Definition at line 55 of file program_test.h.

◆ silent

bool TestProgram::silent
private

Definition at line 54 of file program_test.h.


The documentation for this class was generated from the following file: