#pragma once
+#include <libtest/formatter.hpp>
+
+#include <libtest/timer.hpp>
+
+namespace { class Framework; }
+
+
/**
A structure which describes a collection of test cases.
*/
struct test_st *tests;
};
+namespace libtest {
+
+class Collection {
+public:
+ Collection(libtest::Framework*, collection_st*);
+
+ test_return_t exec();
+
+ const char* name()
+ {
+ return _name.c_str();
+ }
+
+ uint32_t success()
+ {
+ return _success;
+ }
+
+ uint32_t skipped()
+ {
+ return _skipped;
+ }
+
+ uint32_t failed()
+ {
+ return _failed;
+ }
+
+ uint32_t total()
+ {
+ return _total;
+ }
+
+ libtest::Formatter* formatter()
+ {
+ return &_formatter;
+ }
+
+private:
+ std::string _name;
+ test_callback_fn *_pre;
+ test_callback_fn *_post;
+ struct test_st *_tests;
+ libtest::Framework* _frame;
+ uint32_t _success;
+ uint32_t _skipped;
+ uint32_t _failed;
+ uint32_t _total;
+ libtest::Timer _timer;
+ libtest::Formatter _formatter;
+
+private:
+ Collection( const Collection& );
+ const Collection& operator=( const Collection& );
+};
+} // namespace libtest