@@ -1152,24 +1152,23 @@ TEST_F(RenderedTargetTest, TouchingColor)
11521152 EXPECT_CALL (target2, stageModel ()).WillRepeatedly (Return (nullptr ));
11531153 EXPECT_CALL (penLayer, getBounds ()).WillRepeatedly (ReturnRef (penBounds));
11541154
1155- static const QRgb color1 = 4286611711 ; // "purple"
1156- static const QRgb color2 = 596083443 ; // close to color1 and transparent
1157- static const Value color3 = " #808000" ; // "olive" (4286611456)
1158- static const QRgb color3Int = 4286611456 ;
1155+ static const Rgb color1 = 4286611711 ; // "purple"
1156+ static const Rgb color2 = 596083443 ; // close to color1 and transparent
1157+ static const Rgb color3 = 4286611456 ; // "olive"
11591158 static const QRgb color4 = 2505545047 ; // transparent "hippie green"
11601159 static const QRgb color5 = 4287417025 ; // color1 + color4
11611160
11621161 EXPECT_CALL (stageTarget, getFastBounds ()).WillOnce (Return (Rect (2 , 1 , 6 , -5 )));
11631162 EXPECT_CALL (target1, getFastBounds ()).WillOnce (Return (Rect (2 , 1 , 6 , -5 )));
11641163 EXPECT_CALL (target2, getFastBounds ()).WillOnce (Return (Rect (-5 , -1 , 1 , -8 )));
1165- EXPECT_CALL (target2, colorAtScratchPoint (1 , -3 )).WillOnce (Return (color3Int ));
1166- EXPECT_CALL (target2, colorAtScratchPoint (2 , -3 )).WillOnce (Return (color3Int ));
1167- EXPECT_CALL (target2, colorAtScratchPoint (3 , -3 )).WillOnce (Return (color3Int ));
1168- EXPECT_CALL (target2, colorAtScratchPoint (1 , -2 )).WillOnce (Return (color3Int ));
1169- EXPECT_CALL (target2, colorAtScratchPoint (3 , -2 )).WillOnce (Return (color3Int ));
1170- EXPECT_CALL (target2, colorAtScratchPoint (1 , -1 )).WillOnce (Return (color3Int ));
1164+ EXPECT_CALL (target2, colorAtScratchPoint (1 , -3 )).WillOnce (Return (color3 ));
1165+ EXPECT_CALL (target2, colorAtScratchPoint (2 , -3 )).WillOnce (Return (color3 ));
1166+ EXPECT_CALL (target2, colorAtScratchPoint (3 , -3 )).WillOnce (Return (color3 ));
1167+ EXPECT_CALL (target2, colorAtScratchPoint (1 , -2 )).WillOnce (Return (color3 ));
1168+ EXPECT_CALL (target2, colorAtScratchPoint (3 , -2 )).WillOnce (Return (color3 ));
1169+ EXPECT_CALL (target2, colorAtScratchPoint (1 , -1 )).WillOnce (Return (color3 ));
11711170 EXPECT_CALL (target2, colorAtScratchPoint (2 , -1 )).WillOnce (Return (color4));
1172- EXPECT_CALL (target1, colorAtScratchPoint (2 , -1 )).WillOnce (Return (color3Int ));
1171+ EXPECT_CALL (target1, colorAtScratchPoint (2 , -1 )).WillOnce (Return (color3 ));
11731172 EXPECT_CALL (target2, colorAtScratchPoint (3 , -1 )).WillOnce (Return (color4));
11741173 EXPECT_CALL (target1, colorAtScratchPoint (3 , -1 )).WillOnce (Return (color4));
11751174 EXPECT_CALL (penLayer, colorAtScratchPoint (3 , -1 )).WillOnce (Return (color4));
@@ -1179,47 +1178,47 @@ TEST_F(RenderedTargetTest, TouchingColor)
11791178 EXPECT_CALL (stageTarget, getFastBounds ()).WillOnce (Return (Rect (2 , 1 , 6 , -5 )));
11801179 EXPECT_CALL (target1, getFastBounds ()).WillOnce (Return (Rect (2 , 1 , 6 , -5 )));
11811180 EXPECT_CALL (target2, getFastBounds ()).WillOnce (Return (Rect (-5 , -1 , 1 , -8 )));
1182- EXPECT_CALL (target2, colorAtScratchPoint (1 , -3 )).WillOnce (Return (color3Int ));
1181+ EXPECT_CALL (target2, colorAtScratchPoint (1 , -3 )).WillOnce (Return (color3 ));
11831182 EXPECT_CALL (target2, colorAtScratchPoint (2 , -3 )).WillOnce (Return (color1));
11841183 ASSERT_TRUE (target.touchingColor (color1));
11851184
11861185 EXPECT_CALL (stageTarget, getFastBounds ()).WillOnce (Return (Rect (5 , 1 , 6 , -5 )));
11871186 EXPECT_CALL (target1, getFastBounds ()).WillOnce (Return (Rect (5 , 1 , 6 , -5 )));
11881187 EXPECT_CALL (target2, getFastBounds ()).WillOnce (Return (Rect (-5 , -1 , 2 , -8 )));
1189- EXPECT_CALL (target2, colorAtScratchPoint (1 , -3 )).WillOnce (Return (color3Int ));
1190- EXPECT_CALL (target2, colorAtScratchPoint (2 , -3 )).WillOnce (Return (color3Int ));
1191- EXPECT_CALL (target2, colorAtScratchPoint (3 , -3 )).WillOnce (Return (color3Int ));
1192- EXPECT_CALL (target2, colorAtScratchPoint (1 , -2 )).WillOnce (Return (color3Int ));
1193- EXPECT_CALL (target2, colorAtScratchPoint (3 , -2 )).WillOnce (Return (color3Int ));
1188+ EXPECT_CALL (target2, colorAtScratchPoint (1 , -3 )).WillOnce (Return (color3 ));
1189+ EXPECT_CALL (target2, colorAtScratchPoint (2 , -3 )).WillOnce (Return (color3 ));
1190+ EXPECT_CALL (target2, colorAtScratchPoint (3 , -3 )).WillOnce (Return (color3 ));
1191+ EXPECT_CALL (target2, colorAtScratchPoint (1 , -2 )).WillOnce (Return (color3 ));
1192+ EXPECT_CALL (target2, colorAtScratchPoint (3 , -2 )).WillOnce (Return (color3 ));
11941193 EXPECT_CALL (target2, colorAtScratchPoint (1 , -1 )).WillOnce (Return (color4));
1195- EXPECT_CALL (target1, colorAtScratchPoint (1 , -1 )).WillOnce (Return (color3Int ));
1196- EXPECT_CALL (target2, colorAtScratchPoint (2 , -1 )).WillOnce (Return (color3Int ));
1197- EXPECT_CALL (target2, colorAtScratchPoint (3 , -1 )).WillOnce (Return (color3Int ));
1194+ EXPECT_CALL (target1, colorAtScratchPoint (1 , -1 )).WillOnce (Return (color3 ));
1195+ EXPECT_CALL (target2, colorAtScratchPoint (2 , -1 )).WillOnce (Return (color3 ));
1196+ EXPECT_CALL (target2, colorAtScratchPoint (3 , -1 )).WillOnce (Return (color3 ));
11981197 ASSERT_FALSE (target.touchingColor (color1));
11991198
12001199 EXPECT_CALL (stageTarget, getFastBounds ()).WillOnce (Return (Rect (2 , 1 , 6 , -5 )));
12011200 EXPECT_CALL (target1, getFastBounds ()).WillOnce (Return (Rect (2 , 1 , 6 , -5 )));
12021201 EXPECT_CALL (target2, getFastBounds ()).WillOnce (Return (Rect (-5 , -6 , 2 , -8 )));
1203- EXPECT_CALL (target2, colorAtScratchPoint (1 , -3 )).WillOnce (Return (color3Int ));
1204- EXPECT_CALL (target2, colorAtScratchPoint (2 , -3 )).WillOnce (Return (color3Int ));
1205- EXPECT_CALL (target2, colorAtScratchPoint (3 , -3 )).WillOnce (Return (color3Int ));
1206- EXPECT_CALL (target2, colorAtScratchPoint (1 , -2 )).WillOnce (Return (color3Int ));
1207- EXPECT_CALL (target2, colorAtScratchPoint (3 , -2 )).WillOnce (Return (color3Int ));
1208- EXPECT_CALL (target2, colorAtScratchPoint (1 , -1 )).WillOnce (Return (color3Int ));
1209- EXPECT_CALL (target2, colorAtScratchPoint (2 , -1 )).WillOnce (Return (color3Int ));
1202+ EXPECT_CALL (target2, colorAtScratchPoint (1 , -3 )).WillOnce (Return (color3 ));
1203+ EXPECT_CALL (target2, colorAtScratchPoint (2 , -3 )).WillOnce (Return (color3 ));
1204+ EXPECT_CALL (target2, colorAtScratchPoint (3 , -3 )).WillOnce (Return (color3 ));
1205+ EXPECT_CALL (target2, colorAtScratchPoint (1 , -2 )).WillOnce (Return (color3 ));
1206+ EXPECT_CALL (target2, colorAtScratchPoint (3 , -2 )).WillOnce (Return (color3 ));
1207+ EXPECT_CALL (target2, colorAtScratchPoint (1 , -1 )).WillOnce (Return (color3 ));
1208+ EXPECT_CALL (target2, colorAtScratchPoint (2 , -1 )).WillOnce (Return (color3 ));
12101209 EXPECT_CALL (target2, colorAtScratchPoint (3 , -1 )).WillOnce (Return (color1));
12111210 ASSERT_TRUE (target.touchingColor (color2));
12121211
12131212 EXPECT_CALL (stageTarget, getFastBounds ()).WillOnce (Return (Rect (2 , 1 , 6 , -5 )));
12141213 EXPECT_CALL (target1, getFastBounds ()).WillOnce (Return (Rect (2 , 1 , 6 , -5 )));
12151214 EXPECT_CALL (target2, getFastBounds ()).WillOnce (Return (Rect (-5 , -6.5 , 1.8 , -8 )));
1216- EXPECT_CALL (target2, colorAtScratchPoint (1 , -3 )).WillOnce (Return (color3Int ));
1217- EXPECT_CALL (target2, colorAtScratchPoint (2 , -3 )).WillOnce (Return (color3Int ));
1218- EXPECT_CALL (target2, colorAtScratchPoint (3 , -3 )).WillOnce (Return (color3Int ));
1219- EXPECT_CALL (target2, colorAtScratchPoint (1 , -2 )).WillOnce (Return (color3Int ));
1220- EXPECT_CALL (target2, colorAtScratchPoint (3 , -2 )).WillOnce (Return (color3Int ));
1221- EXPECT_CALL (target2, colorAtScratchPoint (1 , -1 )).WillOnce (Return (color3Int ));
1222- EXPECT_CALL (target2, colorAtScratchPoint (2 , -1 )).WillOnce (Return (color3Int ));
1215+ EXPECT_CALL (target2, colorAtScratchPoint (1 , -3 )).WillOnce (Return (color3 ));
1216+ EXPECT_CALL (target2, colorAtScratchPoint (2 , -3 )).WillOnce (Return (color3 ));
1217+ EXPECT_CALL (target2, colorAtScratchPoint (3 , -3 )).WillOnce (Return (color3 ));
1218+ EXPECT_CALL (target2, colorAtScratchPoint (1 , -2 )).WillOnce (Return (color3 ));
1219+ EXPECT_CALL (target2, colorAtScratchPoint (3 , -2 )).WillOnce (Return (color3 ));
1220+ EXPECT_CALL (target2, colorAtScratchPoint (1 , -1 )).WillOnce (Return (color3 ));
1221+ EXPECT_CALL (target2, colorAtScratchPoint (2 , -1 )).WillOnce (Return (color3 ));
12231222 EXPECT_CALL (target2, colorAtScratchPoint (3 , -1 )).WillOnce (Return (color4));
12241223 EXPECT_CALL (target1, colorAtScratchPoint (3 , -1 )).WillOnce (Return (color1));
12251224 ASSERT_FALSE (target.touchingColor (color1));
0 commit comments