From e49fb74847f93ce0dcc570e419b6af749e6dbc3d Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Fri, 21 Feb 2020 17:58:55 +0100 Subject: [PATCH] [libcalamares] Fix more tests --- src/libcalamares/locale/Tests.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/libcalamares/locale/Tests.cpp b/src/libcalamares/locale/Tests.cpp index b63eb9e18..bf71fb0a2 100644 --- a/src/libcalamares/locale/Tests.cpp +++ b/src/libcalamares/locale/Tests.cpp @@ -128,8 +128,8 @@ LocaleTests::testTranslatableConfig1() QCOMPARE( ts1.count(), 1 ); QVERIFY( !ts1.isEmpty() ); - QCOMPARE( ts1.get(), "Hello" ); - QCOMPARE( ts1.get( QLocale( "nl" ) ), "Hello" ); + QCOMPARE( ts1.get(), QStringLiteral( "Hello" ) ); + QCOMPARE( ts1.get( QLocale( "nl" ) ), QStringLiteral( "Hello" ) ); QVariantMap map; map.insert( "description", "description (no language)" ); @@ -137,8 +137,8 @@ LocaleTests::testTranslatableConfig1() QCOMPARE( ts2.count(), 1 ); QVERIFY( !ts2.isEmpty() ); - QCOMPARE( ts2.get(), "description (no language)" ); - QCOMPARE( ts2.get( QLocale( "nl" ) ), "description (no language)" ); + QCOMPARE( ts2.get(), QStringLiteral( "description (no language)" ) ); + QCOMPARE( ts2.get( QLocale( "nl" ) ), QStringLiteral( "description (no language)" ) ); } /** @bref Test strings with translations. @@ -173,8 +173,8 @@ LocaleTests::testTranslatableConfig2() QCOMPARE( ts1.count(), someLanguages().count() + 1 ); QVERIFY( !ts1.isEmpty() ); - QCOMPARE( ts1.get(), "description (no language)" ); // it wasn't set - QCOMPARE( ts1.get( QLocale( "nl" ) ), "description (language nl)" ); + QCOMPARE( ts1.get(), QStringLiteral( "description (no language)" ) ); // it wasn't set + QCOMPARE( ts1.get( QLocale( "nl" ) ), QStringLiteral( "description (language nl)" ) ); for ( const auto& language : someLanguages() ) { // Skip Serbian (latin) because QLocale() constructed with it @@ -188,7 +188,7 @@ LocaleTests::testTranslatableConfig2() language ); } QCOMPARE( ts1.get( QLocale( QLocale::Language::Serbian, QLocale::Script::LatinScript, QLocale::Country::Serbia ) ), - "description (language sr@latin)" ); + QStringLiteral( "description (language sr@latin)" ) ); CalamaresUtils::Locale::TranslatedString ts2( map, "name" ); // We skipped dutch this time