Files
mlpack/src/mlpack/tests
..
2020-11-15 22:07:17 +05:30
2020-08-02 01:48:59 +05:30
2021-02-12 06:47:45 +05:30
2020-11-14 23:45:19 +05:30
2021-01-01 10:20:18 +00:00
2020-09-30 00:14:47 +05:30
2020-05-13 10:46:38 -04:00
2021-01-02 10:23:46 +05:30
2020-09-22 08:36:30 +05:30
2020-10-21 11:49:07 +05:30
2020-10-14 17:35:56 +02:00
2020-12-07 10:54:20 -05:00
2020-10-21 11:49:07 +05:30
2020-10-21 11:49:07 +05:30
2020-11-01 03:58:04 +05:30
2021-01-24 17:21:07 -05:00
2020-10-20 15:29:31 +05:30
2020-10-07 15:39:38 +05:30
2020-11-01 03:58:04 +05:30
2020-11-01 14:55:44 +01:00
2020-10-21 11:49:07 +05:30
2021-02-02 19:40:34 +05:30
2020-05-13 10:46:38 -04:00
2021-01-21 18:53:50 -05:00
2020-10-21 11:49:07 +05:30
2021-01-05 18:43:50 +05:30
2020-08-28 01:46:19 +05:30
2020-10-21 11:49:07 +05:30
2020-11-01 03:58:04 +05:30
2020-09-05 22:50:47 -04:00
2020-12-18 19:06:18 +05:30
2020-07-21 00:29:18 +05:30
2020-08-26 01:16:55 +05:30
2020-12-04 16:04:58 +05:30
2020-10-21 11:49:07 +05:30
2020-05-13 10:46:38 -04:00
2020-10-21 11:49:07 +05:30
2020-10-21 11:49:07 +05:30

mlpack Tests

This directory contains code and data used to test all the algorithms and functions implemented in mlpack.

Test Directories Structure

  • *_test.cpp - methods tests
  • main_tests/*_test.cpp - binding tests
  • data - data needed to run the tests

Add tests

We have a rich test suite, consisting of almost 2000 tests (and still counting). It is suggested to add tests when:

  • Adding new functionality.
  • Fixing regressions and bugs.

Building Tests

To build the test suite you can simply run make mlpack_test.

To run Tests

We use Catch2 to write our tests. To run all tests, you can simply run:

./bin/mlpack_test

To run all tests in a particular file you can run:

./bin/mlpack_test "[testname]"

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 similarly you can run all the binding related tests using:

./bin/mlpack_test "[BindingTests]"

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 provides many other features like filter, checkout the Catch2 reference section - for more details.