summaryrefslogtreecommitdiffstats
path: root/sigmod/test/TestTile.cpp
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2009-02-24 15:53:15 -0500
committerBen Boeckel <MathStuf@gmail.com>2009-02-24 15:53:15 -0500
commitdde935e48d44ca1b2b8ce993ae5bc187a8ca30fd (patch)
treef317e6de1e2f2a187221a3f4586a2d00ab174237 /sigmod/test/TestTile.cpp
parentb3082840638dc89d48e621a0bf88f7887163ee08 (diff)
downloadsigen-dde935e48d44ca1b2b8ce993ae5bc187a8ca30fd.tar.gz
sigen-dde935e48d44ca1b2b8ce993ae5bc187a8ca30fd.tar.xz
sigen-dde935e48d44ca1b2b8ce993ae5bc187a8ca30fd.zip
Fixed sigmod tests to also use namespace Sigmod
Diffstat (limited to 'sigmod/test/TestTile.cpp')
-rw-r--r--sigmod/test/TestTile.cpp27
1 files changed, 15 insertions, 12 deletions
diff --git a/sigmod/test/TestTile.cpp b/sigmod/test/TestTile.cpp
index 3a90e014..bf5f57c6 100644
--- a/sigmod/test/TestTile.cpp
+++ b/sigmod/test/TestTile.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 "TestTile.h"
// Sigmod includes
-#include "../Sigmod.h"
+#include "../Game.h"
#include "../Tile.h"
// Qt includes
#include <QtCore/QFile>
#include <QtTest/QTest>
+using namespace Sigcore;
+using namespace Sigmod;
+
void TestTile::initTestCase()
{
TestSigmodObject::initTestCase();
- m_tile1 = m_sigmod->newTile();
- m_tile2 = m_sigmod->newTile();
- m_tile3 = m_sigmod->newTile();
+ m_tile1 = m_game->newTile();
+ m_tile2 = m_game->newTile();
+ m_tile3 = m_game->newTile();
}
void TestTile::cleanupTestCase()
@@ -74,7 +77,7 @@ void TestTile::validation()
void TestTile::saving()
{
- QDomDocument xml = Sigmod::Object::xml(m_tile1);
+ QDomDocument xml = Object::xml(m_tile1);
QFile file("tile.xml");
QVERIFY(file.open(QIODevice::WriteOnly));
@@ -89,7 +92,7 @@ void TestTile::loading()
m_tile1->setName("Bar");
m_tile1->setWalkable(false);
- m_tile1->setScript(Sigcore::Script("python", "import os"));
+ m_tile1->setScript(Script("python", "import os"));
QVERIFY(file.open(QIODevice::ReadOnly));
QVERIFY(xml.setContent(&file));
@@ -97,7 +100,7 @@ void TestTile::loading()
QCOMPARE(m_tile1->name(), QString("Foo"));
QCOMPARE(m_tile1->walkable(), true);
- QCOMPARE(m_tile1->script(), Sigcore::Script());
+ QCOMPARE(m_tile1->script(), Script());
}
void TestTile::setName()
@@ -128,10 +131,10 @@ void TestTile::setWalkable()
void TestTile::setScript()
{
- m_tile2->setScript(Sigcore::Script("python", "import os"));
- m_tile2->setScript(Sigcore::Script("python", "import os"));
+ m_tile2->setScript(Script("python", "import os"));
+ m_tile2->setScript(Script("python", "import os"));
- QCOMPARE(m_tile2->script(), Sigcore::Script("python", "import os"));
+ QCOMPARE(m_tile2->script(), Script("python", "import os"));
QCOMPARE(m_changedCount, 1);
@@ -145,7 +148,7 @@ void TestTile::assignment()
QCOMPARE(m_tile3->name(), QString("Foo"));
QCOMPARE(m_tile3->walkable(), false);
- QCOMPARE(m_tile3->script(), Sigcore::Script("python", "import os"));
+ QCOMPARE(m_tile3->script(), Script("python", "import os"));
}
QTEST_APPLESS_MAIN(TestTile)