3 #include "ntp_stdlib.h"
4 #include "ntp_calendar.h"
9 void test_RegularPositive(void);
10 void test_PositiveOverflowBoundary(void);
11 void test_PositiveOverflowBig(void);
12 void test_Negative(void);
13 void test_IllegalChar(void);
17 void test_RegularPositive(void) {
18 const char *str = "305";
21 TEST_ASSERT_TRUE(atouint(str, &actual));
22 TEST_ASSERT_EQUAL(305, actual);
25 void test_PositiveOverflowBoundary(void) {
26 const char *str = "4294967296";
29 TEST_ASSERT_FALSE(atouint(str, &actual));
32 void test_PositiveOverflowBig(void) {
33 const char *str = "8000000000";
36 TEST_ASSERT_FALSE(atouint(str, &actual));
39 void test_Negative(void) {
40 const char *str = "-1";
43 TEST_ASSERT_FALSE(atouint(str, &actual));
46 void test_IllegalChar(void) {
47 const char *str = "50c3";
50 TEST_ASSERT_FALSE(atouint(str, &actual));