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/TestSkin.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/TestSkin.cpp')
| -rw-r--r-- | sigmod/test/TestSkin.cpp | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/sigmod/test/TestSkin.cpp b/sigmod/test/TestSkin.cpp index 53417bb0..34536cc1 100644 --- a/sigmod/test/TestSkin.cpp +++ b/sigmod/test/TestSkin.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,20 +19,23 @@ #include "TestSkin.h" // Sigmod includes -#include "../Sigmod.h" +#include "../Game.h" #include "../Skin.h" // Qt includes #include <QtCore/QFile> #include <QtTest/QTest> +using namespace Sigcore; +using namespace Sigmod; + void TestSkin::initTestCase() { TestSigmodObject::initTestCase(); - m_skin1 = m_sigmod->newSkin(); - m_skin2 = m_sigmod->newSkin(); - m_skin3 = m_sigmod->newSkin(); + m_skin1 = m_game->newSkin(); + m_skin2 = m_game->newSkin(); + m_skin3 = m_game->newSkin(); } void TestSkin::cleanupTestCase() @@ -74,7 +77,7 @@ void TestSkin::validation() void TestSkin::saving() { - QDomDocument xml = Sigmod::Object::xml(m_skin1); + QDomDocument xml = Object::xml(m_skin1); QFile file("skin.xml"); QVERIFY(file.open(QIODevice::WriteOnly)); @@ -88,14 +91,14 @@ void TestSkin::loading() QFile file("skin.xml"); m_skin1->setName("Bar"); - m_skin1->setScript(Sigcore::Script("python", "import os")); + m_skin1->setScript(Script("python", "import os")); QVERIFY(file.open(QIODevice::ReadOnly)); QVERIFY(xml.setContent(&file)); m_skin1->load(xml.firstChildElement("Skin")); QCOMPARE(m_skin1->name(), QString("Foo")); - QCOMPARE(m_skin1->script(), Sigcore::Script()); + QCOMPARE(m_skin1->script(), Script()); } void TestSkin::setName() @@ -113,10 +116,10 @@ void TestSkin::setName() void TestSkin::setScript() { - m_skin2->setScript(Sigcore::Script("python", "import os")); - m_skin2->setScript(Sigcore::Script("python", "import os")); + m_skin2->setScript(Script("python", "import os")); + m_skin2->setScript(Script("python", "import os")); - QCOMPARE(m_skin2->script(), Sigcore::Script("python", "import os")); + QCOMPARE(m_skin2->script(), Script("python", "import os")); QCOMPARE(m_changedCount, 1); @@ -129,7 +132,7 @@ void TestSkin::assignment() *m_skin3 = *m_skin2; QCOMPARE(m_skin3->name(), QString("Foo")); - QCOMPARE(m_skin3->script(), Sigcore::Script("python", "import os")); + QCOMPARE(m_skin3->script(), Script("python", "import os")); } QTEST_APPLESS_MAIN(TestSkin) |
