gcc/libvtv/testsuite/libvtv.cc/parts-test-main.cpp
Caroline Tice 41e96dc8f0 Update libvtv testsuite so that most of the tests now run under
the dejagnu test harness.

From-SVN: r202373
2013-09-08 16:35:14 -07:00

40 lines
720 B
C++

// { dg-do run }
#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;
}