root/library/tests/test_util.h @ 425

Revision 425, 0.9 kB (checked in by vbarta, 15 years ago)

moved logger test to testsuite, updated logger docs (a bit)

Line 
1/*!
2  \file
3  \brief Utility functions for BDM unit tests.
4  \author Vaclav Barta.
5
6  -----------------------------------
7  BDM++ - C++ library for Bayesian Decision Making under Uncertainty
8
9  Using IT++ for numerical operations
10  -----------------------------------
11*/
12
13#ifndef TEST_UTIL_H
14#define TEST_UTIL_H
15
16#include <string>
17
18namespace bdm {
19
20/*! \brief Non-general but simple file load.
21
22  Handles only files smaller than 8KB which do not contain '\0'
23  characters, but for testing that should be enough.
24*/
25std::string load_test_file(const char *fname);
26
27/*! \brief Recursively removes directories and files.
28
29  path is the name (absolute or relative) of the file or directory to
30  be removed (must not be empty). Returns true on success, false when
31  path couldn't be removed because it didn't exist, throws an
32  exception otherwise.
33*/
34bool remove_all(const char *path);
35
36}
37
38#endif
Note: See TracBrowser for help on using the browser.