Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#include "TEST_optionstate.h"
#include "testoptionstate.h"

#include "optionstate.h"

void TEST_optionstate::test_create()
void TestOptionState::test_create()
{
Settings::OptionState options;
QCOMPARE(options.classState.showAtts, false);
Expand All @@ -35,7 +35,7 @@ void TEST_optionstate::test_create()
QCOMPARE(optionsA->uiState.useFillColor, false);
}

void TEST_optionstate::test_saveAndLoad()
void TestOptionState::test_saveAndLoad()
{
Settings::OptionState options;
options.classState.showAtts = true;
Expand All @@ -53,4 +53,4 @@ void TEST_optionstate::test_saveAndLoad()
QCOMPARE(optionsB.uiState.useFillColor, true);
}

QTEST_MAIN(TEST_optionstate)
QTEST_MAIN(TestOptionState)
8 changes: 4 additions & 4 deletions unittests/TEST_optionstate.h → unittests/testoptionstate.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef TEST_OPTIONSTATE_H
#define TEST_OPTIONSTATE_H
#ifndef TESTOPTIONSTATE_H
#define TESTOPTIONSTATE_H

#include "testbase.h"

class TEST_optionstate : public TestBase
class TestOptionState : public TestBase
{
Q_OBJECT

Expand All @@ -32,4 +32,4 @@ private slots:
void test_saveAndLoad();
};

#endif // TEST_OPTIONSTATE_H
#endif // TESTOPTIONSTATE_H
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#include "TEST_pythonwriter.h"
#include "testpythonwriter.h"

// app includes
#include "classifier.h"
Expand All @@ -37,14 +37,14 @@ class PythonWriterTest : public PythonWriter
}
};

void TEST_pythonwriter::test_language()
void TestPythonWriter::test_language()
{
PythonWriter* py = new PythonWriter();
Uml::ProgrammingLanguage::Enum lang = py->language();
QVERIFY(lang == Uml::ProgrammingLanguage::Python);
}

void TEST_pythonwriter::test_writeClass()
void TestPythonWriter::test_writeClass()
{
PythonWriterTest* py = new PythonWriterTest();
UMLClassifier* c = new UMLClassifier("Customer", "12345678");
Expand All @@ -59,7 +59,7 @@ void TEST_pythonwriter::test_writeClass()
QCOMPARE(file.exists(), true);
}

void TEST_pythonwriter::test_reservedKeywords()
void TestPythonWriter::test_reservedKeywords()
{
PythonWriter* py = new PythonWriter();
QStringList list = py->reservedKeywords();
Expand All @@ -69,4 +69,4 @@ void TEST_pythonwriter::test_reservedKeywords()
QCOMPARE(list.last(), QLatin1String("zip"));
}

QTEST_MAIN(TEST_pythonwriter)
QTEST_MAIN(TestPythonWriter)
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef TEST_PYTHONWRITER_H
#define TEST_PYTHONWRITER_H
#ifndef TESTPYTHONWRITER_H
#define TESTPYTHONWRITER_H

#include "testbase.h"

/**
* Unit test for class PythonWriter (pythonwriter.h).
*/
class TEST_pythonwriter: public TestCodeGeneratorBase
class TestPythonWriter: public TestCodeGeneratorBase
{
Q_OBJECT
private slots:
Expand All @@ -35,4 +35,4 @@ private slots:
void test_reservedKeywords();
};

#endif // TEST_PYTHONWRITER_H
#endif // TESTPYTHONWRITER_H
38 changes: 19 additions & 19 deletions unittests/TEST_umlobject.cpp → unittests/testumlobject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#include "TEST_umlobject.h"
#include "testumlobject.h"

// app include
#include "attribute.h"
Expand All @@ -38,7 +38,7 @@ const bool IS_NOT_IMPL = false;

//-----------------------------------------------------------------------------

void TEST_UMLObject::test_copyInto()
void TestUMLObject::test_copyInto()
{
UMLPackage parent("Test Parent");
UMLObject a("Test A");
Expand All @@ -56,7 +56,7 @@ void TEST_UMLObject::test_copyInto()
QCOMPARE(at2.umlParent(), at.umlParent());
}

void TEST_UMLObject::test_clone()
void TestUMLObject::test_clone()
{
UMLPackage parent("Test Parent");
UMLObject a("Test A");
Expand All @@ -65,7 +65,7 @@ void TEST_UMLObject::test_clone()
QCOMPARE(a, b);
}

void TEST_UMLObject::test_doc()
void TestUMLObject::test_doc()
{
UMLPackage parent("Test Parent");
UMLObject a("Test A");
Expand All @@ -75,7 +75,7 @@ void TEST_UMLObject::test_doc()
QCOMPARE(a.doc(), QLatin1String("new doc"));
}

void TEST_UMLObject::test_equal()
void TestUMLObject::test_equal()
{
UMLPackage parent("Test Parent");
UMLObject a("Test A", Uml::ID::Reserved);
Expand All @@ -90,7 +90,7 @@ void TEST_UMLObject::test_equal()
QCOMPARE(c == d, false);
}

void TEST_UMLObject::test_fullyQualifiedName()
void TestUMLObject::test_fullyQualifiedName()
{
UMLObject* a = new UMLObject("Test A");
cleanupOnExit(a);
Expand All @@ -111,26 +111,26 @@ void TEST_UMLObject::test_fullyQualifiedName()
QCOMPARE(a->fullyQualifiedName(QLatin1String("::"), true), QLatin1String("Logical View::Test Parent::Test A"));
}

void TEST_UMLObject::test_isAbstract()
void TestUMLObject::test_isAbstract()
{
UMLObject a("Test A");
QCOMPARE(a.isAbstract(), false);
a.setAbstract(true);
QCOMPARE(a.isAbstract(), true);
}

void TEST_UMLObject::test_isStatic()
void TestUMLObject::test_isStatic()
{
UMLObject a("Test A");
QCOMPARE(a.isStatic(), false);
a.setStatic(true);
QCOMPARE(a.isStatic(), true);
}

class TestUMLObject : public UMLObject
class LocalUMLObject : public UMLObject
{
public:
TestUMLObject(const QString& name = QString(), Uml::ID::Type id = Uml::ID::None)
LocalUMLObject(const QString& name = QString(), Uml::ID::Type id = Uml::ID::None)
: UMLObject(name, id)
{
}
Expand All @@ -141,7 +141,7 @@ class TestUMLObject : public UMLObject
}
};

void TEST_UMLObject::test_resolveRef()
void TestUMLObject::test_resolveRef()
{
UMLPackage parent("Test Parent");
UMLStereotype *stereotype = UMLApp::app()->document()->createStereotype("test");
Expand All @@ -161,7 +161,7 @@ void TEST_UMLObject::test_resolveRef()
QCOMPARE(a.resolveRef(), true);

// unknown stereotype
TestUMLObject b("Test B");
LocalUMLObject b("Test B");
UMLStereotype stereotype2("test");
b.setUMLPackage(&parent);
b.setSecondaryId(Uml::ID::toString(stereotype2.id()));
Expand All @@ -170,7 +170,7 @@ void TEST_UMLObject::test_resolveRef()
QCOMPARE(b.secondary()->name(), QLatin1String("undef"));
}

void TEST_UMLObject::test_saveAndLoad()
void TestUMLObject::test_saveAndLoad()
{
UMLPackage parent("Test Parent");
UMLObject a("Test A");
Expand All @@ -184,23 +184,23 @@ void TEST_UMLObject::test_saveAndLoad()
QCOMPARE(a, b);
}

void TEST_UMLObject::test_setBaseType()
void TestUMLObject::test_setBaseType()
{
UMLObject a("Test A");
QCOMPARE(a.baseType(), UMLObject::ot_UMLObject);
a.setBaseType(UMLObject::ot_Class);
QCOMPARE(a.baseType(), UMLObject::ot_Class);
}

void TEST_UMLObject::test_setSterotype()
void TestUMLObject::test_setSterotype()
{
UMLObject a("Test A");
QCOMPARE(a.stereotype(), QLatin1String(""));
a.setStereotypeCmd(QLatin1String("test"));
QCOMPARE(a.stereotype(), QLatin1String("test"));
}

void TEST_UMLObject::test_setUMLPackage()
void TestUMLObject::test_setUMLPackage()
{
UMLPackage parent("Test Parent");
UMLObject a("Test A");
Expand All @@ -210,7 +210,7 @@ void TEST_UMLObject::test_setUMLPackage()
}


void TEST_UMLObject::test_setVisibility()
void TestUMLObject::test_setVisibility()
{
UMLObject a("Test A");
QVERIFY(a.visibility() == Uml::Visibility::Public);
Expand All @@ -224,10 +224,10 @@ void TEST_UMLObject::test_setVisibility()
QVERIFY(a.visibility() == Uml::Visibility::FromParent);
}

void TEST_UMLObject::test_toString()
void TestUMLObject::test_toString()
{
QCOMPARE(UMLObject::toString(UMLObject::ot_Class), QLatin1String("ot_Class"));
QCOMPARE(UMLObject::toI18nString(UMLObject::ot_Class), i18n("Class &name:"));
}

QTEST_MAIN(TEST_UMLObject)
QTEST_MAIN(TestUMLObject)
8 changes: 4 additions & 4 deletions unittests/TEST_umlobject.h → unittests/testumlobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef TEST_UMLOBJECT_H
#define TEST_UMLOBJECT_H
#ifndef TESTUMLOBJECT_H
#define TESTUMLOBJECT_H

#include "testbase.h"

class TEST_UMLObject : public TestBase
class TestUMLObject : public TestBase
{
Q_OBJECT
private slots:
Expand All @@ -43,4 +43,4 @@ private slots:
void test_toString();
};

#endif // TEST_UMLOBJECT_H
#endif // TESTUMLOBJECT_H
File renamed without changes.