diff options
| author | Ben Boeckel <MathStuf@gmail.com> | 2009-02-24 15:53:15 -0500 |
|---|---|---|
| committer | Ben Boeckel <MathStuf@gmail.com> | 2009-02-24 15:53:15 -0500 |
| commit | dde935e48d44ca1b2b8ce993ae5bc187a8ca30fd (patch) | |
| tree | f317e6de1e2f2a187221a3f4586a2d00ab174237 /sigmod/test/TestWeather.cpp | |
| parent | b3082840638dc89d48e621a0bf88f7887163ee08 (diff) | |
| download | sigen-dde935e48d44ca1b2b8ce993ae5bc187a8ca30fd.tar.gz sigen-dde935e48d44ca1b2b8ce993ae5bc187a8ca30fd.tar.xz sigen-dde935e48d44ca1b2b8ce993ae5bc187a8ca30fd.zip | |
Fixed sigmod tests to also use namespace Sigmod
Diffstat (limited to 'sigmod/test/TestWeather.cpp')
| -rw-r--r-- | sigmod/test/TestWeather.cpp | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/sigmod/test/TestWeather.cpp b/sigmod/test/TestWeather.cpp index 915c65ec..40680b5e 100644 --- a/sigmod/test/TestWeather.cpp +++ b/sigmod/test/TestWeather.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2008 Ben Boeckel <MathStuf@gmail.com> + * Copyright 2008-2009 Ben Boeckel <MathStuf@gmail.com> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -19,22 +19,23 @@ #include "TestWeather.h" // Sigmod includes -#include "../Sigmod.h" +#include "../Game.h" #include "../Weather.h" // Qt includes #include <QtCore/QFile> #include <QtTest/QTest> -#include <QtCore/QtDebug> +using namespace Sigcore; +using namespace Sigmod; void TestWeather::initTestCase() { TestSigmodObject::initTestCase(); - m_weather1 = m_sigmod->newWeather(); - m_weather2 = m_sigmod->newWeather(); - m_weather3 = m_sigmod->newWeather(); + m_weather1 = m_game->newWeather(); + m_weather2 = m_game->newWeather(); + m_weather3 = m_game->newWeather(); } void TestWeather::cleanupTestCase() @@ -76,7 +77,7 @@ void TestWeather::validation() void TestWeather::saving() { - QDomDocument xml = Sigmod::Object::xml(m_weather1); + QDomDocument xml = Object::xml(m_weather1); QFile file("weather.xml"); QVERIFY(file.open(QIODevice::WriteOnly)); @@ -90,14 +91,14 @@ void TestWeather::loading() QFile file("weather.xml"); m_weather1->setName("Bar"); - m_weather1->setScript(Sigcore::Script("python", "import os")); + m_weather1->setScript(Script("python", "import os")); QVERIFY(file.open(QIODevice::ReadOnly)); QVERIFY(xml.setContent(&file)); m_weather1->load(xml.firstChildElement("Weather")); QCOMPARE(m_weather1->name(), QString("Foo")); - QCOMPARE(m_weather1->script(), Sigcore::Script()); + QCOMPARE(m_weather1->script(), Script()); } void TestWeather::setName() @@ -115,10 +116,10 @@ void TestWeather::setName() void TestWeather::setScript() { - m_weather2->setScript(Sigcore::Script("python", "import os")); - m_weather2->setScript(Sigcore::Script("python", "import os")); + m_weather2->setScript(Script("python", "import os")); + m_weather2->setScript(Script("python", "import os")); - QCOMPARE(m_weather2->script(), Sigcore::Script("python", "import os")); + QCOMPARE(m_weather2->script(), Script("python", "import os")); QCOMPARE(m_changedCount, 1); @@ -131,7 +132,7 @@ void TestWeather::assignment() *m_weather3 = *m_weather2; QCOMPARE(m_weather3->name(), QString("Foo")); - QCOMPARE(m_weather3->script(), Sigcore::Script("python", "import os")); + QCOMPARE(m_weather3->script(), Script("python", "import os")); } QTEST_APPLESS_MAIN(TestWeather) |
