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 
15 #include "QMCDrivers/VMC/VMCDriverInput.h"
16 #include "QMCDrivers/tests/ValidQMCInputSections.h"
17 #include "OhmmsData/Libxml2Doc.h"
18 
19 namespace qmcplusplus
20 {
21 TEST_CASE("VMCDriverInput readXML", "[drivers]")
22 {
__anon482547990102(const char* driver_xml) 23   auto xml_test = [](const char* driver_xml) {
24     Libxml2Document doc;
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 
33   std::for_each(testing::valid_vmc_input_sections.begin() + testing::valid_vmc_input_vmc_batch_index,
34                 testing::valid_vmc_input_sections.end(), xml_test);
35 }
36 
37 
38 } // namespace qmcplusplus
39