Fix system language dependent unit test
ClosedPublic

Authored by pbraun on Oct 3 2018, 4:18 PM.

Details

Summary

When running the konsole unit tests on a system where the
language setting is not English the test
ProfileTest::testFallbackProfile fails because
it compares the translated value of the Name property
with the string literal "Default". To fix the test we can
use `UntranslatedName' instead.

Test Plan
  1. Run the konsole unit tests on a system where the language is not English

Output of ctest --verbose before the fix:

8: FAIL!  : Konsole::ProfileTest::testFallbackProfile() Compared values are not the same
8:    Actual   (fallback->property<QString>(Profile::Name)): "Standard"
8:    Expected (QStringLiteral("Default"))                 : "Default"
8:    Loc: [/var/run/media/peter/MEDIA/Projects/kde/konsole/src/autotests/ProfileTest.cpp(237)]

After the fix all tests should pass.

Diff Detail

Repository
R319 Konsole
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
pbraun created this revision.Oct 3 2018, 4:18 PM
Restricted Application added a subscriber: konsole-devel. · View Herald TranscriptOct 3 2018, 4:18 PM
pbraun requested review of this revision.Oct 3 2018, 4:18 PM
hindenburg edited the summary of this revision. (Show Details)Oct 6 2018, 5:06 PM
hindenburg edited the test plan for this revision. (Show Details)
hindenburg edited the summary of this revision. (Show Details)
hindenburg accepted this revision.Oct 6 2018, 5:09 PM
hindenburg added a subscriber: hindenburg.

Thanks, nice catch

This revision is now accepted and ready to land.Oct 6 2018, 5:09 PM
This revision was automatically updated to reflect the committed changes.