• Home
  • Raw
  • Download

Lines Matching refs:i

25   int i = 0;  in TEST()  local
26 ASSERT_FALSE(android::base::ParseInt("x", &i)); in TEST()
29 ASSERT_FALSE(android::base::ParseInt("123x", &i)); in TEST()
32 ASSERT_TRUE(android::base::ParseInt("123", &i)); in TEST()
33 ASSERT_EQ(123, i); in TEST()
35 i = 0; in TEST()
36 EXPECT_TRUE(android::base::ParseInt(" 123", &i)); in TEST()
37 EXPECT_EQ(123, i); in TEST()
38 ASSERT_TRUE(android::base::ParseInt("-123", &i)); in TEST()
39 ASSERT_EQ(-123, i); in TEST()
40 i = 0; in TEST()
41 EXPECT_TRUE(android::base::ParseInt(" -123", &i)); in TEST()
42 EXPECT_EQ(-123, i); in TEST()
48 ASSERT_TRUE(android::base::ParseInt("12", &i, 0, 15)); in TEST()
49 ASSERT_EQ(12, i); in TEST()
51 ASSERT_FALSE(android::base::ParseInt("-12", &i, 0, 15)); in TEST()
54 ASSERT_FALSE(android::base::ParseInt("16", &i, 0, 15)); in TEST()
68 unsigned int i = 0u; in TEST() local
69 ASSERT_FALSE(android::base::ParseUint("x", &i)); in TEST()
72 ASSERT_FALSE(android::base::ParseUint("123x", &i)); in TEST()
75 ASSERT_TRUE(android::base::ParseUint("123", &i)); in TEST()
76 ASSERT_EQ(123u, i); in TEST()
78 i = 0u; in TEST()
79 EXPECT_TRUE(android::base::ParseUint(" 123", &i)); in TEST()
80 EXPECT_EQ(123u, i); in TEST()
82 ASSERT_FALSE(android::base::ParseUint("-123", &i)); in TEST()
85 EXPECT_FALSE(android::base::ParseUint(" -123", &i)); in TEST()
92 ASSERT_TRUE(android::base::ParseUint("12", &i, 15u)); in TEST()
93 ASSERT_EQ(12u, i); in TEST()
95 ASSERT_FALSE(android::base::ParseUint("-12", &i, 15u)); in TEST()
98 ASSERT_FALSE(android::base::ParseUint("16", &i, 15u)); in TEST()
119 int i = 0; in TEST() local
120 ASSERT_TRUE(android::base::ParseInt("0123", &i)); in TEST()
121 ASSERT_EQ(123, i); in TEST()
129 int i = 0; in TEST() local
130 ASSERT_TRUE(android::base::ParseInt("0x123", &i)); in TEST()
131 ASSERT_EQ(0x123, i); in TEST()
132 i = 0; in TEST()
133 EXPECT_TRUE(android::base::ParseInt(" 0x123", &i)); in TEST()
134 EXPECT_EQ(0x123, i); in TEST()
145 int i = 0; in TEST() local
146 ASSERT_TRUE(android::base::ParseInt(std::string("123"), &i)); in TEST()
147 ASSERT_EQ(123, i); in TEST()
155 int i = 123; in TEST() local
156 ASSERT_FALSE(android::base::ParseInt("456x", &i)); in TEST()
157 ASSERT_EQ(123, i); in TEST()
165 uint64_t i = 0; in TEST() local
166 ASSERT_TRUE(android::base::ParseByteCount("123b", &i)); in TEST()
167 ASSERT_EQ(123ULL, i); in TEST()
169 ASSERT_TRUE(android::base::ParseByteCount("8k", &i)); in TEST()
170 ASSERT_EQ(8ULL * 1024, i); in TEST()
172 ASSERT_TRUE(android::base::ParseByteCount("8M", &i)); in TEST()
173 ASSERT_EQ(8ULL * 1024 * 1024, i); in TEST()
175 ASSERT_TRUE(android::base::ParseByteCount("6g", &i)); in TEST()
176 ASSERT_EQ(6ULL * 1024 * 1024 * 1024, i); in TEST()
178 ASSERT_TRUE(android::base::ParseByteCount("1T", &i)); in TEST()
179 ASSERT_EQ(1ULL * 1024 * 1024 * 1024 * 1024, i); in TEST()
181 ASSERT_TRUE(android::base::ParseByteCount("2p", &i)); in TEST()
182 ASSERT_EQ(2ULL * 1024 * 1024 * 1024 * 1024 * 1024, i); in TEST()
184 ASSERT_TRUE(android::base::ParseByteCount("4e", &i)); in TEST()
185 ASSERT_EQ(4ULL * 1024 * 1024 * 1024 * 1024 * 1024 * 1024, i); in TEST()