Skip to content

Commit

Permalink
Rename this test
Browse files Browse the repository at this point in the history
Because the Ninja people, in their infinite meddlesomeness have
decided that you shouldn't have two unittests with the same name
in a body of code (ninja-build/ninja#931)
we need to rename one of these tests to something else. Whatever.
  • Loading branch information
hallarempt committed Mar 9, 2019
1 parent d2edbba commit e9b99ee
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
12 changes: 6 additions & 6 deletions libs/pigment/tests/TestKoColorSpaceRegistry.cpp
Expand Up @@ -25,35 +25,35 @@
#include <KoColorModelStandardIds.h>
#include <KoColorProfile.h>

TestColorSpaceRegistry::TestColorSpaceRegistry()
TestBaseColorSpaceRegistry::TestBaseColorSpaceRegistry()
{
}

void TestColorSpaceRegistry::testLab16()
void TestBaseColorSpaceRegistry::testLab16()
{
const KoColorSpace* cs = KoColorSpaceRegistry::instance()->lab16();
QCOMPARE(cs->colorModelId().id(), LABAColorModelID.id());
QCOMPARE(cs->colorDepthId().id(), Integer16BitsColorDepthID.id());
QVERIFY(*cs == *KoColorSpaceRegistry::instance()->colorSpace(LABAColorModelID.id(), Integer16BitsColorDepthID.id(), 0));
}

void TestColorSpaceRegistry::testRgb8()
void TestBaseColorSpaceRegistry::testRgb8()
{
const KoColorSpace* cs = KoColorSpaceRegistry::instance()->rgb8();
QCOMPARE(cs->colorModelId().id(), RGBAColorModelID.id());
QCOMPARE(cs->colorDepthId().id(), Integer8BitsColorDepthID.id());
QVERIFY(*cs == *KoColorSpaceRegistry::instance()->colorSpace(RGBAColorModelID.id(), Integer8BitsColorDepthID.id(), 0));
}

void TestColorSpaceRegistry::testRgb16()
void TestBaseColorSpaceRegistry::testRgb16()
{
const KoColorSpace* cs = KoColorSpaceRegistry::instance()->rgb16();
QCOMPARE(cs->colorModelId().id(), RGBAColorModelID.id());
QCOMPARE(cs->colorDepthId().id(), Integer16BitsColorDepthID.id());
QVERIFY(*cs == *KoColorSpaceRegistry::instance()->colorSpace(RGBAColorModelID.id(), Integer16BitsColorDepthID.id(), 0));
}

void TestColorSpaceRegistry::testProfileByUniqueId()
void TestBaseColorSpaceRegistry::testProfileByUniqueId()
{
const KoColorSpace* cs = KoColorSpaceRegistry::instance()->rgb16();
const KoColorProfile *profile = cs->profile();
Expand All @@ -65,4 +65,4 @@ void TestColorSpaceRegistry::testProfileByUniqueId()
QCOMPARE(*fetchedProfile, *profile);
}

QTEST_GUILESS_MAIN(TestColorSpaceRegistry)
QTEST_GUILESS_MAIN(TestBaseColorSpaceRegistry)
2 changes: 1 addition & 1 deletion plugins/color/lcms2engine/tests/CMakeLists.txt
Expand Up @@ -26,7 +26,7 @@ endif()

ecm_add_tests(
TestKoLcmsColorProfile.cpp
TestKoColorSpaceRegistry.cpp
TestColorSpaceRegistry.cpp
TestLcmsRGBP2020PQColorSpace.cpp
NAME_PREFIX "plugins-lcmsengine-"
LINK_LIBRARIES kritawidgets kritapigment KF5::I18n Qt5::Test ${LCMS2_LIBRARIES})
@@ -1,5 +1,5 @@

#include "TestKoColorSpaceRegistry.h"
#include "TestColorSpaceRegistry.h"

#include <QTest>

Expand All @@ -11,13 +11,13 @@

#include "sdk/tests/kistest.h"

void TestKoColorSpaceRegistry::testConstruction()
void TestColorSpaceRegistry::testConstruction()
{
KoColorSpaceRegistry *instance = KoColorSpaceRegistry::instance();
Q_ASSERT(instance);
}

void TestKoColorSpaceRegistry::testRgbU8()
void TestColorSpaceRegistry::testRgbU8()
{
const QString colorSpaceId = KoColorSpaceRegistry::instance()->colorSpaceId(RGBAColorModelID,
Integer8BitsColorDepthID);
Expand All @@ -39,7 +39,7 @@ void TestKoColorSpaceRegistry::testRgbU8()

}

void TestKoColorSpaceRegistry::testRgbU16()
void TestColorSpaceRegistry::testRgbU16()
{
const QString colorSpaceId = KoColorSpaceRegistry::instance()->colorSpaceId(RGBAColorModelID,
Integer16BitsColorDepthID);
Expand All @@ -61,7 +61,7 @@ void TestKoColorSpaceRegistry::testRgbU16()

}

void TestKoColorSpaceRegistry::testLab()
void TestColorSpaceRegistry::testLab()
{
const QString colorSpaceId = KoColorSpaceRegistry::instance()->colorSpaceId(LABAColorModelID,
Integer16BitsColorDepthID);
Expand All @@ -88,4 +88,4 @@ void TestKoColorSpaceRegistry::testLab()

}

KISTEST_MAIN(TestKoColorSpaceRegistry)
KISTEST_MAIN(TestColorSpaceRegistry)
Expand Up @@ -3,7 +3,7 @@

#include <QObject>

class TestKoColorSpaceRegistry : public QObject
class TestColorSpaceRegistry : public QObject
{
Q_OBJECT
private Q_SLOTS:
Expand Down

0 comments on commit e9b99ee

Please sign in to comment.