@@ -401,6 +401,12 @@ TEST_F(RenderedTargetTest, CpuRendering)
401401 ASSERT_TRUE (target.contains ({ 3 , 3 }));
402402 ASSERT_TRUE (target.contains ({ 3.3 , 3.5 }));
403403
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+
404410 // Test contains() with horizontal mirroring
405411 target.updateRotationStyle (Sprite::RotationStyle::LeftRight);
406412 target.updateDirection (-45 );
@@ -435,6 +441,12 @@ TEST_F(RenderedTargetTest, CpuRendering)
435441 ASSERT_TRUE (target.containsScratchPoint (-225 , 162 )); // [3, 3]
436442 ASSERT_TRUE (target.containsScratchPoint (-224.7 , 161.5 )); // [3.3, 3.5]
437443
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+
438450 // Test colorAtScratchPoint()
439451 ASSERT_EQ (target.colorAtScratchPoint (-228 , 165 ), 0 ); // [0, 0]
440452 ASSERT_EQ (target.colorAtScratchPoint (-227 , 165 ), 0 ); // [1, 0]
0 commit comments