libzypp  17.38.17
LoadTestcase.h
Go to the documentation of this file.
1 /*---------------------------------------------------------------------\
2 | ____ _ __ __ ___ |
3 | |__ / \ / / . \ . \ |
4 | / / \ V /| _/ _/ |
5 | / /__ | | | | | | |
6 | /_____||_| |_| |_| |
7 | |
8 \---------------------------------------------------------------------*/
12 #ifndef ZYPP_MISC_LOADTESTCASE_H
13 #define ZYPP_MISC_LOADTESTCASE_H
14 
15 #include <zypp-core/Pathname.h>
16 #include <zypp-core/Url.h>
17 #include <zypp-core/Globals.h>
21 
22 #include <optional>
23 #include <memory>
24 #include <string>
25 #include <vector>
26 
27 namespace zypp::misc::testcase {
28 
30  {
31  struct Node {
32  struct Impl;
33 
34  Node();
35  ~Node();
36  const std::string &name () const;
37  std::string &name ();
38  const std::string &value () const;
39  std::string &value ();
40 
41  const std::string &getProp( const std::string &name, const std::string &def = std::string() ) const;
42  const std::map<std::string, std::string> &properties() const;
43  std::map<std::string, std::string> &properties();
44  const std::vector<std::shared_ptr<Node>> &children() const;
45  std::vector<std::shared_ptr<Node>> &children();
46 
47  private:
49 
50  };
51 
52  TestcaseTrial();
53  ~TestcaseTrial();
54  const std::vector<Node> &nodes () const;
55  std::vector<Node> &nodes ();
56  private:
57  struct Impl;
59  };
60 
62  {
63  public:
64  struct Impl;
65  using TestcaseTrials = std::vector<TestcaseTrial>;
66 
67  enum Type {
70  Yaml
71  };
72 
73  LoadTestcase();
74  ~LoadTestcase();
75 
76  bool loadTestcaseAt ( const zypp::Pathname &path, std::string *err );
77  static Type testcaseTypeAt ( const zypp::Pathname &path );
78 
79  const TestcaseSetup &setupInfo() const;
80  const TestcaseTrials &trialInfo() const;
81 
82  private:
83  std::unique_ptr<Impl> _pimpl;
84  };
85 
86 }
87 
88 
89 #endif // ZYPP_MISC_LOADTESTCASE_H
Provides API related macros.
#define ZYPP_API_DEPTESTOMATIC
Definition: Globals.h:82
RWCOW_pointer< Impl > _pimpl
Definition: LoadTestcase.h:57
std::unique_ptr< Impl > _pimpl
Definition: LoadTestcase.h:83
std::vector< TestcaseTrial > TestcaseTrials
Definition: LoadTestcase.h:65
boost::noncopyable NonCopyable
Ensure derived classes cannot be copied.
Definition: NonCopyable.h:26