1 #define BOOST_TEST_DYN_LINK
2 #include <boost/test/unit_test.hpp>
8 #include <boost/filesystem.hpp>
15 BOOST_AUTO_TEST_SUITE(EnumeratorPluginTest)
25 auto cp = [&](std::string _filename) {
28 fs::path src =
"tests/unit/App" / filename;
29 BOOST_REQUIRE(fs::exists(src));
32 fs::create_directories(dest);
33 BOOST_REQUIRE(fs::exists(dest));
35 fs::copy_file(src, dest / filename, fs::copy_option::overwrite_if_exists);
36 BOOST_REQUIRE(fs::exists(dest / filename));
46 auto check = [&](std::string str) {
53 check(R"(enum --desc TestEnum)");
55 check(R"(enum --method TestEnum -i '{"supercells": {"max": 4}}')");
61 BOOST_AUTO_TEST_SUITE_END()
Data structure holding basic CASM command info.
int enum_command(const CommandArgs &args)
const DirectoryStructure & dir() const
void check_composition() override
Check "casm composition".
void refresh(bool read_settings=false, bool read_composition=false, bool read_chem_ref=false, bool read_configs=false, bool clear_clex=false)
Reload PrimClex data from settings.
config_iterator config_begin()
Configuration iterator: begin.
config_iterator config_end()
Configuration iterator: end.
fs::path enumerator_plugins() const
Return enumerators plugin dir.
BOOST_AUTO_TEST_CASE(Test1)
fs::path root_dir() const
Return casm project directory path.
PrimClex is the top-level data structure for a CASM project.
bool check(std::string test, const jsonParser &expected, const jsonParser &calculated, fs::path test_cases_path, bool quiet, double tol=0.0)
Check expected JSON vs calculated JSON using BOOST_CHECK_EQUAL.
virtual void check_init()
Check project initialization.