Skip to content

Latest commit

 

History

History
51 lines (41 loc) · 1.21 KB

File metadata and controls

51 lines (41 loc) · 1.21 KB

programmingLanguages

Repo for the programming languages class winter 2020
Members :

  • gavendanoc
  • DIEG055
  • saduquebe

Test

This guide follows the recommended project structure for testing given here

How to use ?

This repo uses a python library called unittest, which allows testing as a command line tool. This site offers an introduction, but you can always check the docs.

Running lexical analyzer

$ cd src
$ python3 lexical.py

Running syntactic analyzer

$ cd src
$ python3 main.py
Examples

For checking all test:

$ cd code
$ python3 -m unittest

For checking a single set of tests, in this case characters:

$ cd code
$ python3 -m unittest tests.testlexical.testCharacters

Another example, running test over a single test set

$ cd code
$ python3 -m unittest tests.testsyntax.testExamples

You can also check a whole section, for running all the syntax tests do :

$ cd code
$ python3 -m unittest discover tests.testsyntax