Skip to content

LuCEresearchlab/programming-styles-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Programming Styles

This is the starter template for the labs of the Programming Styles course at USI.

Note that all labs where you need to implement the term frequency task use this exact same starter template.

Testing your program

You can test that your program produces the correct output by running our simple testing infrastructure.

You can run the test.sh script with bash. You need to specify the target program and the input size.

As an example, this command uses a small input for a JavaScript implementation.

./test.sh term_frequency.js small

The test scripts looks at the extension of the given program file to determine the interpreter that is going to be used to execute it:

  • .hs: Haskell file (interpreted by ghci)
  • .java: Java file (interpreted by java)
  • .js: JavaScript file (interpreted by node)

The script executes your program and checks its output. If the output produced by your program does not correspond to the expected output, you will be shown a side-by-side diff where on the left you have the expected output and on the right the actual output produced by your code.

To see all the options in detail, run ./test.sh -h.

About

Starter repository for the labs of the "Programming Styles" course at USI

Topics

Resources

Stars

Watchers

Forks

Contributors 2

  •  
  •  

Languages