|
Classes | |
| class | StdForthIo |
| class | TestForthIo |
| class | ForthTest |
Defines | |
| #define | SOURCE_ROOT_PATH "forth/" |
| #define | STRING(string) string |
| #define | LINE(string) string "\n" |
| #define | COUNTED_STRING(string) (CHAR*)STRING(string),(sizeof(string)-1) |
Functions | |
| bool | ReadFile (const char *name, void *&address, unsigned &size) |
| void | TestForth (bool interactive) |
| CELL | ForthTest::Include (const char *fileName) |
| CELL | ForthTest::IncludeLines (const char *fileName) |
| #define SOURCE_ROOT_PATH "forth/" |
Path for source code location
Definition at line 45 of file forthtest.cpp.
| #define STRING | ( | string | ) | string |
Macro to include string constants in source which match the width of the CHAR type.
Definition at line 188 of file forthtest.cpp.
| #define LINE | ( | string | ) | string "\n" |
Macro to include a line of text as an in-source constant .
Definition at line 190 of file forthtest.cpp.
| #define COUNTED_STRING | ( | string | ) | (CHAR*)STRING(string),(sizeof(string)-1) |
Construct counted string arguments in the form (CHAR*)string,(CELL)stringLength
| string | A quoted string, e.g. "A string" |
Definition at line 285 of file forthtest.cpp.
| bool ReadFile | ( | const char * | name, | |
| void *& | address, | |||
| unsigned & | size | |||
| ) |
Read a files contents into memory. The file is assumed to contain characters of 8 bit size but they are stored in memory as characters the same size as the Forth VM's CHAR.
| name | The file name. | |
| address | On success, this is the address of the memory cell containing the read contents. This memory must be freed when it is no longer required. | |
| size | On success, this is the number of characters in the file. |
Definition at line 158 of file forthtest.cpp.
| void TestForth | ( | bool | interactive | ) |
Top level test function. Call this to perform all tests.
| interactive | True, if the user will interact with the tests, false if tests are to run non-interactively. |
Definition at line 294 of file forthtest.cpp.
| CELL ForthTest::Include | ( | const char * | fileName | ) | [inherited] |
Load the contents of a file and EVALUATE it.
| fileName | The name of the file. |
Definition at line 216 of file forthtest.cpp.
| CELL ForthTest::IncludeLines | ( | const char * | fileName | ) | [inherited] |
Load the contents of a file and EVALUATE it a line at a time.
| fileName | The name of the file. |
Definition at line 231 of file forthtest.cpp.
1.6.1