summaryrefslogtreecommitdiffstats
path: root/test/gpio.cpp
blob: cf01a0a5d1bc4ecfca583fc595cf8023b657da7a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include "gpio_mock.hpp"

#include <memory>
#include <string>

// Set this before each test that hits a call to getEnv().
GpioHandleInterface* gpioIntf;

namespace gpio
{

std::unique_ptr<gpioplus::HandleInterface>
    BuildGpioHandle(const std::string& gpiochip, const std::string& line)
{
    return (gpioIntf) ? gpioIntf->build(gpiochip, line) : nullptr;
}

} // namespace gpio
OpenPOWER on IntegriCloud