Skip to content

Latest commit

 

History

History
71 lines (48 loc) · 1.27 KB

File metadata and controls

71 lines (48 loc) · 1.27 KB

Validation of the Ed OCaml Environment for CS 3110

This little project exercises most of the OCaml environment needed for CS 3110.

Test 0: Toplevel

In the Ed terminal, run utop. You should get a prompt like this:

utop #

Enter this then press return:

"hello ed";;

You should see this:

utop # "hello ed";;
- : string = "hello ed"

Test 1: Libraries

Run make main from the root of this project. You should get output like this:

Testing Batteries...
The Batteries library is working.
Testing CSV (and file I/O)...
The CSV library is working.
Testing ANSITerminal...
If the ANSITerminal library is working, this text should be blue on black.
All tests completed.

Test 2: Unit Testing

Run dune test. You should get output like this:

..
Ran: 2 tests in: 0.11 seconds.
OK

Then run make bisect and open _coverage/index.html. You should see 100% coverage of lib/lib.ml.

Test 3: Auto-Formatting

Open "lib/lib.ml". You should see:

let inc x = 1 + x

Change that to:

let inc x =
  1      + x

If Ed supports running an autoformatter, do whatever it takes to trigger that. (Save the file?) It should revert to its former single-line content.

Not Tested

This project does not yet attempt to test LWT or Menhir.