Difference between revisions of "Eiffeltest"

From Liberty Eiffel Wiki
Jump to navigation Jump to search
 
Line 12: Line 12:
 
== File handling ==
 
== File handling ==
   
The tools recursively iterates over the directory given as a command-line parameter, looking for test files, in other words Eiffel source files with special names:
+
The tools recursively iterates over the directory given as a command-line parameter, looking for test files or over the given test file names.
  +
  +
Test files are Eiffel source files with special names:
   
 
* test_*.e: valid source file that should be compilable and runnable without causing an error
 
* test_*.e: valid source file that should be compilable and runnable without causing an error
Line 19: Line 21:
 
For each test file, there can be optional files that have the same name but a different extension. These optional files can be used to provide:
 
For each test file, there can be optional files that have the same name but a different extension. These optional files can be used to provide:
   
* input data to be fed to the program. This optional file has the file name extension <tt>.in</tt>
+
* output that the compiler is expected to provide when compiling <tt>bad_*.e</tt> files. This file mandatory file for invalid tests has the file name extension <tt>.msg</tt>
* output that the program is expected to provide when run. This optional file has the file name extension <tt>.out</tt>
+
* input data to be fed to the program. This optional file (allowed only for valid tests) has the file name extension <tt>.in</tt>
  +
* output that the program is expected to provide when run. This optional file (allowed only for valid tests) has the file name extension <tt>.out</tt>
   
 
== Open issues ==
 
== Open issues ==

Revision as of 11:13, 11 November 2005


This page specifies a tool that has not been written yet.

eiffeltest is a tool that runs a suite of tests to validate the compiler

Synopsis

  • eiffeltest directory
  • eiffeltest source_file.e [source_file2.e...]

File handling

The tools recursively iterates over the directory given as a command-line parameter, looking for test files or over the given test file names.

Test files are Eiffel source files with special names:

  • test_*.e: valid source file that should be compilable and runnable without causing an error
  • bad_*.e: invalid source file that should trigger a given compiler error message

For each test file, there can be optional files that have the same name but a different extension. These optional files can be used to provide:

  • output that the compiler is expected to provide when compiling bad_*.e files. This file mandatory file for invalid tests has the file name extension .msg
  • input data to be fed to the program. This optional file (allowed only for valid tests) has the file name extension .in
  • output that the program is expected to provide when run. This optional file (allowed only for valid tests) has the file name extension .out

Open issues

How can we use .in and .out files on platforms that do not allow redirecting the standard input and output of programs?

Easy: just finish the "exec" cluster ;-) --Cyril 08:16, 10 nov 2005 (CET)