@@ -106,18 +106,35 @@ Rectangle {
106106 compare(tool.threshold.toFixed(4), data.threshold.toFixed(4), "Luminance threshold was incorrect.");
107107 }
108108
109− function test_inverse_data() {
109+ function test_light_data() {
110110 return [
111− { tag: "default", index: 0, inverse: false },
112− { tag: "red on black", index: 1, inverse: false },
113− { tag: "green on white", index: 2, inverse: true },
114− { tag: "blue on darkgrey", index: 3, inverse: true },
111+ { tag: "default", index: 0, light: "white" },
112+ { tag: "red on black", index: 1, light: "red" },
113+ { tag: "green on white", index: 2, light: "white" },
114+ { tag: "blue on darkgrey", index: 3, light: "darkgrey" },
115115 ];
116116 }
117117
118− function test_inverse(data) {
118+ function test_light(data) {
119119 tool.style = testCase.styles[data.index];
120− compare(tool.inverse, data.inverse, "Inversion was incorrect.");
120+ verify(Qt.colorEqual(tool.light, data.light),
121+ "Light color not equal: %1 != %2".arg(tool.light).arg(data.light));
121122 }
123+
124+ function test_dark_data() {
125+ return [
126+ { tag: "default", index: 0, dark: "grey" },
127+ { tag: "red on black", index: 1, dark: "black" },
128+ { tag: "green on white", index: 2, dark: "green" },
129+ { tag: "blue on darkgrey", index: 3, dark: "blue" },
130+ ];
131+ }
132+
133+ function test_dark(data) {
134+ tool.style = testCase.styles[data.index];
135+ verify(Qt.colorEqual(tool.dark, data.dark),
136+ "Dark color not equal: %1 != %2".arg(tool.dark).arg(data.dark));
137+ }
138+
122139 }
123140}