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

Commit a175f70d authored by ramindani's avatar ramindani
Browse files

[Composer-VTS] Test to verify MRR and ARR modes are mutually exclusive

Test: atest PerInstance/GraphicsComposerAidlV3Test#GetDisplayConfigurations/0_android_hardware_graphics_composer3_IComposer_default
BUG: 380089524
Flag: EXEMPT test fix
Change-Id: Ib8eb50b1c9f9806ddccded163bc90cfd85747707
parent fbb22abb
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -1265,6 +1265,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);