Unit test: Check all shipped themes for completeness
ClosedPublic

Authored by dhaumann on Sep 8 2018, 8:06 PM.

Details

Summary

The added unit test makes sure

  • the *.theme files in the Qt resource are valid JSON
  • contain all text styles
  • all text styles are defined with correct entires
  • all text styles at least have a text-color set
  • all text style expected bool values are valid bool values
  • all text style expected colors are valid colors
  • contain all editor colors
  • all editor colors are valid colors
Test Plan

make && make test

Diff Detail

Repository
R216 Syntax Highlighting
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
dhaumann created this revision.Sep 8 2018, 8:06 PM
Restricted Application added projects: Kate, Frameworks. · View Herald TranscriptSep 8 2018, 8:06 PM
Restricted Application added subscribers: kde-frameworks-devel, kwrite-devel. · View Herald Transcript
dhaumann requested review of this revision.Sep 8 2018, 8:06 PM

Example output:

dh@eriador:syntax-highlighting :-)  $ ./bin/theme_test 
********* Start testing of KSyntaxHighlighting::ThemeTest *********
Config: Using QtTest library 5.11.1, Qt 5.11.1 (x86_64-little_endian-lp64 shared (dynamic) release build; by GCC 8.1.1 20180614 [gcc-8-branch revision 261584])
[...]
PASS   : KSyntaxHighlighting::ThemeTest::testThemeIntegrity(:/org.kde.syntax-highlighting/themes/default.theme)
PASS   : KSyntaxHighlighting::ThemeTest::testThemeIntegrity(:/org.kde.syntax-highlighting/themes/printing.theme)
PASS   : KSyntaxHighlighting::ThemeTest::testThemeIntegrity(:/org.kde.syntax-highlighting/themes/breeze-dark.theme)
[...]
Totals: 11 passed, 0 failed, 0 skipped, 0 blacklisted, 8ms
********* Finished testing of KSyntaxHighlighting::ThemeTest *********
dhaumann updated this revision to Diff 41221.Sep 8 2018, 8:11 PM
  • Merge branch 'master' into check-themes
  • Include Solarized color themes
cullmann accepted this revision.Sep 8 2018, 9:21 PM

+1 ;=)

This revision is now accepted and ready to land.Sep 8 2018, 9:21 PM
vkrause accepted this revision.Sep 9 2018, 7:14 AM
This revision was automatically updated to reflect the committed changes.