|
ppforest2 v0.1.0
Projection Pursuit Decision Trees and Random Forests
|
Shared utilities for CLI integration tests. More...
#include <gtest/gtest.h>#include "io/TempFile.hpp"#include <cstdio>#include <cstdlib>#include <fstream>#include <string>#include <sstream>#include <filesystem>#include <nlohmann/json.hpp>Go to the source code of this file.
Classes | |
| struct | ProcessResult |
| Captured output of a child-process invocation. More... | |
| class | SavedModelTest |
| Test fixture that trains a forest model once in SetUp(). More... | |
| class | TempDir |
| RAII temporary directory with automatic cleanup. More... | |
| class | TempFile |
| RAII temporary file with automatic cleanup. More... | |
Typedefs | |
| using | json = nlohmann::json |
Functions | |
| ProcessResult | run_ppforest2 (std::string const &args) |
| Spawn the ppforest2 binary with the given argument string. | |
Variables | |
| const std::string | BINARY = PPFOREST2_BINARY_PATH |
| std::string const | CRAB_CSV = DATA_DIR + "/crab.csv" |
| std::string const | DATA_DIR = PPFOREST2_DATA_DIR |
| std::string const | GLASS_CSV = DATA_DIR + "/glass.csv" |
| std::string const | GOLDEN_DIR = PPFOREST2_GOLDEN_DIR |
| std::string const | IRIS_CSV = DATA_DIR + "/iris.csv" |
| std::string const | WINE_CSV = DATA_DIR + "/wine.csv" |
Shared utilities for CLI integration tests.
Each test spawns the ppforest2 binary as a child process and checks its exit code and stdout output. Temporary files (TempFile, TempDir) are used for model and output artifacts; they are automatically cleaned up.
| using json = nlohmann::json |
|
inline |
Spawn the ppforest2 binary with the given argument string.
Stderr is redirected to /dev/null (NUL on Windows) so only stdout is captured. The exit code is extracted via WEXITSTATUS on POSIX.
| args | Space-separated argument string appended to the binary path. |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |