@@ -662,64 +662,64 @@ TEST_F(RenderedTargetTest, GetBounds)
662662 target.beforeRedraw ();
663663
664664 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 );
669669
670670 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 );
675675
676676 EXPECT_CALL (engine, stageWidth ()).WillOnce (Return (480 ));
677677 EXPECT_CALL (engine, stageHeight ()).WillOnce (Return (360 ));
678678 target.updateRotationStyle (Sprite::RotationStyle::LeftRight);
679679
680680 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 );
685685
686686 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 );
691691
692692 EXPECT_CALL (engine, stageWidth ()).WillOnce (Return (480 ));
693693 EXPECT_CALL (engine, stageHeight ()).WillOnce (Return (360 ));
694694 target.setStageScale (20.75 );
695695
696696 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 );
701701
702702 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 );
707707
708708 EXPECT_CALL (engine, stageWidth ()).WillOnce (Return (480 ));
709709 EXPECT_CALL (engine, stageHeight ()).WillOnce (Return (360 ));
710710 target.updateSize (9780.6 );
711711
712712 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 );
717717
718718 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 );
723723
724724 context.doneCurrent ();
725725}
0 commit comments