Lines Matching refs:parse_nsec

129 TEST(parse_nsec) {  in TEST()  argument
132 assert_se(parse_nsec("5s", &u) >= 0); in TEST()
134 assert_se(parse_nsec("5s500ms", &u) >= 0); in TEST()
136 assert_se(parse_nsec(" 5s 500ms ", &u) >= 0); in TEST()
138 assert_se(parse_nsec(" 5.5s ", &u) >= 0); in TEST()
140 assert_se(parse_nsec(" 5.5s 0.5ms ", &u) >= 0); in TEST()
142 assert_se(parse_nsec(" .22s ", &u) >= 0); in TEST()
144 assert_se(parse_nsec(" .50y ", &u) >= 0); in TEST()
146 assert_se(parse_nsec("2.5", &u) >= 0); in TEST()
148 assert_se(parse_nsec(".7", &u) >= 0); in TEST()
150 assert_se(parse_nsec("infinity", &u) >= 0); in TEST()
152 assert_se(parse_nsec(" infinity ", &u) >= 0); in TEST()
154 assert_se(parse_nsec("+3.1s", &u) >= 0); in TEST()
156 assert_se(parse_nsec("3.1s.2", &u) >= 0); in TEST()
158 assert_se(parse_nsec("3.1 .2s", &u) >= 0); in TEST()
160 assert_se(parse_nsec("3.1 sec .2 sec", &u) >= 0); in TEST()
162 assert_se(parse_nsec("3.1 sec 1.2 sec", &u) >= 0); in TEST()
165 assert_se(parse_nsec(" xyz ", &u) < 0); in TEST()
166 assert_se(parse_nsec("", &u) < 0); in TEST()
167 assert_se(parse_nsec(" . ", &u) < 0); in TEST()
168 assert_se(parse_nsec(" 5. ", &u) < 0); in TEST()
169 assert_se(parse_nsec(".s ", &u) < 0); in TEST()
170 assert_se(parse_nsec(" infinity .7", &u) < 0); in TEST()
171 assert_se(parse_nsec(".3 infinity", &u) < 0); in TEST()
172 assert_se(parse_nsec("-5s ", &u) < 0); in TEST()
173 assert_se(parse_nsec("-0.3s ", &u) < 0); in TEST()
174 assert_se(parse_nsec("-0.0s ", &u) < 0); in TEST()
175 assert_se(parse_nsec("-0.-0s ", &u) < 0); in TEST()
176 assert_se(parse_nsec("0.-0s ", &u) < 0); in TEST()
177 assert_se(parse_nsec("3.-0s ", &u) < 0); in TEST()
178 assert_se(parse_nsec(" infinity .7", &u) < 0); in TEST()
179 assert_se(parse_nsec(".3 infinity", &u) < 0); in TEST()
180 assert_se(parse_nsec("3.+1s", &u) < 0); in TEST()
181 assert_se(parse_nsec("3. 1s", &u) < 0); in TEST()
182 assert_se(parse_nsec("3.s", &u) < 0); in TEST()
183 assert_se(parse_nsec("12.34.56", &u) < 0); in TEST()
184 assert_se(parse_nsec("12..34", &u) < 0); in TEST()
185 assert_se(parse_nsec("..1234", &u) < 0); in TEST()
186 assert_se(parse_nsec("1234..", &u) < 0); in TEST()
187 assert_se(parse_nsec("1111111111111y", &u) == -ERANGE); in TEST()
188 assert_se(parse_nsec("1.111111111111y", &u) >= 0); in TEST()