mlpack
Classes | Namespaces | Typedefs | Functions
io_test.cpp File Reference
#include <mlpack/core.hpp>
#include <mlpack/bindings/cli/cli_option.hpp>
#include <mlpack/bindings/cli/third_party/CLI/CLI11.hpp>
#include <mlpack/core/util/param.hpp>
#include <mlpack/bindings/cli/parse_command_line.hpp>
#include <mlpack/bindings/cli/end_program.hpp>
#include "catch.hpp"
Include dependency graph for io_test.cpp:

Classes

struct  IOTestDestroyer
 

Namespaces

 mlpack
 Linear algebra utility functions, generally performed on matrices or vectors.
 

Typedefs

template<typename T >
using mlpack::util::Option = mlpack::bindings::cli::CLIOption< T >
 

Functions

void AddRequiredCLIOptions ()
 Before running a test that uses the CLI options, we have to add the default options that are required for CLI to function, since it will be destroyed at the end of every test that uses CLI in this test suite.
 
 TEST_CASE_METHOD (IOTestDestroyer, "TestCLIAdd", "[IOTest]")
 Tests that CLI works as intended, namely that IO::Add propagates successfully.
 
 TEST_CASE_METHOD (IOTestDestroyer, "TestOption", "[IOTest]")
 Tests that the various PARAM_* macros work properly.
 
 TEST_CASE_METHOD (IOTestDestroyer, "TestDuplicateFlag", "[IOTest]")
 Test that duplicate flags are filtered out correctly.
 
 TEST_CASE_METHOD (IOTestDestroyer, "TestDuplicateParam", "[IOTest]")
 Test that duplicate options throw an exception.
 
 TEST_CASE_METHOD (IOTestDestroyer, "TestBooleanOption", "[IOTest]")
 Ensure that a Boolean option which we define is set correctly.
 
 TEST_CASE_METHOD (IOTestDestroyer, "TestVectorOption", "[IOTest]")
 Test that a vector option works correctly.
 
 TEST_CASE_METHOD (IOTestDestroyer, "TestVectorOption2", "[IOTest]")
 Test that we can use a vector option by specifying it many times.
 
 TEST_CASE_METHOD (IOTestDestroyer, "InputColVectorParamTest", "[IOTest]")
 
 TEST_CASE_METHOD (IOTestDestroyer, "InputUnsignedColVectorParamTest", "[IOTest]")
 
 TEST_CASE_METHOD (IOTestDestroyer, "InputRowVectorParamTest", "[IOTest]")
 
 TEST_CASE_METHOD (IOTestDestroyer, "InputUnsignedRowVectorParamTest", "[IOTest]")
 
 TEST_CASE_METHOD (IOTestDestroyer, "OutputColParamTest", "[IOTest]")
 
 TEST_CASE_METHOD (IOTestDestroyer, "OutputUnsignedColParamTest", "[IOTest]")
 
 TEST_CASE_METHOD (IOTestDestroyer, "OutputRowParamTest", "[IOTest]")
 
 TEST_CASE_METHOD (IOTestDestroyer, "OutputUnsignedRowParamTest", "[IOTest]")
 
 TEST_CASE_METHOD (IOTestDestroyer, "InputMatrixParamTest", "[IOTest]")
 
 TEST_CASE_METHOD (IOTestDestroyer, "RequiredInputMatrixParamTest", "[IOTest]")
 
 TEST_CASE_METHOD (IOTestDestroyer, "RequiredInputMatrixParamAliasTest", "[IOTest]")
 
 TEST_CASE_METHOD (IOTestDestroyer, "RequiredUnspecifiedInputMatrixParamTest", "[IOTest]")
 
 TEST_CASE_METHOD (IOTestDestroyer, "InputMatrixNoTransposeParamTest", "[IOTest]")
 
 TEST_CASE_METHOD (IOTestDestroyer, "OutputMatrixParamTest", "[IOTest]")
 
 TEST_CASE_METHOD (IOTestDestroyer, "OutputMatrixNoTransposeParamTest", "[IOTest]")
 
 TEST_CASE_METHOD (IOTestDestroyer, "IntParamTest", "[IOTest]")
 
 TEST_CASE_METHOD (IOTestDestroyer, "StringParamTest", "[IOTest]")
 
 TEST_CASE_METHOD (IOTestDestroyer, "DoubleParamTest", "[IOTest]")
 
 TEST_CASE_METHOD (IOTestDestroyer, "RequiredOptionTest", "[IOTest]")
 
 TEST_CASE_METHOD (IOTestDestroyer, "UnknownOptionTest", "[IOTest]")
 
 TEST_CASE_METHOD (IOTestDestroyer, "UnmappedParamTest", "[IOTest]")
 Test that GetPrintableParam() works.
 
 TEST_CASE_METHOD (IOTestDestroyer, "IOSerializationTest", "[IOTest]")
 Test that we can serialize a model and then deserialize it through the CLI interface.
 
 TEST_CASE_METHOD (IOTestDestroyer, "RequiredModelTest", "[IOTest]")
 Test that an exception is thrown when a required model is not specified.
 
 TEST_CASE_METHOD (IOTestDestroyer, "MatrixAndDatasetInfoTest", "[IOTest]")
 Test that we can load both a dataset and its associated info.
 
 TEST_CASE_METHOD (IOTestDestroyer, "RawIntegralParameter", "[IOTest]")
 Test that we can access a parameter before we load it.
 
 TEST_CASE_METHOD (IOTestDestroyer, "RawDatasetInfoLoadParameter", "[IOTest]")
 Test that we can load a dataset with a pre-set mapping through IO::GetRawParam().
 
 TEST_CASE_METHOD (IOTestDestroyer, "CppNameTest", "[IOTest]")
 Make sure typenames are properly stored.
 

Detailed Description

Author
Matthew Amidon, Ryan Curtin

Test for the IO input parameter system.

mlpack is free software; you may redistribute it and/or modify it under the terms of the 3-clause BSD license. You should have received a copy of the 3-clause BSD license along with mlpack. If not, see http://www.opensource.org/licenses/BSD-3-Clause for more information.