2016-09-27 21:28:43 +00:00
|
|
|
#include <cxxtest/TestSuite.h>
|
2016-09-29 19:14:42 +00:00
|
|
|
#include "Mock.h"
|
2016-09-27 21:28:43 +00:00
|
|
|
#include "lib/SegmentDisplay.h"
|
|
|
|
|
|
|
|
class SegmentDisplayTestSuite : public CxxTest::TestSuite
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
void testBeginEnd(void)
|
|
|
|
{
|
|
|
|
SegmentDisplay* display = new SegmentDisplay();
|
|
|
|
display->begin();
|
|
|
|
display->end();
|
|
|
|
}
|
|
|
|
|
2016-09-29 19:14:42 +00:00
|
|
|
/*
|
2016-09-27 21:28:43 +00:00
|
|
|
void testWriteNumberFull(void)
|
|
|
|
{
|
2016-09-29 19:14:42 +00:00
|
|
|
SegmentDisplay* display = new SegmentDisplay();
|
|
|
|
display->begin();
|
|
|
|
|
|
|
|
display->setDigits(8);
|
|
|
|
display->writeNumber(12345678);
|
|
|
|
|
|
|
|
display->end();
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-09-27 21:28:43 +00:00
|
|
|
// TODO test writing the full 8-digit numbers
|
2016-09-29 19:14:42 +00:00
|
|
|
|
2016-09-27 21:28:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void testWriteTextFull(void)
|
|
|
|
{
|
|
|
|
// TODO test writing full length text
|
|
|
|
TS_WARN("Not implemented");
|
|
|
|
}
|
|
|
|
|
|
|
|
void testWriteNumberPartial(void)
|
|
|
|
{
|
|
|
|
// TODO test writing a partial 5-digit numbers
|
|
|
|
TS_WARN("Not implemented");
|
|
|
|
}
|
|
|
|
|
|
|
|
void testWriteTextPartial(void)
|
|
|
|
{
|
|
|
|
// TODO test writing partial text
|
|
|
|
TS_WARN("Not implemented");
|
|
|
|
}
|
|
|
|
|
|
|
|
void testWriteNumberOverflow(void)
|
|
|
|
{
|
|
|
|
// TODO test writing a number larger than 8 digits
|
|
|
|
TS_WARN("Not implemented");
|
|
|
|
}
|
|
|
|
|
|
|
|
void testWriteTextOverflow(void)
|
|
|
|
{
|
|
|
|
// TODO test writing text which is too long
|
|
|
|
TS_WARN("Not implemented");
|
|
|
|
}
|
2016-09-29 19:14:42 +00:00
|
|
|
*/
|
2016-09-27 21:28:43 +00:00
|
|
|
};
|