X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libtest%2Fframework.h;h=f6dfc94a4be3ed6a6a18cb1528e03d253231fcc0;hb=af788b4b866ef0220dcdc4c357efbcbdb942cd27;hp=da1d5b9878ed2b28a4ac5451a10050778fe8b440;hpb=cf55f693c7fc7693afbb4594d97d23795cf7f2a0;p=awesomized%2Flibmemcached diff --git a/libtest/framework.h b/libtest/framework.h index da1d5b98..f6dfc94a 100644 --- a/libtest/framework.h +++ b/libtest/framework.h @@ -46,12 +46,22 @@ #include +namespace { class Collection; } +typedef std::vector Suites; + +namespace libtest { + class Framework { public: public: test_return_t create(); + const std::string& name() const + { + return _name; + } + void create(test_callback_create_fn* arg) { _create= arg; @@ -62,10 +72,7 @@ public: _destroy= arg; } - void collections(collection_st* arg) - { - _collections= arg; - } + void collections(collection_st* arg); void set_on_error(test_callback_error_fn *arg) { @@ -100,11 +107,10 @@ public: libtest::Collection& collection(); - Framework(libtest::SignalThread&, const std::string&); - virtual ~Framework(); Framework(libtest::SignalThread&, + const std::string&, const std::string&, const std::string&); @@ -150,11 +156,14 @@ public: return _failed; } + Suites& suites() + { + return _collection; + } + private: Framework& operator=(const Framework&); - collection_st *_collections; - uint32_t _total; uint32_t _success; uint32_t _skipped; @@ -179,8 +188,11 @@ private: bool _socket; void *_creators_ptr; unsigned long int _servers_to_run; - std::vector _collection; + Suites _collection; libtest::SignalThread& _signal; std::string _only_run; std::string _wildcard; + std::string _name; }; + +} // namespace libtest