84 lines
2.9 KiB
C
84 lines
2.9 KiB
C
/* AUTOGENERATED FILE. DO NOT EDIT. */
|
|
|
|
/*=======Test Runner Used To Run Each Test Below=====*/
|
|
#define RUN_TEST(TestFunc, TestLineNum) \
|
|
{ \
|
|
Unity.CurrentTestName = #TestFunc; \
|
|
Unity.CurrentTestLineNumber = TestLineNum; \
|
|
Unity.NumberOfTests++; \
|
|
if (TEST_PROTECT()) { \
|
|
setUp(); \
|
|
TestFunc(); \
|
|
} \
|
|
if (TEST_PROTECT()) { \
|
|
tearDown(); \
|
|
} \
|
|
UnityConcludeTest(); \
|
|
}
|
|
|
|
/*=======Automagically Detected Files To Include=====*/
|
|
#include "unity.h"
|
|
#include <setjmp.h>
|
|
#include <stdio.h>
|
|
|
|
/*======= Functions This Runner Calls=====*/
|
|
#include "set_calendar/set_calendar.h"
|
|
|
|
extern void *calendar_handler;
|
|
|
|
void setUp(void)
|
|
{
|
|
/* This is run before EACH TEST */
|
|
calendar_handler = CALENDAR();
|
|
}
|
|
|
|
void tearDown(void)
|
|
{
|
|
|
|
}
|
|
|
|
void test_calendar_pointer_verify(void)
|
|
{
|
|
TEST_ASSERT_NOT_NULL(calendar_handler);
|
|
}
|
|
|
|
void test_calendar_sec_value(void)
|
|
{
|
|
TEST_ASSERT_EQUAL(true, set_calendar_sec_value());
|
|
}
|
|
|
|
void test_calendar_min_value(void)
|
|
{
|
|
TEST_ASSERT_EQUAL(true, set_calendar_min_value());
|
|
}
|
|
|
|
void test_calendar_hour_value(void)
|
|
{
|
|
TEST_ASSERT_EQUAL(true, set_calendar_hour_value());
|
|
}
|
|
|
|
void test_calendar_alarm_value(void)
|
|
{
|
|
TEST_ASSERT_EQUAL(true, set_calendar_alarm_value());
|
|
}
|
|
|
|
/*=======Test Reset Option=====*/
|
|
void resetTest(void);
|
|
void resetTest(void)
|
|
{
|
|
tearDown();
|
|
setUp();
|
|
}
|
|
|
|
/*=======MAIN=====*/
|
|
int main(void)
|
|
{
|
|
UnityBegin("test/driver/calendar/test_calendar.c");
|
|
RUN_TEST(test_calendar_pointer_verify, __LINE__);
|
|
RUN_TEST(test_calendar_sec_value, __LINE__);
|
|
RUN_TEST(test_calendar_min_value, __LINE__);
|
|
RUN_TEST(test_calendar_hour_value, __LINE__);
|
|
RUN_TEST(test_calendar_alarm_value, __LINE__);
|
|
return (UnityEnd());
|
|
}
|