QMCPACK
test_VMCDriverInput.cpp
Go to the documentation of this file.
1 //////////////////////////////////////////////////////////////////////////////////////
2 // This file is distributed under the University of Illinois/NCSA Open Source License.
3 // See LICENSE file in top directory for details.
4 //
5 // Copyright (c) 2019 QMCPACK developers.
6 //
7 // File developed by: Peter Doak, doakpw@ornl.gov, Oak Ridge National Laboratory
8 //
9 // File created by: Peter Doak, doakpw@ornl.gov, Oak Ridge National Laboratory
10 //////////////////////////////////////////////////////////////////////////////////////
11 
12 
13 #include "catch.hpp"
14 
17 #include "OhmmsData/Libxml2Doc.h"
18 
19 namespace qmcplusplus
20 {
21 TEST_CASE("VMCDriverInput readXML", "[drivers]")
22 {
23  auto xml_test = [](const char* driver_xml) {
25  bool okay = doc.parseFromString(driver_xml);
26  REQUIRE(okay);
27  xmlNodePtr node = doc.getRoot();
28  VMCDriverInput vmcdriver_input;
29  vmcdriver_input.readXML(node);
30  REQUIRE(vmcdriver_input.get_use_drift() == false);
31  };
32 
34  testing::valid_vmc_input_sections.end(), xml_test);
35 }
36 
37 
38 } // namespace qmcplusplus
class that handles xmlDoc
Definition: Libxml2Doc.h:76
helper functions for EinsplineSetBuilder
Definition: Configuration.h:43
if(!okay) throw std xmlNodePtr node
Input representation for VMC driver class runtime parameters.
TEST_CASE("complex_helper", "[type_traits]")
xmlNodePtr getRoot()
Definition: Libxml2Doc.h:88
constexpr int valid_vmc_input_vmc_batch_index
void readXML(xmlNodePtr xml_input)
REQUIRE(std::filesystem::exists(filename))
constexpr std::array< const char *, 4 > valid_vmc_input_sections
bool parseFromString(const std::string_view data)
Definition: Libxml2Doc.cpp:204
avoids many repeated xml heredoc sections