bool TestExtMath::test_pow() { VC(f_pow(2, 8), 256); VC(f_pow(-1, 20), 1); VS(f_pow(0, 0), 1); VERIFY(f_pow(2, 32).isInteger()); VC(f_pow("2", "8"), 256); VC(f_pow("-1", "20"), 1); VS(f_pow("0", "0"), 1); VERIFY(f_pow("2", "32").isInteger()); return Count(true); }
VC vc_get_vc(VCMAP& m, ADDRINT k) { VCMAP::iterator it = m.find(k); if(it != m.end()) { return it->second; } return VC(); }
static std::shared_ptr<AstNode> parse(ParseState &state) throw(ParseError) { state.parseCharInSpace('('); auto name_start = state.where(); while (!state.empty() && *state != ')' && VC(*state, state.where() > name_start)) { state.next(); } if (name_start == state.where()) { throw ParseError(state.where(), "Expected valid identifier."); } auto match = state.strFrom(name_start); state.parseCharInSpace(')'); return std::make_shared<CheckAuxStringNode<G1, G2, VC>>(match, state); }
bool TestExtMath::test_tan() { VC(f_tan(f_deg2rad(45)), 1); return Count(true); }
bool TestExtMath::test_sin() { VC(f_sin(f_deg2rad(90)), 1); return Count(true); }
bool TestExtMath::test_cos() { VC(f_cos(k_M_PI), -1); return Count(true); }
_updateGraphic(env, bd, width, height, rgbArray, x0, y0, x1, y1, buf); bd_unlock_osd_buffer(bd); } #define CC (char*)(uintptr_t) /* cast a literal from (const char*) */ #define VC (void*)(uintptr_t) /* cast function pointer to void* */ BD_PRIVATE CPP_EXTERN const JNINativeMethod Java_org_videolan_Libbluray_methods[] = { /* AUTOMATICALLY GENERATED */ { CC("getAacsDataN"), CC("(JI)[B"), VC(Java_org_videolan_Libbluray_getAacsDataN), }, { CC("getUOMaskN"), CC("(J)J"), VC(Java_org_videolan_Libbluray_getUOMaskN), }, { CC("setUOMaskN"), CC("(JZZ)V"), VC(Java_org_videolan_Libbluray_setUOMaskN), }, { CC("setKeyInterestN"), CC("(JI)V"), VC(Java_org_videolan_Libbluray_setKeyInterestN),
bool TestExtMath::test_atan2() { VC(f_atan2(3, 4), 0.64350110879328); return Count(true); }
bool TestExtMath::test_atan() { VC(f_atan(1), f_deg2rad(45)); return Count(true); }
bool TestExtMath::test_asin() { VC(f_asin(1), f_deg2rad(90)); return Count(true); }
bool TestExtMath::test_rad2deg() { VC(f_rad2deg(k_M_PI_4), 45); return Count(true); }
bool TestExtMath::test_deg2rad() { VC(f_deg2rad(45), k_M_PI_4); return Count(true); }
handle_extension(&data[14], size - 14); } } } static void handle_qrp(const char *data, size_t size) { (void) data; (void) size; } #define VC(a,b,c,d) ((uint32_t) ((a) << 24 | (b) << 16 | (c) << 8 | (d))) enum vendor_code { VC_BEAR = VC('B','E','A','R'), VC_GNUC = VC('G','N','U','C'), VC_GTKG = VC('G','T','K','G'), VC_LIME = VC('L','I','M','E'), VC_NULL = VC(0,0,0,0) }; static void handle_vmsg_oob_reply_ack(const struct gnutella_header *header, const char *data, size_t size) { (void) header; if (size < 9) { printf("Too short: %s\n", escape_buffer(data, size));
bool TestExtMath::test_acos() { VC(f_acos(-1), k_M_PI); return Count(true); }
bool TestExtMath::test_exp() { VC(f_exp(12), 162754.791419); VC(f_exp(5.7), 298.86740096706); return Count(true); }
bool TestExtMath::test_acosh() { VC(f_acosh(1.8567610569853), 1.23); return Count(true); }
bool TestExtMath::test_expm1() { VC(f_expm1(5.7), 297.8674); return Count(true); }
bool TestExtMath::test_asinh() { VC(f_asinh(1.5644684793044), 1.23); return Count(true); }
bool TestExtMath::test_log1p() { VC(f_log1p(9), 2.302585092994); VC(f_log1p(99), 4.6051701859881); return Count(true); }
bool TestExtMath::test_atanh() { VC(f_atanh(0.84257932565893), 1.23); return Count(true); }
bool TestExtMath::test_log() { VC(f_log(8), 2.0794415416798); VS(f_log(8, 2), 3.0); return Count(true); }
bool TestExtMath::test_pi() { VC(f_pi(), k_M_PI); return Count(true); }
} else { BD_DEBUG(DBG_BDJ | DBG_CRIT, "GetPrimitiveArrayCritical() failed\n"); } } } #define CC (char*)(uintptr_t) /* cast a literal from (const char*) */ #define VC (void*)(uintptr_t) /* cast function pointer to void* */ BD_PRIVATE CPP_EXTERN const JNINativeMethod Java_org_videolan_Libbluray_methods[] = { /* AUTOMATICALLY GENERATED */ { CC("getAacsDataN"), CC("(JI)[B"), VC(Java_org_videolan_Libbluray_getAacsDataN), }, { CC("getUOMaskN"), CC("(J)J"), VC(Java_org_videolan_Libbluray_getUOMaskN), }, { CC("setUOMaskN"), CC("(JZZ)V"), VC(Java_org_videolan_Libbluray_setUOMaskN), }, { CC("getTitleInfoN"), CC("(JI)Lorg/videolan/TitleInfo;"), VC(Java_org_videolan_Libbluray_getTitleInfoN),