2025-04-03 01:35:46 +00:00
|
|
|
/*
|
|
|
|
|
* Deskflow -- mouse and keyboard sharing utility
|
|
|
|
|
* SPDX-FileCopyrightText: (C) 2025 Chris Rizzitello <sithlord48@gmail.com>
|
|
|
|
|
* SPDX-FileCopyrightText: (C) 2014 - 2021 Symless Ltd.
|
|
|
|
|
* SPDX-License-Identifier: GPL-2.0-only WITH LicenseRef-OpenSSL-Exception
|
|
|
|
|
*/
|
|
|
|
|
|
2025-08-07 21:26:44 +00:00
|
|
|
#include "BaseExceptionTests.h"
|
2025-04-03 01:35:46 +00:00
|
|
|
|
2025-08-07 21:26:44 +00:00
|
|
|
#include "base/BaseException.h"
|
2025-04-03 01:35:46 +00:00
|
|
|
|
2025-08-07 21:26:44 +00:00
|
|
|
void BaseExceptionTests::empty()
|
2025-04-03 01:35:46 +00:00
|
|
|
{
|
2025-08-07 21:26:44 +00:00
|
|
|
BaseException BaseException;
|
|
|
|
|
const char *result = BaseException.what();
|
2025-04-03 01:35:46 +00:00
|
|
|
|
|
|
|
|
QCOMPARE(result, "");
|
|
|
|
|
}
|
|
|
|
|
|
2025-08-07 21:26:44 +00:00
|
|
|
void BaseExceptionTests::nonEmpty()
|
2025-04-03 01:35:46 +00:00
|
|
|
{
|
2025-08-07 21:26:44 +00:00
|
|
|
BaseException BaseException("test");
|
|
|
|
|
const char *result = BaseException.what();
|
2025-04-03 01:35:46 +00:00
|
|
|
|
|
|
|
|
QCOMPARE(result, "test");
|
|
|
|
|
}
|
|
|
|
|
|
2025-08-07 21:26:44 +00:00
|
|
|
QTEST_MAIN(BaseExceptionTests)
|