Open mrdimfox opened 5 years ago
Not sure if you're still interested but you can implement something like this for a custom writer. My full source is here.
class UartWriter final : public utest::TestWriter {
public:
UartWriter(cal::Uart* uart) noexcept;
private:
virtual void write(const utest::TestString& str) noexcept override;
virtual void color(utest::TestColor c) noexcept override;
cal::Uart* m_uart;
};
I'm running into an issue though where my tests are run twice.
@mmwebster Hmm. Yes, thank you! That looks like exactly I want to.
I love your test util. It looks very great. But I have no idea how to use it! Can you write some docs, not only about a compiling but using the library for a testing?
For example, I want to redirect an output from stdout to ITM (it is much faster than a semihosting). How can I do it? Can I implement my own "TestWriter" or something? How can I pass it as an argument to TestRunner?