mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 14:55:36 +08:00
40 lines
1018 B
C++
40 lines
1018 B
C++
// SPDX-FileCopyrightText: Copyright (C) 2015 swift Project Community / Contributors
|
|
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
|
|
|
|
//! \cond PRIVATE_TESTS
|
|
//! \file
|
|
//! \ingroup testswiftgui
|
|
|
|
#include "test.h"
|
|
|
|
#include "gui/guiutility.h"
|
|
|
|
using namespace swift::gui;
|
|
|
|
namespace SwiftGuiTest
|
|
{
|
|
//! Test GUI utilities
|
|
class CTestGuiUtility : public QObject
|
|
{
|
|
Q_OBJECT
|
|
|
|
private slots:
|
|
//! Test the lenientTitleComparison
|
|
void testLenientTitleComparison();
|
|
};
|
|
|
|
void CTestGuiUtility::testLenientTitleComparison()
|
|
{
|
|
QVERIFY2(CGuiUtility::lenientTitleComparison("foo", "foo"), "wrong title match");
|
|
QVERIFY2(CGuiUtility::lenientTitleComparison("foo&", "&Foo"), "wrong title match");
|
|
QVERIFY2(!CGuiUtility::lenientTitleComparison("foo", "bar"), "wrong title mismatch");
|
|
}
|
|
} // namespace SwiftGuiTest
|
|
|
|
//! main
|
|
SWIFTTEST_APPLESS_MAIN(SwiftGuiTest::CTestGuiUtility);
|
|
|
|
#include "testguiutility.moc"
|
|
|
|
//! \endcond
|