[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [syntax-highlighting] autotests: Complete unit test for reading EditorColorRoles
From: Dominik Haumann <dhaumann () kde ! org>
Date: 2016-09-25 17:41:14
Message-ID: E1boDQQ-0006JJ-NT () code ! kde ! org
[Download RAW message or body]
Git commit 8d67e5a8951ead0741cec4b764b6eb2a734cebb0 by Dominik Haumann.
Committed on 25/09/2016 at 17:41.
Pushed by dhaumann into branch 'master'.
Complete unit test for reading EditorColorRoles
M +24 -3 autotests/theme_test.cpp
http://commits.kde.org/syntax-highlighting/8d67e5a8951ead0741cec4b764b6eb2a734cebb0
diff --git a/autotests/theme_test.cpp b/autotests/theme_test.cpp
index 03417be..1a8765b 100644
--- a/autotests/theme_test.cpp
+++ b/autotests/theme_test.cpp
@@ -119,14 +119,35 @@ private Q_SLOTS:
Theme t = m_repo.theme(QLatin1String("Default"));
QVERIFY(t.isValid());
+ // make sure all editor colors are properly read
QCOMPARE(t.editorColor(Theme::BackgroundColor) , QColor("#ffffff").rgb());
- QCOMPARE(t.editorColor(Theme::CodeFolding) , QColor("#94caef").rgb());
- QCOMPARE(t.editorColor(Theme::BracketMatching) , QColor("#ffff00").rgb());
+ QCOMPARE(t.editorColor(Theme::TextSelection) , QColor("#94caef").rgb());
QCOMPARE(t.editorColor(Theme::CurrentLine) , QColor("#f8f7f6").rgb());
- QCOMPARE(t.editorColor(Theme::IconBorder) , QColor("#f0f0f0").rgb());
+ QCOMPARE(t.editorColor(Theme::SearchHighlight) , QColor("#ffff00").rgb());
+ QCOMPARE(t.editorColor(Theme::ReplaceHighlight) , QColor("#00ff00").rgb());
+ QCOMPARE(t.editorColor(Theme::BracketMatching) , QColor("#ffff00").rgb());
+ QCOMPARE(t.editorColor(Theme::TabMarker) , QColor("#d2d2d2").rgb());
+ QCOMPARE(t.editorColor(Theme::SpellChecking) , QColor("#bf0303").rgb());
QCOMPARE(t.editorColor(Theme::IndentationLine) , QColor("#d2d2d2").rgb());
+ QCOMPARE(t.editorColor(Theme::IconBorder) , QColor("#f0f0f0").rgb());
+ QCOMPARE(t.editorColor(Theme::CodeFolding) , QColor("#94caef").rgb());
QCOMPARE(t.editorColor(Theme::LineNumbers) , QColor("#a0a0a0").rgb());
QCOMPARE(t.editorColor(Theme::CurrentLineNumber), QColor("#1e1e1e").rgb());
+ QCOMPARE(t.editorColor(Theme::WordWrapMarker) , QColor("#ededed").rgb());
+ QCOMPARE(t.editorColor(Theme::ModifiedLines) , QColor("#fdbc4b").rgb());
+ QCOMPARE(t.editorColor(Theme::SavedLines) , QColor("#2ecc71").rgb());
+ QCOMPARE(t.editorColor(Theme::Separator) , QColor("#898887").rgb());
+ QCOMPARE(t.editorColor(Theme::MarkBookmark) , QColor("#0000ff").rgb());
+ QCOMPARE(t.editorColor(Theme::MarkBreakpointActive), QColor("#ff0000").rgb());
+ QCOMPARE(t.editorColor(Theme::MarkBreakpointReached), QColor("#ffff00").rgb());
+ QCOMPARE(t.editorColor(Theme::MarkBreakpointDisabled), QColor("#ff00ff").rgb());
+ QCOMPARE(t.editorColor(Theme::MarkExecution) , QColor("#a0a0a4").rgb());
+ QCOMPARE(t.editorColor(Theme::MarkWarning) , QColor("#00ff00").rgb());
+ QCOMPARE(t.editorColor(Theme::MarkError) , QColor("#ff0000").rgb());
+ QCOMPARE(t.editorColor(Theme::TemplateBackground), QColor("#d6d2d0").rgb());
+ QCOMPARE(t.editorColor(Theme::TemplatePlaceholder), QColor("#baf8ce").rgb());
+ QCOMPARE(t.editorColor(Theme::TemplateFocusedPlaceholder), QColor("#76da98").rgb());
+ QCOMPARE(t.editorColor(Theme::TemplateReadOnlyPlaceholder), QColor("#f6e6e6").rgb());
}
void testInvalidTheme()
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic