bool NBConnection::check(const NBEdgeCont& ec) { myFrom = checkFrom(ec); myTo = checkTo(ec); return myFrom != 0 && myTo != 0; }
void StringTestCase::testFrom() { checkFrom(0, "0"); checkFrom(1, "1"); checkFrom(-1, "-1"); checkFrom(2147483647, "2147483647"); checkFrom(1ULL, "1"); checkFrom(0ULL, "0"); checkFrom((uint64)UINT64_MAX, "18446744073709551615"); checkFrom('\0', ""); checkFrom('0', "0"); checkFrom('\xFF', "\xFF"); checkFrom('\n', "\n"); checkFrom(UINT32_MAX, 10, "4294967295"); checkFrom(UINT32_MAX, 16, "FFFFFFFF"); // This stuff is debatable; probably should return empty string for // unsupported bases. checkFrom(UINT32_MAX, 8, "4294967295"); checkFrom(UINT32_MAX, 2, "4294967295"); checkFrom(UINT32_MAX, 1, "4294967295"); checkFrom(UINT32_MAX, 0, "4294967295"); checkFrom(UINT32_MAX, -1, "4294967295"); checkFrom(UINT32_MAX, -2, "4294967295"); checkFrom(0, 10, "0"); checkFrom(0, 16, "0"); checkFrom(0, 0, "0"); checkFrom(1829304657, 10, "1829304657"); checkFrom(1829304657, 16, "6D08F951"); checkFrom(true, "1"); checkFrom(false, "0"); }