diff options
Diffstat (limited to 'src/settings/test/fonts.cpp')
-rw-r--r-- | src/settings/test/fonts.cpp | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/src/settings/test/fonts.cpp b/src/settings/test/fonts.cpp deleted file mode 100644 index 65cc7229..00000000 --- a/src/settings/test/fonts.cpp +++ /dev/null @@ -1,31 +0,0 @@ -#include "../helpers.hpp" -#include <QFontInfo> -#include <QGuiApplication> -#include <gtest/gtest.h> -#include <vector> - -TEST(Settings, getFont) -{ - const auto serif = getFont(QFont::Serif); - EXPECT_EQ(serif.styleHint(), QFont::Serif) << qUtf8Printable(serif.toString()); - - const auto fixed = getFont(QFont::Monospace); - EXPECT_EQ(fixed.styleHint(), QFont::Monospace) << qUtf8Printable(fixed.toString()); -} - -int main(int argc, char **argv) -{ - ::testing::InitGoogleTest(&argc, argv); - - // handling fonts requires a QGuiApplication - // The proper platform name needs to be added to the argument list before the QGuiApplication constructor is called - // This needs to be done here for gtest_discover_tests to work - QList<char *> args; - for (int i = 0; i < argc; ++i) args.append(argv[i]); - args.append({"-platform", "offscreen"}); - int args_count = args.count(); - - QGuiApplication app(args_count, args.data()); - - return RUN_ALL_TESTS(); -} |