summaryrefslogtreecommitdiff
path: root/libvtv/testsuite/parts-test-main.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libvtv/testsuite/parts-test-main.cc')
-rw-r--r--libvtv/testsuite/parts-test-main.cc37
1 files changed, 37 insertions, 0 deletions
diff --git a/libvtv/testsuite/parts-test-main.cc b/libvtv/testsuite/parts-test-main.cc
new file mode 100644
index 00000000000..c90901e7919
--- /dev/null
+++ b/libvtv/testsuite/parts-test-main.cc
@@ -0,0 +1,37 @@
+#include "parts-test-main.h"
+#include "parts-test-extra-parts-views.h"
+
+MainParts::MainParts () {}
+
+MainParts::~MainParts ()
+{
+ for (int i = static_cast<int>(main_extra_parts_.size()) - 1; i >= 0; --i)
+ delete main_extra_parts_[i];
+ main_extra_parts_.clear();
+}
+
+void
+MainParts::AddParts (ExtraParts *parts)
+{
+ main_extra_parts_.push_back (parts);
+}
+
+
+void
+MainParts::PreEarlyInitialization (void)
+{
+ for (int i = 0; i < main_extra_parts_.size(); ++i)
+ main_extra_parts_[i]->PreEarlyInitialization ();
+}
+
+
+int
+main (int argc, char **argv)
+{
+ MainParts *main_parts = new MainParts ();
+
+ main_parts->AddParts (new ExtraPartsViews ());
+ main_parts->PreEarlyInitialization ();
+
+ return 0;
+}