Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md with an example of how to build and run the tests #130

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ utest is an easy to use unit testing library for Haxe. It works on all the suppo
- [utest](#utest)
- [Installation](#installation)
- [Basic usage](#basic-usage)
- [How to run the tests](#how-to-run-the-tests)
- [Inter-test dependencies](#inter-test-dependencies)
- [Dependencies between test classes](#dependencies-between-test-classes)
- [Running single test from a test suite.](#running-single-test-from-a-test-suite)
Expand Down Expand Up @@ -123,6 +124,18 @@ class TestCase extends utest.Test {
}
```

## How to run the tests

You essentially need to "build" the project with the test Main and run it. For example, for a hashlink target:

```bash
set -e # so that we fail if build fails and not keep running the old tests
echo Buliding the test target
haxe --debug -hl myproject_test.hl --class-path src --class-path test -main TestAll -lib heaps -lib hlsdl -lib utest -D utest -D UTEST_PRINT_TESTS
echo Running the tests
haxe --debug -hl myproject_test.hl --class-path src --class-path test -main TestAll -lib heaps -lib hlsdl -lib utest -D utest -D UTEST_PRINT_TESTS
```

## Ignore a test

To skip certain test or test case one can annotate them with `@:ignore` meta. The meta accpets an optional string argument to indicate the reason ignoring the test.
Expand Down