@@ -1650,25 +1650,25 @@ TEST(GeometryTest, OptRectUnion) {
16501650 Rect c = Rect::MakeLTRB (100 , 0 , 200 , 100 );
16511651
16521652 // NullOpt, NullOpt
1653- EXPECT_FALSE (Union (std::nullopt , std::nullopt ).has_value ());
1654- EXPECT_EQ (Union (std::nullopt , std::nullopt ), std::nullopt );
1653+ EXPECT_FALSE (Rect:: Union (std::nullopt , std::nullopt ).has_value ());
1654+ EXPECT_EQ (Rect:: Union (std::nullopt , std::nullopt ), std::nullopt );
16551655
16561656 auto test1 = [](const Rect& r) {
16571657 // Rect, NullOpt
1658- EXPECT_TRUE (Union (r, std::nullopt ).has_value ());
1659- EXPECT_EQ (Union (r, std::nullopt ).value (), r);
1658+ EXPECT_TRUE (Rect:: Union (r, std::nullopt ).has_value ());
1659+ EXPECT_EQ (Rect:: Union (r, std::nullopt ).value (), r);
16601660
16611661 // OptRect, NullOpt
1662- EXPECT_TRUE (Union (std::optional (r), std::nullopt ).has_value ());
1663- EXPECT_EQ (Union (std::optional (r), std::nullopt ).value (), r);
1662+ EXPECT_TRUE (Rect:: Union (std::optional (r), std::nullopt ).has_value ());
1663+ EXPECT_EQ (Rect:: Union (std::optional (r), std::nullopt ).value (), r);
16641664
16651665 // NullOpt, Rect
1666- EXPECT_TRUE (Union (std::nullopt , r).has_value ());
1667- EXPECT_EQ (Union (std::nullopt , r).value (), r);
1666+ EXPECT_TRUE (Rect:: Union (std::nullopt , r).has_value ());
1667+ EXPECT_EQ (Rect:: Union (std::nullopt , r).value (), r);
16681668
16691669 // NullOpt, OptRect
1670- EXPECT_TRUE (Union (std::nullopt , std::optional (r)).has_value ());
1671- EXPECT_EQ (Union (std::nullopt , std::optional (r)).value (), r);
1670+ EXPECT_TRUE (Rect:: Union (std::nullopt , std::optional (r)).has_value ());
1671+ EXPECT_EQ (Rect:: Union (std::nullopt , std::optional (r)).value (), r);
16721672 };
16731673
16741674 test1 (a);
@@ -1679,16 +1679,16 @@ TEST(GeometryTest, OptRectUnion) {
16791679 ASSERT_EQ (a.Union (b), u);
16801680
16811681 // Rect, OptRect
1682- EXPECT_TRUE (Union (a, std::optional (b)).has_value ());
1683- EXPECT_EQ (Union (a, std::optional (b)).value (), u);
1682+ EXPECT_TRUE (Rect:: Union (a, std::optional (b)).has_value ());
1683+ EXPECT_EQ (Rect:: Union (a, std::optional (b)).value (), u);
16841684
16851685 // OptRect, Rect
1686- EXPECT_TRUE (Union (std::optional (a), b).has_value ());
1687- EXPECT_EQ (Union (std::optional (a), b).value (), u);
1686+ EXPECT_TRUE (Rect:: Union (std::optional (a), b).has_value ());
1687+ EXPECT_EQ (Rect:: Union (std::optional (a), b).value (), u);
16881688
16891689 // OptRect, OptRect
1690- EXPECT_TRUE (Union (std::optional (a), std::optional (b)).has_value ());
1691- EXPECT_EQ (Union (std::optional (a), std::optional (b)).value (), u);
1690+ EXPECT_TRUE (Rect:: Union (std::optional (a), std::optional (b)).has_value ());
1691+ EXPECT_EQ (Rect:: Union (std::optional (a), std::optional (b)).value (), u);
16921692 };
16931693
16941694 test2 (a, b, Rect::MakeLTRB (0 , 0 , 200 , 200 ));
@@ -1751,25 +1751,25 @@ TEST(GeometryTest, OptRectIntersection) {
17511751 Rect c = Rect::MakeLTRB (100 , 0 , 200 , 110 );
17521752
17531753 // NullOpt, NullOpt
1754- EXPECT_FALSE (Intersection (std::nullopt , std::nullopt ).has_value ());
1755- EXPECT_EQ (Intersection (std::nullopt , std::nullopt ), std::nullopt );
1754+ EXPECT_FALSE (Rect:: Intersection (std::nullopt , std::nullopt ).has_value ());
1755+ EXPECT_EQ (Rect:: Intersection (std::nullopt , std::nullopt ), std::nullopt );
17561756
17571757 auto test1 = [](const Rect& r) {
17581758 // Rect, NullOpt
1759- EXPECT_TRUE (Intersection (r, std::nullopt ).has_value ());
1760- EXPECT_EQ (Intersection (r, std::nullopt ).value (), r);
1759+ EXPECT_TRUE (Rect:: Intersection (r, std::nullopt ).has_value ());
1760+ EXPECT_EQ (Rect:: Intersection (r, std::nullopt ).value (), r);
17611761
17621762 // OptRect, NullOpt
1763- EXPECT_TRUE (Intersection (std::optional (r), std::nullopt ).has_value ());
1764- EXPECT_EQ (Intersection (std::optional (r), std::nullopt ).value (), r);
1763+ EXPECT_TRUE (Rect:: Intersection (std::optional (r), std::nullopt ).has_value ());
1764+ EXPECT_EQ (Rect:: Intersection (std::optional (r), std::nullopt ).value (), r);
17651765
17661766 // NullOpt, Rect
1767- EXPECT_TRUE (Intersection (std::nullopt , r).has_value ());
1768- EXPECT_EQ (Intersection (std::nullopt , r).value (), r);
1767+ EXPECT_TRUE (Rect:: Intersection (std::nullopt , r).has_value ());
1768+ EXPECT_EQ (Rect:: Intersection (std::nullopt , r).value (), r);
17691769
17701770 // NullOpt, OptRect
1771- EXPECT_TRUE (Intersection (std::nullopt , std::optional (r)).has_value ());
1772- EXPECT_EQ (Intersection (std::nullopt , std::optional (r)).value (), r);
1771+ EXPECT_TRUE (Rect:: Intersection (std::nullopt , std::optional (r)).has_value ());
1772+ EXPECT_EQ (Rect:: Intersection (std::nullopt , std::optional (r)).value (), r);
17731773 };
17741774
17751775 test1 (a);
@@ -1780,16 +1780,18 @@ TEST(GeometryTest, OptRectIntersection) {
17801780 ASSERT_EQ (a.Intersection (b), i);
17811781
17821782 // Rect, OptRect
1783- EXPECT_TRUE (Intersection (a, std::optional (b)).has_value ());
1784- EXPECT_EQ (Intersection (a, std::optional (b)).value (), i);
1783+ EXPECT_TRUE (Rect:: Intersection (a, std::optional (b)).has_value ());
1784+ EXPECT_EQ (Rect:: Intersection (a, std::optional (b)).value (), i);
17851785
17861786 // OptRect, Rect
1787- EXPECT_TRUE (Intersection (std::optional (a), b).has_value ());
1788- EXPECT_EQ (Intersection (std::optional (a), b).value (), i);
1787+ EXPECT_TRUE (Rect:: Intersection (std::optional (a), b).has_value ());
1788+ EXPECT_EQ (Rect:: Intersection (std::optional (a), b).value (), i);
17891789
17901790 // OptRect, OptRect
1791- EXPECT_TRUE (Intersection (std::optional (a), std::optional (b)).has_value ());
1792- EXPECT_EQ (Intersection (std::optional (a), std::optional (b)).value (), i);
1791+ EXPECT_TRUE (
1792+ Rect::Intersection (std::optional (a), std::optional (b)).has_value ());
1793+ EXPECT_EQ (Rect::Intersection (std::optional (a), std::optional (b)).value (),
1794+ i);
17931795 };
17941796
17951797 test2 (a, b, Rect::MakeLTRB (100 , 100 , 110 , 110 ));
@@ -2117,11 +2119,11 @@ TEST(GeometryTest, RectProject) {
21172119TEST (GeometryTest, RectRoundOut) {
21182120 {
21192121 auto r = Rect::MakeLTRB (-100 , -100 , 100 , 100 );
2120- ASSERT_EQ (RoundOut (r), r);
2122+ ASSERT_EQ (Rect:: RoundOut (r), r);
21212123 }
21222124 {
21232125 auto r = Rect::MakeLTRB (-100.1 , -100.1 , 100.1 , 100.1 );
2124- ASSERT_EQ (RoundOut (r), Rect::MakeLTRB (-101 , -101 , 101 , 101 ));
2126+ ASSERT_EQ (Rect:: RoundOut (r), Rect::MakeLTRB (-101 , -101 , 101 , 101 ));
21252127 }
21262128}
21272129
0 commit comments