Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bd8ef5d9 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "[Composer-VTS] Test to verify MRR and ARR modes are mutually exclusive" into main

parents a0d5d201 a175f70d
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -1268,6 +1268,16 @@ TEST_P(GraphicsComposerAidlV3Test, GetDisplayConfigurations) {
        EXPECT_TRUE(status.isOk());
        EXPECT_FALSE(displayConfigurations.empty());

        const bool areAllModesARR =
                std::all_of(displayConfigurations.cbegin(), displayConfigurations.cend(),
                            [](const auto& config) { return config.vrrConfig.has_value(); });

        const bool areAllModesMRR =
                std::all_of(displayConfigurations.cbegin(), displayConfigurations.cend(),
                            [](const auto& config) { return !config.vrrConfig.has_value(); });

        EXPECT_TRUE(areAllModesARR || areAllModesMRR) << "Mixing MRR and ARR modes is not allowed";

        for (const auto& displayConfig : displayConfigurations) {
            EXPECT_NE(-1, displayConfig.width);
            EXPECT_NE(-1, displayConfig.height);