| 288 | } |
| 289 | |
| 290 | int main() { |
| 291 | // low-level tools |
| 292 | { |
| 293 | uint8_t c = 0; |
| 294 | BOOST_TEST_EQ(detail::safe_increase(c), true); |
| 295 | BOOST_TEST_EQ(c, 1); |
| 296 | c = 255; |
| 297 | BOOST_TEST_EQ(detail::safe_increase(c), false); |
| 298 | BOOST_TEST_EQ(c, 255); |
| 299 | BOOST_TEST_EQ(detail::safe_assign(c, 255), true); |
| 300 | BOOST_TEST_EQ(detail::safe_assign(c, 256), false); |
| 301 | BOOST_TEST_EQ(c, 255); |
| 302 | c = 0; |
| 303 | BOOST_TEST_EQ(detail::safe_radd(c, 255), true); |
| 304 | BOOST_TEST_EQ(c, 255); |
| 305 | c = 1; |
| 306 | BOOST_TEST_EQ(detail::safe_radd(c, 255), false); |
| 307 | BOOST_TEST_EQ(c, 1); |
| 308 | c = 255; |
| 309 | BOOST_TEST_EQ(detail::safe_radd(c, 1), false); |
| 310 | BOOST_TEST_EQ(c, 255); |
| 311 | } |
| 312 | |
| 313 | // empty state |
| 314 | { |
| 315 | adaptive_storage_type a; |
| 316 | BOOST_TEST_EQ(a.size(), 0); |
| 317 | } |
| 318 | |
| 319 | // copy |
| 320 | { |
| 321 | copy_impl<detail::wcount>(); |
| 322 | copy_impl<void>(); |
| 323 | copy_impl<uint8_t>(); |
| 324 | copy_impl<uint16_t>(); |
| 325 | copy_impl<uint32_t>(); |
| 326 | copy_impl<uint64_t>(); |
| 327 | copy_impl<detail::mp_int>(); |
| 328 | } |
| 329 | |
| 330 | // equal_operator |
| 331 | { |
| 332 | equal_impl<void>(); |
| 333 | equal_impl<uint8_t>(); |
| 334 | equal_impl<uint16_t>(); |
| 335 | equal_impl<uint32_t>(); |
| 336 | equal_impl<uint64_t>(); |
| 337 | equal_impl<detail::mp_int>(); |
| 338 | equal_impl<detail::wcount>(); |
| 339 | } |
| 340 | |
| 341 | // increase_and_grow |
| 342 | { |
| 343 | increase_and_grow_impl<void>(); |
| 344 | increase_and_grow_impl<uint8_t>(); |
| 345 | increase_and_grow_impl<uint16_t>(); |
| 346 | increase_and_grow_impl<uint32_t>(); |
| 347 | increase_and_grow_impl<uint64_t>(); |
nothing calls this directly
no test coverage detected