@@ -662,64 +662,64 @@ TEST_F(RenderedTargetTest, GetBounds)
662
662
target.beforeRedraw ();
663
663
664
664
Rect bounds = target.getBounds ();
665
- ASSERT_EQ (std::round (bounds.left () * 100 ) / 100 , 66.13 );
666
- ASSERT_EQ (std::round (bounds.top () * 100 ) / 100 , -124.52 );
667
- ASSERT_EQ (std::round (bounds.right () * 100 ) / 100 , 66.72 );
668
- ASSERT_EQ (std::round (bounds.bottom () * 100 ) / 100 , -125.11 );
665
+ ASSERT_EQ (std::round (bounds.left () * 100 ) / 100 , 64.96 );
666
+ ASSERT_EQ (std::round (bounds.top () * 100 ) / 100 , -121.16 );
667
+ ASSERT_EQ (std::round (bounds.right () * 100 ) / 100 , 67.79 );
668
+ ASSERT_EQ (std::round (bounds.bottom () * 100 ) / 100 , -123.99 );
669
669
670
670
QRectF bubbleBounds = target.getBoundsForBubble ();
671
- ASSERT_EQ (std::round (bubbleBounds.left () * 100 ) / 100 , 66.13 );
672
- ASSERT_EQ (std::round (bubbleBounds.top () * 100 ) / 100 , -124.52 );
673
- ASSERT_EQ (std::round (bubbleBounds.right () * 100 ) / 100 , 66.72 );
674
- ASSERT_EQ (std::round (bubbleBounds.bottom () * 100 ) / 100 , -125.11 );
671
+ ASSERT_EQ (std::round (bubbleBounds.left () * 100 ) / 100 , 64.96 );
672
+ ASSERT_EQ (std::round (bubbleBounds.top () * 100 ) / 100 , -121.16 );
673
+ ASSERT_EQ (std::round (bubbleBounds.right () * 100 ) / 100 , 67.79 );
674
+ ASSERT_EQ (std::round (bubbleBounds.bottom () * 100 ) / 100 , -123.99 );
675
675
676
676
EXPECT_CALL (engine, stageWidth ()).WillOnce (Return (480 ));
677
677
EXPECT_CALL (engine, stageHeight ()).WillOnce (Return (360 ));
678
678
target.updateRotationStyle (Sprite::RotationStyle::LeftRight);
679
679
680
680
bounds = target.getBounds ();
681
- ASSERT_EQ (std::round (bounds.left () * 100 ) / 100 , 71.87 );
682
- ASSERT_EQ (std::round (bounds.top () * 100 ) / 100 , -110.47 );
683
- ASSERT_EQ (std::round (bounds.right () * 100 ) / 100 , 72.29 );
684
- ASSERT_EQ (std::round (bounds.bottom () * 100 ) / 100 , -110.89 );
681
+ ASSERT_EQ (std::round (bounds.left () * 100 ) / 100 , 69.5 );
682
+ ASSERT_EQ (std::round (bounds.top () * 100 ) / 100 , -111.26 );
683
+ ASSERT_EQ (std::round (bounds.right () * 100 ) / 100 , 71.5 );
684
+ ASSERT_EQ (std::round (bounds.bottom () * 100 ) / 100 , -113.26 );
685
685
686
686
bubbleBounds = target.getBoundsForBubble ();
687
- ASSERT_EQ (std::round (bubbleBounds.left () * 100 ) / 100 , 71.87 );
688
- ASSERT_EQ (std::round (bubbleBounds.top () * 100 ) / 100 , -110.47 );
689
- ASSERT_EQ (std::round (bubbleBounds.right () * 100 ) / 100 , 72.29 );
690
- ASSERT_EQ (std::round (bubbleBounds.bottom () * 100 ) / 100 , -110.89 );
687
+ ASSERT_EQ (std::round (bubbleBounds.left () * 100 ) / 100 , 69.5 );
688
+ ASSERT_EQ (std::round (bubbleBounds.top () * 100 ) / 100 , -111.26 );
689
+ ASSERT_EQ (std::round (bubbleBounds.right () * 100 ) / 100 , 71.5 );
690
+ ASSERT_EQ (std::round (bubbleBounds.bottom () * 100 ) / 100 , -113.26 );
691
691
692
692
EXPECT_CALL (engine, stageWidth ()).WillOnce (Return (480 ));
693
693
EXPECT_CALL (engine, stageHeight ()).WillOnce (Return (360 ));
694
694
target.setStageScale (20.75 );
695
695
696
696
bounds = target.getBounds ();
697
- ASSERT_EQ (std::round (bounds.left () * 100 ) / 100 , 71.87 );
698
- ASSERT_EQ (std::round (bounds.top () * 100 ) / 100 , -110.47 );
699
- ASSERT_EQ (std::round (bounds.right () * 100 ) / 100 , 72.29 );
700
- ASSERT_EQ (std::round (bounds.bottom () * 100 ) / 100 , -110.89 );
697
+ ASSERT_EQ (std::round (bounds.left () * 100 ) / 100 , 69.5 );
698
+ ASSERT_EQ (std::round (bounds.top () * 100 ) / 100 , -111.26 );
699
+ ASSERT_EQ (std::round (bounds.right () * 100 ) / 100 , 71.5 );
700
+ ASSERT_EQ (std::round (bounds.bottom () * 100 ) / 100 , -113.26 );
701
701
702
702
bubbleBounds = target.getBoundsForBubble ();
703
- ASSERT_EQ (std::round (bubbleBounds.left () * 100 ) / 100 , 71.87 );
704
- ASSERT_EQ (std::round (bubbleBounds.top () * 100 ) / 100 , -110.47 );
705
- ASSERT_EQ (std::round (bubbleBounds.right () * 100 ) / 100 , 72.29 );
706
- ASSERT_EQ (std::round (bubbleBounds.bottom () * 100 ) / 100 , -110.89 );
703
+ ASSERT_EQ (std::round (bubbleBounds.left () * 100 ) / 100 , 69.5 );
704
+ ASSERT_EQ (std::round (bubbleBounds.top () * 100 ) / 100 , -111.26 );
705
+ ASSERT_EQ (std::round (bubbleBounds.right () * 100 ) / 100 , 71.5 );
706
+ ASSERT_EQ (std::round (bubbleBounds.bottom () * 100 ) / 100 , -113.26 );
707
707
708
708
EXPECT_CALL (engine, stageWidth ()).WillOnce (Return (480 ));
709
709
EXPECT_CALL (engine, stageHeight ()).WillOnce (Return (360 ));
710
710
target.updateSize (9780.6 );
711
711
712
712
bounds = target.getBounds ();
713
- ASSERT_EQ (std::round (bounds.left () * 100 ) / 100 , -466.05 );
714
- ASSERT_EQ (std::round (bounds.top () * 100 ) / 100 , 1294.13 );
715
- ASSERT_EQ (std::round (bounds.right () * 100 ) / 100 , -405.87 );
716
- ASSERT_EQ (std::round (bounds.bottom () * 100 ) / 100 , 1233.94 );
713
+ ASSERT_EQ (std::round (bounds.left () * 100 ) / 100 , -378.77 );
714
+ ASSERT_EQ (std::round (bounds.top () * 100 ) / 100 , 1323.22 );
715
+ ASSERT_EQ (std::round (bounds.right () * 100 ) / 100 , -376.77 );
716
+ ASSERT_EQ (std::round (bounds.bottom () * 100 ) / 100 , 1321.22 );
717
717
718
718
bubbleBounds = target.getBoundsForBubble ();
719
- ASSERT_EQ (std::round (bubbleBounds.left () * 100 ) / 100 , -466.05 );
720
- ASSERT_EQ (std::round (bubbleBounds.top () * 100 ) / 100 , 1294.13 );
721
- ASSERT_EQ (std::round (bubbleBounds.right () * 100 ) / 100 , -405.87 );
722
- ASSERT_EQ (std::round (bubbleBounds.bottom () * 100 ) / 100 , 1286.13 );
719
+ ASSERT_EQ (std::round (bubbleBounds.left () * 100 ) / 100 , -378.77 );
720
+ ASSERT_EQ (std::round (bubbleBounds.top () * 100 ) / 100 , 1323.22 );
721
+ ASSERT_EQ (std::round (bubbleBounds.right () * 100 ) / 100 , -376.77 );
722
+ ASSERT_EQ (std::round (bubbleBounds.bottom () * 100 ) / 100 , 1321.22 );
723
723
724
724
context.doneCurrent ();
725
725
}
0 commit comments