blob: 01583e34778f02cc75a37103a6ca73d7bfe57ea8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#include "dac.hpp"
#include <cstdint>
#include "catch2/catch.hpp"
#include "gpio_expander.hpp"
#include "i2c.hpp"
#include "i2c_fixture.hpp"
namespace drivers {
TEST_CASE("dac configuration", "[integration]") {
I2CFixture i2c;
GpioExpander expander;
cpp::result<AudioDac*, AudioDac::Error> dac_res = AudioDac::create(&expander);
REQUIRE(dac_res.has_value());
std::unique_ptr<AudioDac> dac(dac_res.value());
auto power_state = dac->ReadPowerState();
REQUIRE(power_state.first == true); // booted
}
} // namespace drivers
|