~samuel-thibault/compiz/clone

« back to all changes in this revision

Viewing changes to src/pluginclasshandler/tests/test-pluginclasshandler.cpp

  • Committer: Daniel van Vugt
  • Date: 2012-01-12 06:48:58 UTC
  • mfrom: (2908 compiz-core)
  • mto: (2908.6.2 trunk)
  • mto: This revision was merged to the branch mainline in revision 2916.
  • Revision ID: vanvugt@gmail.com-20120112064858-xcu22jq1dlerirmp
Merge with upstream changes (lp:compiz-core).

Show diffs side-by-side

added added

removed removed

Lines of Context:
60
60
{
61
61
}
62
62
 
63
 
CompizPCHTest::CompizPCHTest (Global *g) :
64
 
    global (g)
 
63
CompizPCHTest::CompizPCHTest () :
 
64
    global (new Global())
65
65
{
66
66
    ValueHolder::SetDefault (static_cast<ValueHolder *> (global));
 
67
    gTest = this;
67
68
}
68
69
 
69
70
CompizPCHTest::~CompizPCHTest ()
70
71
{
71
72
    delete global;
72
73
}
73
 
 
74
 
int
75
 
main (int argc, char **argv)
76
 
{
77
 
    programName = argv[0];
78
 
 
79
 
    gTest = static_cast <CompizPCHTest *> (new OBJECT (new Global ()));
80
 
    gTest->run ();
81
 
 
82
 
    while (gTest->plugins.size ())
83
 
    {
84
 
        Plugin *p = gTest->plugins.front ();
85
 
        gTest->plugins.pop_front ();
86
 
 
87
 
        delete p;
88
 
    }
89
 
 
90
 
    while (gTest->bases.size ())
91
 
    {
92
 
        Base *b = gTest->bases.front ();
93
 
        gTest->bases.pop_front ();
94
 
 
95
 
        delete b;
96
 
    }
97
 
 
98
 
    delete gTest;
99
 
    
100
 
    return 0;
101
 
}