1 #include "g_libntptest.h"
3 class atouintTest : public libntptest {
6 TEST_F(atouintTest, RegularPositive) {
7 const char *str = "305";
10 ASSERT_TRUE(atouint(str, &actual));
11 EXPECT_EQ(305, actual);
14 TEST_F(atouintTest, PositiveOverflowBoundary) {
15 const char *str = "4294967296";
18 ASSERT_FALSE(atouint(str, &actual));
21 TEST_F(atouintTest, PositiveOverflowBig) {
22 const char *str = "8000000000";
25 ASSERT_FALSE(atouint(str, &actual));
28 TEST_F(atouintTest, Negative) {
29 const char *str = "-1";
32 ASSERT_FALSE(atouint(str, &actual));
35 TEST_F(atouintTest, IllegalChar) {
36 const char *str = "50c3";
39 ASSERT_FALSE(atouint(str, &actual));