Skip to content

transd-lang/Reference-Test-Suite

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Transd Reference Test Suite

A set of tests for checking the correctness of working of Transd programming language. Also, this suite can be used as a comprehensive source of guiding examples for using various language elements.

These tests can be run with the Transd interpreter called TREE3 or with any program that has the Transd meta-compiler embedded.

How to run test suite

  1. Download this test suite.

  2. Download or compile the Transd interpreter called TREE3

  3. Go to the directory with the "tree3" binary. On the command line type (replacing "" with the actual full path to the directory with the downloaded test suite):

    ./tree3 "<PATH>/runtests.td"

In case the tests are successful, the output will look like this:

$ ./tree3 "/home/transd/Reference-Test-Suite/suite/runtests.td"

Tests started: 
 Testing eval.td........................................... OK
 Testing fibo.td........................................... OK
 Testing files.td.......................................... OK
 Testing imp.td............................................ OK

  // -- More output... --//

 Testing Type system/String/string.td...................... OK
 Testing Type system/Vector/create.td...................... OK
 Testing Type system/Vector/matrices.td.................... OK
 Testing Type system/Vector/meths.td....................... OK
Successful tests: 111
Failed tests: 0

Browsing test suite

The source code of the Suite is planned to contain the exhaustive set of examples of using every language element in every syntactic variant in which it can be used. Therefore, this Suite can be regarded as a comprehensive syntactic and semantic practical reference for the language. Currently, many test files contain informative comments to the code in them, and the work is being done to add such comments to the majority of test files.

Apart from inline comments in the code, some files contain a comment section named "Transd code example" in the end of the file, with more extended comments and notes.

Below is a list of references to the test suite files containing tests of particular parts of the language.

Releases

No releases published

Packages

No packages published