Lhogho  0.0.028
 All Data Structures Files Functions Variables Typedefs Macros Pages
TestMaker

Introduction

The testmaker is main entry point to the lTester application

How it works?

The application is very simple. The first step is to parse command line args. Code for it is placed in - TestMaker implementation file . After that each file in the input dir is examined and if it's name matches the name filter (*.lgo) the file is passed to process_one_file function. A dispatching is made to find appropriate process function to handle the case, depending to testing mode.

Testing modes

At this moment there ara three modes:

  • Build mode -> In this mode a new test case is build from execution result of the compiler. Use it to create automatically test files
  • Test mode -> In this mode the compiler is called to compile in memory and execute the tests
  • Execute mode -> In this mode the source code is compiled to binary and then it is executed and tested. For first option parameter is -b; for thidr -e. Second is default

Processing a file

For each mode is a function which process test case. First all options are extracted. If not in build mode expected results are extracted too. Then the code is executed (depending on mode may be compiled first). Produced output is compared to the expected and if all steps are successfull the test is passed.


[ HOME | INDEX | ATOMS | VARS | REFERENCE ]
Lhogho Developer's Documentation
Wed Jul 10 2013