16 static const std::streamsize
max_length = std::numeric_limits<std::streamsize>::max();
38 void print_results(
unsigned long nfailed,
unsigned long ntests);
68 std::string
trim(
const std::string & s);
75 std::vector<std::string>
split(
const std::string & s,
char sep =
' ');
88 bool file_skip(std::istream & fs,
char commentchar);
bool file_skip(std::istream &fs, char commentchar)
Advances the stream past any comment and blank lines.
Definition: test_common.cpp:170
bool almost_equal(double a, double b, double tol)
Compare two double-precision numbers for equality within a tolerance.
Definition: test_common.cpp:64
void print_results(unsigned long nfailed, unsigned long ntests)
Print the results of a test.
Definition: test_common.cpp:84
std::string str_tolower(const std::string &s)
Converts a string to lower case, returning a copy.
Definition: test_common.cpp:123
static const std::streamsize max_length
Maximum length of a line.
Definition: test_common.hpp:16
int element_to_z(const std::string &element)
Convert a string representing an element to its atomic Z number.
Definition: test_common.cpp:109
int amchar_to_int(char am)
Convert a character representing an angular momentum to an integer.
Definition: test_common.cpp:94
std::string trim(const std::string &s)
Trims spaces and tabs from both ends of a string, returning a copy.
Definition: test_common.cpp:132
std::vector< std::string > split(const std::string &s, char sep)
Splits a string into components.
Definition: test_common.cpp:146