MCPcopy Create free account
hub / github.com/FastLED/FastLED / checkHostDriversRegistered

Function checkHostDriversRegistered

tests/fl/channels/all_drivers.cpp:45–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43}
44
45void checkHostDriversRegistered(fl::ChannelManager& mgr) {
46 auto bitbang = mgr.getDriverByName(fl::string::from_literal("BIT_BANG"));
47 FL_REQUIRE(bitbang != nullptr);
48 FL_CHECK(bitbang->getName() == fl::string::from_literal("BIT_BANG"));
49 auto bitbangCaps = bitbang->getCapabilities();
50 FL_CHECK(bitbangCaps.supportsClockless);
51 FL_CHECK(bitbangCaps.supportsSpi);
52
53 auto stub = mgr.getDriverByName(fl::string::from_literal("STUB"));
54 FL_REQUIRE(stub != nullptr);
55 FL_CHECK(stub->getName() == fl::string::from_literal("STUB"));
56 auto stubCaps = stub->getCapabilities();
57 FL_CHECK(stubCaps.supportsClockless);
58 FL_CHECK(!stubCaps.supportsSpi);
59}
60
61} // namespace
62

Callers 1

FL_TEST_FILEFunction · 0.85

Calls 3

getDriverByNameMethod · 0.80
getNameMethod · 0.45
getCapabilitiesMethod · 0.45

Tested by

no test coverage detected