| 1 | // SPDX-License-Identifier: GPL-3.0-or-latercxx . . $ `<file>/tests/src/test_amdfanfixed.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 "common/uintdatasourcestub.h"cxx . . $ `<file>/tests/src/common/uintdatasourcestub.h`/ |
| 9 | #include "core/components/controls/amd/fan/fixed/fanfixed.h"cxx . . $ `<file>/src/core/components/controls/amd/fan/fixed/fanfixed.h`/ |
| 10 | |
| 11 | extern template struct trompeloeil::reportercxx . . $ trompeloeil/reporter#<trompeloeilcxx . . $ trompeloeil/::specializedcxx . . $ trompeloeil/specialized#>; |
| 12 | |
| 13 | namespace Testscxx . . $ Tests/::AMDcxx . . $ Tests/AMD/::FanFixedcxx . . $ Tests/AMD/FanFixed/ { |
| 14 | |
| 15 | class FanFixedTestAdaptercxx . . $ Tests/AMD/FanFixed/FanFixedTestAdapter# : public ::AMDcxx . . $ AMD/::FanFixedcxx . . $ AMD/FanFixed# |
| 16 | { |
| 17 | public: |
| 18 | using ::AMDcxx . . $ AMD/::FanFixedcxx . . $ AMD/FanFixed#::FanFixedcxx . . $ Tests/AMD/FanFixed/FanFixedTestAdapter#FanFixedTestAdapter(7d19046dc21207db).; |
| 19 | |
| 20 | using ::AMDcxx . . $ AMD/::FanFixedcxx . . $ AMD/FanFixed#::cleanControlcxx . . $ Tests/AMD/FanFixed/FanFixedTestAdapter#cleanControl(151e9138769f295e).; |
| 21 | using ::AMDcxx . . $ AMD/::FanFixedcxx . . $ AMD/FanFixed#::exportControlcxx . . $ Tests/AMD/FanFixed/FanFixedTestAdapter#exportControl(40299682ab9c8676).; |
| 22 | using ::AMDcxx . . $ AMD/::FanFixedcxx . . $ AMD/FanFixed#::fanStartValuecxx . . $ Tests/AMD/FanFixed/FanFixedTestAdapter#fanStartValue(cb2f890c2fdad230).; |
| 23 | using ::AMDcxx . . $ AMD/::FanFixedcxx . . $ AMD/FanFixed#::fanStopcxx . . $ Tests/AMD/FanFixed/FanFixedTestAdapter#fanStop(b45ddcbc8423892c).; |
| 24 | using ::AMDcxx . . $ AMD/::FanFixedcxx . . $ AMD/FanFixed#::importControlcxx . . $ Tests/AMD/FanFixed/FanFixedTestAdapter#importControl(4f796e3ecd5dcd94).; |
| 25 | using ::AMDcxx . . $ AMD/::FanFixedcxx . . $ AMD/FanFixed#::syncControlcxx . . $ Tests/AMD/FanFixed/FanFixedTestAdapter#syncControl(151e9138769f295e).; |
| 26 | using ::AMDcxx . . $ AMD/::FanFixedcxx . . $ AMD/FanFixed#::valuecxx . . $ Tests/AMD/FanFixed/FanFixedTestAdapter#value(cb2f890c2fdad230).; |
| 27 | }; |
| 28 | |
| 29 | class FanFixedImporterStubcxx . . $ Tests/AMD/FanFixed/FanFixedImporterStub# : public ::AMDcxx . . $ AMD/::FanFixedcxx . . $ AMD/FanFixed#::Importercxx . . $ AMD/FanFixed#Importer# |
| 30 | { |
| 31 | public: |
| 32 | FanFixedImporterStubcxx . . $ Tests/AMD/FanFixed/FanFixedImporterStub#FanFixedImporterStub(49f6e7a06ebc5aa8).() |
| 33 | : value_cxx . . $ Tests/AMD/FanFixed/FanFixedImporterStub#value_.(0) |
| 34 | , fanStartValue_cxx . . $ Tests/AMD/FanFixed/FanFixedImporterStub#fanStartValue_.(0) |
| 35 | , fanStop_cxx . . $ Tests/AMD/FanFixed/FanFixedImporterStub#fanStop_.(false) |
| 36 | { |
| 37 | } |
| 38 | |
| 39 | stdcxx . . $ std/::optionalcxx . . $ std/optional#<stdcxx . . $ std/::reference_wrappercxx . . $ std/reference_wrapper#<Importablecxx . . $ Importable#::Importercxx . . $ Importable#Importer#>> |
| 40 | provideImportercxx . . $ Tests/AMD/FanFixed/FanFixedImporterStub#provideImporter(c13a3bcac0db4745).(Itemcxx . . $ Item# const &) override |
| 41 | { |
| 42 | return *cxx . . $ std/optional#optional(e3f0d6382bd52f24).this; |
| 43 | } |
| 44 | |
| 45 | bool provideActivecxx . . $ Tests/AMD/FanFixed/FanFixedImporterStub#provideActive(50ce9a9e25b4a850).() const override |
| 46 | { |
| 47 | return false; |
| 48 | } |
| 49 | |
| 50 | unitscxx . . $ units/::concentrationcxx . . $ units/concentration/::percent_tcxx . . $ units/concentration/percent_t# provideFanFixedValuecxx . . $ Tests/AMD/FanFixed/FanFixedImporterStub#provideFanFixedValue(af4aa75dc05984e9).() const override |
| 51 | { |
| 52 | return value_cxx . . $ Tests/AMD/FanFixed/FanFixedImporterStub#value_.; |
| 53 | } |
| 54 | |
| 55 | bool provideFanFixedFanStopcxx . . $ Tests/AMD/FanFixed/FanFixedImporterStub#provideFanFixedFanStop(50ce9a9e25b4a850).() const override |
| 56 | { |
| 57 | return fanStop_cxx . . $ Tests/AMD/FanFixed/FanFixedImporterStub#fanStop_.; |
| 58 | } |
| 59 | |
| 60 | unitscxx . . $ units/::concentrationcxx . . $ units/concentration/::percent_tcxx . . $ units/concentration/percent_t# provideFanFixedFanStartValuecxx . . $ Tests/AMD/FanFixed/FanFixedImporterStub#provideFanFixedFanStartValue(af4aa75dc05984e9).() const override |
| 61 | { |
| 62 | return fanStartValue_cxx . . $ Tests/AMD/FanFixed/FanFixedImporterStub#fanStartValue_.; |
| 63 | } |
| 64 | |
| 65 | void valuecxx . . $ Tests/AMD/FanFixed/FanFixedImporterStub#value(ad81b86b0a2ae8f1).(unitscxx . . $ units/::concentrationcxx . . $ units/concentration/::percent_tcxx . . $ units/concentration/percent_t# value) |
| 66 | { |
| 67 | value_cxx . . $ Tests/AMD/FanFixed/FanFixedImporterStub#value_. =cxx . . $ units/unit_t#`operator=`(ee8d7c56080e6c63). value; |
| 68 | } |
| 69 | |
| 70 | void fanStopcxx . . $ Tests/AMD/FanFixed/FanFixedImporterStub#fanStop(b45ddcbc8423892c).(bool enabled) |
| 71 | { |
| 72 | fanStop_cxx . . $ Tests/AMD/FanFixed/FanFixedImporterStub#fanStop_. = enabled; |
| 73 | } |
| 74 | |
| 75 | void fanStartValuecxx . . $ Tests/AMD/FanFixed/FanFixedImporterStub#fanStartValue(ad81b86b0a2ae8f1).(unitscxx . . $ units/::concentrationcxx . . $ units/concentration/::percent_tcxx . . $ units/concentration/percent_t# value) |
| 76 | { |
| 77 | fanStartValue_cxx . . $ Tests/AMD/FanFixed/FanFixedImporterStub#fanStartValue_. =cxx . . $ units/unit_t#`operator=`(ee8d7c56080e6c63). value; |
| 78 | } |
| 79 | |
| 80 | private: |
| 81 | unitscxx . . $ units/::concentrationcxx . . $ units/concentration/::percent_tcxx . . $ units/concentration/percent_t# value_cxx . . $ Tests/AMD/FanFixed/FanFixedImporterStub#value_.; |
| 82 | unitscxx . . $ units/::concentrationcxx . . $ units/concentration/::percent_tcxx . . $ units/concentration/percent_t# fanStartValue_cxx . . $ Tests/AMD/FanFixed/FanFixedImporterStub#fanStartValue_.; |
| 83 | bool fanStop_cxx . . $ Tests/AMD/FanFixed/FanFixedImporterStub#fanStop_.; |
| 84 | }; |
| 85 | |
| 86 | class FanFixedExporterMockcxx . . $ Tests/AMD/FanFixed/FanFixedExporterMock# : public ::AMDcxx . . $ AMD/::FanFixedcxx . . $ AMD/FanFixed#::Exportercxx . . $ AMD/FanFixed#Exporter# |
| 87 | { |
| 88 | public: |
| 89 | MAKE_MOCK1cxx . . $ `<external>/1068432606165018960/mock.hpp:4223:9`!(takeFanFixedValue, void(units::concentration::percent_t), override); |
| 90 | MAKE_MOCK1cxx . . $ `<external>/1068432606165018960/mock.hpp:4223:9`!(takeFanFixedFanStop, void(bool), override); |
| 91 | MAKE_MOCK1cxx . . $ `<external>/1068432606165018960/mock.hpp:4223:9`!(takeFanFixedFanStartValue, void(units::concentration::percent_t), |
| 92 | override); |
| 93 | MAKE_MOCK1cxx . . $ `<external>/1068432606165018960/mock.hpp:4223:9`!(takeActive, void(bool), override); |
| 94 | MAKE_MOCK1cxx . . $ `<external>/1068432606165018960/mock.hpp:4223:9`!( |
| 95 | provideExporter, |
| 96 | std::optional<std::reference_wrapper<Exportable::Exporter>>(Item const &), |
| 97 | override); |
| 98 | }; |
| 99 | |
| 100 | TEST_CASEcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:144:11`!("AMD FanFixed tests", "[GPU][AMD][Fan][FanFixed]") |
| 101 | { |
| 102 | CommandQueueStubcxx . . $ CommandQueueStub# ctlCmds; |
| 103 | |
| 104 | SECTIONcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:149:11`!("Has FanFixed ID") |
| 105 | { |
| 106 | FanFixedTestAdaptercxx . . $ Tests/AMD/FanFixed/FanFixedTestAdapter# ts(stdcxx . . $ std/unique_ptr#unique_ptr(8bcafd3b0b660df8).::make_uniquecxx . . $ std/make_unique(5cd499e8540a10bb).<UIntDataSourceStubcxx . . $ UIntDataSourceStub#>(), |
| 107 | stdcxx . . $ std/unique_ptr#unique_ptr(8bcafd3b0b660df8).::make_uniquecxx . . $ std/make_unique(5cd499e8540a10bb).<UIntDataSourceStubcxx . . $ UIntDataSourceStub#>()); |
| 108 | |
| 109 | REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(ts.ID() == ::AMD::FanFixed::ItemID); |
| 110 | } |
| 111 | |
| 112 | SECTIONcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:149:11`!("Is not active by default") |
| 113 | { |
| 114 | FanFixedTestAdaptercxx . . $ Tests/AMD/FanFixed/FanFixedTestAdapter# ts(stdcxx . . $ std/unique_ptr#unique_ptr(8bcafd3b0b660df8).::make_uniquecxx . . $ std/make_unique(5cd499e8540a10bb).<UIntDataSourceStubcxx . . $ UIntDataSourceStub#>(), |
| 115 | stdcxx . . $ std/unique_ptr#unique_ptr(8bcafd3b0b660df8).::make_uniquecxx . . $ std/make_unique(5cd499e8540a10bb).<UIntDataSourceStubcxx . . $ UIntDataSourceStub#>()); |
| 116 | |
| 117 | REQUIRE_FALSEcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:128:11`!(ts.active()); |
| 118 | } |
| 119 | |
| 120 | SECTIONcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:149:11`!("Has value == 64 (25%) by default") |
| 121 | { |
| 122 | FanFixedTestAdaptercxx . . $ Tests/AMD/FanFixed/FanFixedTestAdapter# ts(stdcxx . . $ std/unique_ptr#unique_ptr(8bcafd3b0b660df8).::make_uniquecxx . . $ std/make_unique(5cd499e8540a10bb).<UIntDataSourceStubcxx . . $ UIntDataSourceStub#>(), |
| 123 | stdcxx . . $ std/unique_ptr#unique_ptr(8bcafd3b0b660df8).::make_uniquecxx . . $ std/make_unique(5cd499e8540a10bb).<UIntDataSourceStubcxx . . $ UIntDataSourceStub#>()); |
| 124 | |
| 125 | REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(ts.value() == 64); |
| 126 | } |
| 127 | |
| 128 | SECTIONcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:149:11`!("Clamp its value in [0, 255] range") |
| 129 | { |
| 130 | FanFixedTestAdaptercxx . . $ Tests/AMD/FanFixed/FanFixedTestAdapter# ts(stdcxx . . $ std/unique_ptr#unique_ptr(8bcafd3b0b660df8).::make_uniquecxx . . $ std/make_unique(5cd499e8540a10bb).<UIntDataSourceStubcxx . . $ UIntDataSourceStub#>(), |
| 131 | stdcxx . . $ std/unique_ptr#unique_ptr(8bcafd3b0b660df8).::make_uniquecxx . . $ std/make_unique(5cd499e8540a10bb).<UIntDataSourceStubcxx . . $ UIntDataSourceStub#>()); |
| 132 | |
| 133 | ts.valuecxx . . $ AMD/FanFixed#value(cb2f890c2fdad230).(300); |
| 134 | REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(ts.value() == 255); |
| 135 | } |
| 136 | |
| 137 | SECTIONcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:149:11`!("Has fan stop disabled by default") |
| 138 | { |
| 139 | FanFixedTestAdaptercxx . . $ Tests/AMD/FanFixed/FanFixedTestAdapter# ts(stdcxx . . $ std/unique_ptr#unique_ptr(8bcafd3b0b660df8).::make_uniquecxx . . $ std/make_unique(5cd499e8540a10bb).<UIntDataSourceStubcxx . . $ UIntDataSourceStub#>(), |
| 140 | stdcxx . . $ std/unique_ptr#unique_ptr(8bcafd3b0b660df8).::make_uniquecxx . . $ std/make_unique(5cd499e8540a10bb).<UIntDataSourceStubcxx . . $ UIntDataSourceStub#>()); |
| 141 | |
| 142 | REQUIRE_FALSEcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:128:11`!(ts.fanStop()); |
| 143 | } |
| 144 | |
| 145 | SECTIONcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:149:11`!("Has fan start value == 54 (21%) by default") |
| 146 | { |
| 147 | FanFixedTestAdaptercxx . . $ Tests/AMD/FanFixed/FanFixedTestAdapter# ts(stdcxx . . $ std/unique_ptr#unique_ptr(8bcafd3b0b660df8).::make_uniquecxx . . $ std/make_unique(5cd499e8540a10bb).<UIntDataSourceStubcxx . . $ UIntDataSourceStub#>(), |
| 148 | stdcxx . . $ std/unique_ptr#unique_ptr(8bcafd3b0b660df8).::make_uniquecxx . . $ std/make_unique(5cd499e8540a10bb).<UIntDataSourceStubcxx . . $ UIntDataSourceStub#>()); |
| 149 | |
| 150 | REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(ts.fanStartValue() == 54); |
| 151 | } |
| 152 | |
| 153 | SECTIONcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:149:11`!("Clamp its fan start value in [0, 255] range") |
| 154 | { |
| 155 | FanFixedTestAdaptercxx . . $ Tests/AMD/FanFixed/FanFixedTestAdapter# ts(stdcxx . . $ std/unique_ptr#unique_ptr(8bcafd3b0b660df8).::make_uniquecxx . . $ std/make_unique(5cd499e8540a10bb).<UIntDataSourceStubcxx . . $ UIntDataSourceStub#>(), |
| 156 | stdcxx . . $ std/unique_ptr#unique_ptr(8bcafd3b0b660df8).::make_uniquecxx . . $ std/make_unique(5cd499e8540a10bb).<UIntDataSourceStubcxx . . $ UIntDataSourceStub#>()); |
| 157 | |
| 158 | ts.fanStartValuecxx . . $ AMD/FanFixed#fanStartValue(cb2f890c2fdad230).(300); |
| 159 | REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(ts.fanStartValue() == 255); |
| 160 | } |
| 161 | |
| 162 | SECTIONcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:149:11`!("Does not generate pre-init control commands") |
| 163 | { |
| 164 | FanFixedTestAdaptercxx . . $ Tests/AMD/FanFixed/FanFixedTestAdapter# ts(stdcxx . . $ std/unique_ptr#unique_ptr(8bcafd3b0b660df8).::make_uniquecxx . . $ std/make_unique(5cd499e8540a10bb).<UIntDataSourceStubcxx . . $ UIntDataSourceStub#>(), |
| 165 | stdcxx . . $ std/unique_ptr#unique_ptr(8bcafd3b0b660df8).::make_uniquecxx . . $ std/make_unique(5cd499e8540a10bb).<UIntDataSourceStubcxx . . $ UIntDataSourceStub#>()); |
| 166 | ts.preInitcxx . . $ AMD/FanFixed#preInit(151e9138769f295e).(ctlCmds); |
| 167 | |
| 168 | REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(ctlCmds.commands().empty()); |
| 169 | } |
| 170 | |
| 171 | SECTIONcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:149:11`!("Does not generate post-init control commands") |
| 172 | { |
| 173 | FanFixedTestAdaptercxx . . $ Tests/AMD/FanFixed/FanFixedTestAdapter# ts(stdcxx . . $ std/unique_ptr#unique_ptr(8bcafd3b0b660df8).::make_uniquecxx . . $ std/make_unique(5cd499e8540a10bb).<UIntDataSourceStubcxx . . $ UIntDataSourceStub#>(), |
| 174 | stdcxx . . $ std/unique_ptr#unique_ptr(8bcafd3b0b660df8).::make_uniquecxx . . $ std/make_unique(5cd499e8540a10bb).<UIntDataSourceStubcxx . . $ UIntDataSourceStub#>()); |
| 175 | ts.postInitcxx . . $ AMD/FanFixed#postInit(151e9138769f295e).(ctlCmds); |
| 176 | |
| 177 | REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(ctlCmds.commands().empty()); |
| 178 | } |
| 179 | |
| 180 | SECTIONcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:149:11`!("Imports its state") |
| 181 | { |
| 182 | FanFixedTestAdaptercxx . . $ Tests/AMD/FanFixed/FanFixedTestAdapter# ts(stdcxx . . $ std/unique_ptr#unique_ptr(8bcafd3b0b660df8).::make_uniquecxx . . $ std/make_unique(5cd499e8540a10bb).<UIntDataSourceStubcxx . . $ UIntDataSourceStub#>(), |
| 183 | stdcxx . . $ std/unique_ptr#unique_ptr(8bcafd3b0b660df8).::make_uniquecxx . . $ std/make_unique(5cd499e8540a10bb).<UIntDataSourceStubcxx . . $ UIntDataSourceStub#>()); |
| 184 | FanFixedImporterStubcxx . . $ Tests/AMD/FanFixed/FanFixedImporterStub# icxx . . $ Tests/AMD/FanFixed/FanFixedImporterStub#FanFixedImporterStub(49f6e7a06ebc5aa8).; |
| 185 | i.valuecxx . . $ Tests/AMD/FanFixed/FanFixedImporterStub#value(ad81b86b0a2ae8f1).(100cxx . . $ units/unit_t#unit_t(2bd1d077c542d025).); |
| 186 | i.fanStartValuecxx . . $ Tests/AMD/FanFixed/FanFixedImporterStub#fanStartValue(ad81b86b0a2ae8f1).(50cxx . . $ units/unit_t#unit_t(2bd1d077c542d025).); |
| 187 | i.fanStopcxx . . $ Tests/AMD/FanFixed/FanFixedImporterStub#fanStop(b45ddcbc8423892c).(true); |
| 188 | |
| 189 | ts.importWithcxx . . $ Control#importWith(94eddebf9440278).(i); |
| 190 | |
| 191 | REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(ts.value() == 255); |
| 192 | REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(ts.fanStartValue() == 128); |
| 193 | REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(ts.fanStop()); |
| 194 | } |
| 195 | |
| 196 | SECTIONcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:149:11`!("Export its state") |
| 197 | { |
| 198 | FanFixedTestAdaptercxx . . $ Tests/AMD/FanFixed/FanFixedTestAdapter# ts(stdcxx . . $ std/unique_ptr#unique_ptr(8bcafd3b0b660df8).::make_uniquecxx . . $ std/make_unique(5cd499e8540a10bb).<UIntDataSourceStubcxx . . $ UIntDataSourceStub#>(), |
| 199 | stdcxx . . $ std/unique_ptr#unique_ptr(8bcafd3b0b660df8).::make_uniquecxx . . $ std/make_unique(5cd499e8540a10bb).<UIntDataSourceStubcxx . . $ UIntDataSourceStub#>()); |
| 200 | ts.valuecxx . . $ AMD/FanFixed#value(cb2f890c2fdad230).(128); |
| 201 | ts.fanStopcxx . . $ AMD/FanFixed#fanStop(b45ddcbc8423892c).(true); |
| 202 | ts.fanStartValuecxx . . $ AMD/FanFixed#fanStartValue(cb2f890c2fdad230).(128); |
| 203 | unitscxx . . $ units/::concentrationcxx . . $ units/concentration/::percent_tcxx . . $ units/concentration/percent_t# percentValuecxx . . $ units/unit_t#unit_t(2bd1d077c542d025).(50); |
| 204 | |
| 205 | FanFixedExporterMockcxx . . $ Tests/AMD/FanFixed/FanFixedExporterMock# e; |
| 206 | REQUIRE_CALLcxx . . $ `<external>/1068432606165018960/mock.hpp:4335:9`!(e, takeFanFixedValue(trompeloeil::_)).LR_WITHcxx . . $ `<external>/1068432606165018960/mock.hpp:4345:9`!(_1 == percentValue); |
| 207 | REQUIRE_CALLcxx . . $ `<external>/1068432606165018960/mock.hpp:4335:9`!(e, takeFanFixedFanStop(true)); |
| 208 | REQUIRE_CALLcxx . . $ `<external>/1068432606165018960/mock.hpp:4335:9`!(e, takeFanFixedFanStartValue(trompeloeil::_)) |
| 209 | .LR_WITHcxx . . $ `<external>/1068432606165018960/mock.hpp:4345:9`!(_1 == percentValue); |
| 210 | |
| 211 | ts.exportControlcxx . . $ AMD/FanFixed#exportControl(40299682ab9c8676).(e); |
| 212 | } |
| 213 | |
| 214 | SECTIONcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:149:11`!("Does not generate clean control commands") |
| 215 | { |
| 216 | FanFixedTestAdaptercxx . . $ Tests/AMD/FanFixed/FanFixedTestAdapter# ts(stdcxx . . $ std/unique_ptr#unique_ptr(8bcafd3b0b660df8).::make_uniquecxx . . $ std/make_unique(5cd499e8540a10bb).<UIntDataSourceStubcxx . . $ UIntDataSourceStub#>(), |
| 217 | stdcxx . . $ std/unique_ptr#unique_ptr(8bcafd3b0b660df8).::make_uniquecxx . . $ std/make_unique(5cd499e8540a10bb).<UIntDataSourceStubcxx . . $ UIntDataSourceStub#>()); |
| 218 | ts.cleanControlcxx . . $ AMD/FanFixed#cleanControl(151e9138769f295e).(ctlCmds); |
| 219 | |
| 220 | REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(ctlCmds.commands().empty()); |
| 221 | } |
| 222 | |
| 223 | SECTIONcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:149:11`!("Does not generate sync control commands when is synced") |
| 224 | { |
| 225 | FanFixedTestAdaptercxx . . $ Tests/AMD/FanFixed/FanFixedTestAdapter# ts(stdcxx . . $ std/unique_ptr#unique_ptr(8bcafd3b0b660df8).::make_uniquecxx . . $ std/make_unique(5cd499e8540a10bb).<UIntDataSourceStubcxx . . $ UIntDataSourceStub#>("pwm_enabled", 1), |
| 226 | stdcxx . . $ std/unique_ptr#unique_ptr(8bcafd3b0b660df8).::make_uniquecxx . . $ std/make_unique(5cd499e8540a10bb).<UIntDataSourceStubcxx . . $ UIntDataSourceStub#>("pwm", 128)); |
| 227 | ts.valuecxx . . $ AMD/FanFixed#value(cb2f890c2fdad230).(128); |
| 228 | |
| 229 | ts.syncControlcxx . . $ AMD/FanFixed#syncControl(151e9138769f295e).(ctlCmds); |
| 230 | REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(ctlCmds.commands().empty()); |
| 231 | } |
| 232 | |
| 233 | SECTIONcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:149:11`!("Does generate sync control commands when...") |
| 234 | { |
| 235 | SECTIONcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:149:11`!("pwm_enabled is out of sync") |
| 236 | { |
| 237 | FanFixedTestAdaptercxx . . $ Tests/AMD/FanFixed/FanFixedTestAdapter# ts( |
| 238 | stdcxx . . $ std/unique_ptr#unique_ptr(8bcafd3b0b660df8).::make_uniquecxx . . $ std/make_unique(5cd499e8540a10bb).<UIntDataSourceStubcxx . . $ UIntDataSourceStub#>("pwm_enabled", 0), |
| 239 | stdcxx . . $ std/unique_ptr#unique_ptr(8bcafd3b0b660df8).::make_uniquecxx . . $ std/make_unique(5cd499e8540a10bb).<UIntDataSourceStubcxx . . $ UIntDataSourceStub#>("pwm", 128)); |
| 240 | ts.valuecxx . . $ AMD/FanFixed#value(cb2f890c2fdad230).(128); |
| 241 | |
| 242 | ts.syncControlcxx . . $ AMD/FanFixed#syncControl(151e9138769f295e).(ctlCmds); |
| 243 | |
| 244 | REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(ctlCmds.commands().size() == 2); |
| 245 | |
| 246 | auto &[cmd0Path, cmd0Value] = ctlCmds.commandscxx . . $ CommandQueueStub#commands(f070559094366392).().frontcxx . . $ std/vector#front(af0004c3ce7cab93).(); |
| 247 | REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(cmd0Path == "pwm_enabled"); |
| 248 | REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(cmd0Value == "1"); |
| 249 | |
| 250 | auto &[cmd1Path, cmd1Value] = ctlCmds.commandscxx . . $ CommandQueueStub#commands(f070559094366392).().backcxx . . $ std/vector#back(af0004c3ce7cab93).(); |
| 251 | REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(cmd1Path == "pwm"); |
| 252 | REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(cmd1Value == "128"); |
| 253 | } |
| 254 | |
| 255 | SECTIONcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:149:11`!("pwm is out of sync") |
| 256 | { |
| 257 | FanFixedTestAdaptercxx . . $ Tests/AMD/FanFixed/FanFixedTestAdapter# ts( |
| 258 | stdcxx . . $ std/unique_ptr#unique_ptr(8bcafd3b0b660df8).::make_uniquecxx . . $ std/make_unique(5cd499e8540a10bb).<UIntDataSourceStubcxx . . $ UIntDataSourceStub#>("pwm_enabled", 1), |
| 259 | stdcxx . . $ std/unique_ptr#unique_ptr(8bcafd3b0b660df8).::make_uniquecxx . . $ std/make_unique(5cd499e8540a10bb).<UIntDataSourceStubcxx . . $ UIntDataSourceStub#>("pwm", 0)); |
| 260 | ts.valuecxx . . $ AMD/FanFixed#value(cb2f890c2fdad230).(128); |
| 261 | |
| 262 | ts.syncControlcxx . . $ AMD/FanFixed#syncControl(151e9138769f295e).(ctlCmds); |
| 263 | |
| 264 | REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(ctlCmds.commands().size() == 1); |
| 265 | |
| 266 | auto &[cmdPath, cmdValue] = ctlCmds.commandscxx . . $ CommandQueueStub#commands(f070559094366392).().frontcxx . . $ std/vector#front(af0004c3ce7cab93).(); |
| 267 | REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(cmdPath == "pwm"); |
| 268 | REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(cmdValue == "128"); |
| 269 | } |
| 270 | |
| 271 | SECTIONcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:149:11`!("pwm_enabled and pwm are out of sync") |
| 272 | { |
| 273 | FanFixedTestAdaptercxx . . $ Tests/AMD/FanFixed/FanFixedTestAdapter# ts( |
| 274 | stdcxx . . $ std/unique_ptr#unique_ptr(8bcafd3b0b660df8).::make_uniquecxx . . $ std/make_unique(5cd499e8540a10bb).<UIntDataSourceStubcxx . . $ UIntDataSourceStub#>("pwm_enabled", 0), |
| 275 | stdcxx . . $ std/unique_ptr#unique_ptr(8bcafd3b0b660df8).::make_uniquecxx . . $ std/make_unique(5cd499e8540a10bb).<UIntDataSourceStubcxx . . $ UIntDataSourceStub#>("pwm", 0)); |
| 276 | ts.valuecxx . . $ AMD/FanFixed#value(cb2f890c2fdad230).(128); |
| 277 | |
| 278 | ts.syncControlcxx . . $ AMD/FanFixed#syncControl(151e9138769f295e).(ctlCmds); |
| 279 | |
| 280 | REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(ctlCmds.commands().size() == 2); |
| 281 | |
| 282 | auto &[cmd0Path, cmd0Value] = ctlCmds.commandscxx . . $ CommandQueueStub#commands(f070559094366392).().frontcxx . . $ std/vector#front(af0004c3ce7cab93).(); |
| 283 | REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(cmd0Path == "pwm_enabled"); |
| 284 | REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(cmd0Value == "1"); |
| 285 | |
| 286 | auto &[cmd1Path, cmd1Value] = ctlCmds.commandscxx . . $ CommandQueueStub#commands(f070559094366392).().backcxx . . $ std/vector#back(af0004c3ce7cab93).(); |
| 287 | REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(cmd1Path == "pwm"); |
| 288 | REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(cmd1Value == "128"); |
| 289 | } |
| 290 | } |
| 291 | |
| 292 | SECTIONcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:149:11`!("Synced hw value uses fan start value when enabled") |
| 293 | { |
| 294 | FanFixedTestAdaptercxx . . $ Tests/AMD/FanFixed/FanFixedTestAdapter# ts(stdcxx . . $ std/unique_ptr#unique_ptr(8bcafd3b0b660df8).::make_uniquecxx . . $ std/make_unique(5cd499e8540a10bb).<UIntDataSourceStubcxx . . $ UIntDataSourceStub#>("pwm_enabled", 1), |
| 295 | stdcxx . . $ std/unique_ptr#unique_ptr(8bcafd3b0b660df8).::make_uniquecxx . . $ std/make_unique(5cd499e8540a10bb).<UIntDataSourceStubcxx . . $ UIntDataSourceStub#>("pwm", 20)); |
| 296 | ts.valuecxx . . $ AMD/FanFixed#value(cb2f890c2fdad230).(20); |
| 297 | ts.fanStartValuecxx . . $ AMD/FanFixed#fanStartValue(cb2f890c2fdad230).(30); |
| 298 | ts.fanStopcxx . . $ AMD/FanFixed#fanStop(b45ddcbc8423892c).(false); |
| 299 | |
| 300 | ts.syncControlcxx . . $ AMD/FanFixed#syncControl(151e9138769f295e).(ctlCmds); |
| 301 | |
| 302 | REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(ctlCmds.commands().empty()); |
| 303 | |
| 304 | ts.fanStopcxx . . $ AMD/FanFixed#fanStop(b45ddcbc8423892c).(true); |
| 305 | ts.syncControlcxx . . $ AMD/FanFixed#syncControl(151e9138769f295e).(ctlCmds); |
| 306 | |
| 307 | REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(ctlCmds.commands().size() == 1); |
| 308 | auto &[cmdPath, cmdValue] = ctlCmds.commandscxx . . $ CommandQueueStub#commands(f070559094366392).().frontcxx . . $ std/vector#front(af0004c3ce7cab93).(); |
| 309 | REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(cmdPath == "pwm"); |
| 310 | REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(cmdValue == "0"); |
| 311 | } |
| 312 | } |
| 313 | |
| 314 | } // namespace Tests::AMD::FanFixed |