| 1 | // SPDX-License-Identifier: GPL-3.0-or-latercxx . . $ `<file>/tests/src/test_amdpmauto.cpp`/ |
| 2 | // Copyright 2019 Juan Palacios <[email protected]> |
| 3 | |
| 4 | #include <catch2/catch_all.hpp> |
| 5 | #include <catch2/trompeloeil.hpp> |
| 6 | |
| 7 | #include "common/commandqueuestub.h"cxx . . $ `<file>/tests/src/common/commandqueuestub.h`/ |
| 8 | #include "core/components/controls/amd/pm/auto/pmauto.h"cxx . . $ `<file>/src/core/components/controls/amd/pm/auto/pmauto.h`/ |
| 9 | |
| 10 | extern template struct trompeloeil::reportercxx . . $ trompeloeil/reporter#<trompeloeilcxx . . $ trompeloeil/::specializedcxx . . $ trompeloeil/specialized#>; |
| 11 | |
| 12 | namespace Testscxx . . $ Tests/::AMDcxx . . $ Tests/AMD/::PMAutocxx . . $ Tests/AMD/PMAuto/ { |
| 13 | |
| 14 | class PMAutoTestAdaptercxx . . $ Tests/AMD/PMAuto/PMAutoTestAdapter# : public ::AMDcxx . . $ AMD/::PMAutocxx . . $ AMD/PMAuto# |
| 15 | { |
| 16 | public: |
| 17 | MAKE_MOCK1cxx . . $ `<external>/1068432606165018960/mock.hpp:4223:9`!(cleanControl, void(ICommandQueue &), override); |
| 18 | MAKE_MOCK1cxx . . $ `<external>/1068432606165018960/mock.hpp:4223:9`!(syncControl, void(ICommandQueue &), override); |
| 19 | }; |
| 20 | |
| 21 | TEST_CASEcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:144:11`!("AMD PMAuto tests", "[GPU][AMD][PM][PMAuto]") |
| 22 | { |
| 23 | PMAutoTestAdaptercxx . . $ Tests/AMD/PMAuto/PMAutoTestAdapter# ts; |
| 24 | |
| 25 | SECTIONcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:149:11`!("Has PMAuto ID") |
| 26 | { |
| 27 | REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(ts.ID() == ::AMD::PMAuto::ItemID); |
| 28 | } |
| 29 | |
| 30 | SECTIONcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:149:11`!("Is active by default") |
| 31 | { |
| 32 | REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(ts.active()); |
| 33 | } |
| 34 | |
| 35 | SECTIONcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:149:11`!("Does not generate pre-init control commands") |
| 36 | { |
| 37 | CommandQueueStubcxx . . $ CommandQueueStub# cmds; |
| 38 | ts.preInitcxx . . $ AMD/PMAuto#preInit(151e9138769f295e).(cmds); |
| 39 | REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(cmds.commands().empty()); |
| 40 | } |
| 41 | |
| 42 | SECTIONcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:149:11`!("Does not generate post-init control commands") |
| 43 | { |
| 44 | CommandQueueStubcxx . . $ CommandQueueStub# cmds; |
| 45 | ts.postInitcxx . . $ AMD/PMAuto#postInit(151e9138769f295e).(cmds); |
| 46 | REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(cmds.commands().empty()); |
| 47 | } |
| 48 | } |
| 49 | |
| 50 | } // namespace Tests::AMD::PMAuto |