Question

I'm writing some Haskell code in the Leksah IDE. As I edit the code, Leksah does background compilation and runs unit tests after the background compilation completes.

I see in the "console" frame the following:

Building UNFI-EIC-0.0.1...
Preprocessing test suite 'test-UNFI-EIC' for UNFI-EIC-0.0.1...
Preprocessing executable 'UNFI-EIC' for UNFI-EIC-0.0.1...
-----------------------------------------
Running 1 test suites...
Test suite test-UNFI-EIC: RUNNING...
test-UNFI-EIC: Prelude.head: empty list
Test suite test-UNFI-EIC: FAIL
Test suite logged to: dist/test/UNFI-EIC-0.0.1-test-UNFI-EIC.log
0 of 1 test suites (0 of 1 test cases) passed.

Where are the default test cases that failed? How do I add relevant unit tests to them? There is nothing obvious in the GUI menus...

How can I edit the test suite for the package that is integrated in Leksah?

No correct solution

OTHER TIPS

You can edit the unit test suite by finding the test-suite reference in the .cabal file of the project.

To do this, go to your project directory and open *.cabal in a text editor and search for the line containing test-suite:. This line will be of the form test-suite: ExampleTests, where ExampleTests is the main file of the test suite for the project.

Simply add tests to this file using the testing framework of your choice. Leksah will run these tests automatically through the IDE GUI.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top