@@ -401,6 +401,12 @@ TEST_F(RenderedTargetTest, CpuRendering)
401
401
ASSERT_TRUE (target.contains ({ 3 , 3 }));
402
402
ASSERT_TRUE (target.contains ({ 3.3 , 3.5 }));
403
403
404
+ // Regtest for #141
405
+ target.setVisible (false );
406
+ ASSERT_FALSE (target.contains ({ 1 , 3 }));
407
+ ASSERT_FALSE (target.contains ({ 2 , 3 }));
408
+ target.setVisible (true );
409
+
404
410
// Test contains() with horizontal mirroring
405
411
target.updateRotationStyle (Sprite::RotationStyle::LeftRight);
406
412
target.updateDirection (-45 );
@@ -435,6 +441,12 @@ TEST_F(RenderedTargetTest, CpuRendering)
435
441
ASSERT_TRUE (target.containsScratchPoint (-225 , 162 )); // [3, 3]
436
442
ASSERT_TRUE (target.containsScratchPoint (-224.7 , 161.5 )); // [3.3, 3.5]
437
443
444
+ // Regtest for #141
445
+ target.setVisible (false );
446
+ ASSERT_FALSE (target.containsScratchPoint (-227 , 162 )); // [1, 3]
447
+ ASSERT_FALSE (target.containsScratchPoint (-226 , 162 )); // [2, 3]
448
+ target.setVisible (true );
449
+
438
450
// Test colorAtScratchPoint()
439
451
ASSERT_EQ (target.colorAtScratchPoint (-228 , 165 ), 0 ); // [0, 0]
440
452
ASSERT_EQ (target.colorAtScratchPoint (-227 , 165 ), 0 ); // [1, 0]
0 commit comments