~nick-dedekind/unity8/StrFTimeFormatter

« back to all changes in this revision

Viewing changes to tests/plugins/Ubuntu/Gestures/tst_AxisVelocityCalculator.cpp

  • Committer: Nick Dedekind
  • Date: 2013-12-10 14:22:43 UTC
  • mfrom: (464.1.117 unity8)
  • Revision ID: nicholas.dedekind@gmail.com-20131210142243-wsshu2dovlmzviqz
merged with trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
54
54
 
55
55
private:
56
56
    AxisVelocityCalculator *velCalc;
57
 
    FakeTimeSource *fakeTimeSource;
 
57
    QSharedPointer<FakeTimeSource> fakeTimeSource;
58
58
};
59
59
 
60
60
void tst_AxisVelocityCalculator::init()
61
61
{
62
 
    fakeTimeSource = new FakeTimeSource;
 
62
    fakeTimeSource.reset(new FakeTimeSource);
63
63
 
64
64
    velCalc = new AxisVelocityCalculator;
65
65
    velCalc->setTimeSource(fakeTimeSource);
68
68
void tst_AxisVelocityCalculator::cleanup()
69
69
{
70
70
    delete velCalc;
71
 
    delete fakeTimeSource;
 
71
    fakeTimeSource.reset();
72
72
}
73
73
 
74
74
void tst_AxisVelocityCalculator::simpleSamples()