Apply suggestions from code review

Co-authored-by: Marcus Edel <marcus.edel@fu-berlin.de>
This commit is contained in:
jeffin sam
2020-11-02 01:20:34 +05:30
committed by jeffin143
co-authored by Marcus Edel
parent a7a4b43260
commit 2ead759782
+17 -23
View File
@@ -1,12 +1,12 @@
# Mlpack Tests
# mlpack Tests
This directory contains code and data used to test all the algorthims and function implemented in mlpack.
This directory contains code and data used to test all the algorithms and functions implemented in mlpack.
## Test Directories Structure
- *_test.cpp - All the test realted to algorthims
- main_tests/*_test.cpp - All binding realted test
- data - Data needed to run the test
- *_test.cpp - methods tests
- main_tests/*_test.cpp - binding tests
- data - data needed to run the tests
## Add tests
@@ -15,38 +15,32 @@ We have a rich test suite, consisting of almost 2000 test and still counting. So
- Adding new functionality.
- Fixing regressions and bugs.
## Building Test
## Building Tests
To build test you can simply run `make mlpack_test`.
To build the test suite you can simply run `make mlpack_test`.
## To run Test
## To run Tests
We use `Catch2` to write our test and to run the test, you can simply run
We use `Catch2` to write our tests, to run all tests, you can simply run:
` ./bin/mlpack_test`
`./bin/mlpack_test`
Also to run all the test in a particular file you can issue a command as
Also to run all tests in a particular file you can run:
`./bin/mlpack_test "[testname]"`
for example to run all the test which is in `cv_test.cpp` file you can issue a command as
where `testname` is the name of the test suite. For example to run all
collaborative filtering tests implemented in `cv_test.cpp` you can run:
`./bin/mlpack_test "[CVTest]"`
Now similary you can run all the binding related test as
Now similarly you can run all the binding related tests using:
`./bin/mlpack_test "[BindingTests]"`
To run a single test you can explicitly give the name of the test, for example to run
`BinaryClassificationMetricsTest` present in `cv_test.cpp` file you can run the following
command:
To run a single test, you can explicitly provide the name of the test, for example, to run
`BinaryClassificationMetricsTest` implemented in `cv_test.cpp` you can run the following:
`./bin/mlpack_test BinaryClassificationMetricsTest`
Catch2 also allows very other command which you can view using:
`./bin/mlpack_test -h`
Such as to view all the test and realted tags you can issue the following command:
`./bin/mlpack_test -t`
Catch2 provides many other features like filter, checkout the [Catch2 reference section](docs/Readme.md#top) - for more details.