45 lines
763 B
C++
45 lines
763 B
C++
|
/*
|
||
|
* Author: username
|
||
|
* Date: todays_date
|
||
|
* filename: test_Enable.c
|
||
|
* description: module_purpose
|
||
|
*/
|
||
|
|
||
|
|
||
|
|
||
|
#include "CppUTest/CommandLineTestRunner.h"
|
||
|
#include "CppUTestExt/MockSupport.h"
|
||
|
|
||
|
//This define allows us to dircetly include the device header without error.
|
||
|
#define _AVR_IO_H_
|
||
|
|
||
|
extern "C"
|
||
|
{
|
||
|
#include <iotn404.h>
|
||
|
#include "Enable.h"
|
||
|
#include "MockRegEdit.h"
|
||
|
}
|
||
|
|
||
|
TEST_GROUP(test_Enable)
|
||
|
{
|
||
|
void setup()
|
||
|
{
|
||
|
|
||
|
}
|
||
|
void teardown()
|
||
|
{
|
||
|
mock().checkExpectations();
|
||
|
mock().clear();
|
||
|
}
|
||
|
};
|
||
|
|
||
|
|
||
|
TEST(test_Enable, SetEnablePinsHighCallsCorrectFuncs)
|
||
|
{
|
||
|
mock().expectOneCall("RegEdit_SetBit")
|
||
|
.withPointerParameter("reg", (void *) &PORTA.DIR)
|
||
|
.withUnsignedIntParameter("bit_num", EN1);
|
||
|
|
||
|
Enable_SetPinsHigh();
|
||
|
}
|