Go to the SVN repository for this file.
24 #include <freetds/convert.h> 77 "0x8000'0000'0000'0000",
78 "0x1'0000'0000'0000'0000",
83 main(
intargc,
char**argv)
87setbuf(stdout,
NULL);
88setbuf(stderr,
NULL);
138 for(
i= 0;
i< 2; ++
i) {
144printf(
"Testing conversions from %s for number %s\n",
tds_prtype(srctype), s_num);
152 for(diff = -10; diff <= 10; ++diff) {
153 boolvalid_src, valid_dest;
154 intdesttype =
t->type;
161valid_src =
is_valid(s_num, srctype, &cr_src);
171cr_src.
n.
array[0] = 1;
189 if(valid_dest != (
result>= 0)) {
190fprintf(stderr,
"Unmatch results from %s to %s for %s\n" 191 "results %d (from string) %d (from source type)\n",
193valid_dest, (
result>= 0));
252 for(shift = 0; ; ++shift) {
260 return((
int64_t) 1) << (shift ? shift - 1 : shift);
284 for(; bdigits >= 0; --bdigits) {
static const char * bounds[]
int main(int argc, char **argv)
static const type_desc number_types[]
static bool is_valid(const char *num, int type, CONV_RESULT *cr)
static double convert_to_float(smp n, int type)
static int64_t get_float_precision_factor(smp n, int type)
static void double_to_string(char *out, double d)
static TDS_INT convert_and_free(int srctype, const void *src, TDS_UINT srclen, int desttype, CONV_RESULT *cr)
static void real_test(smp n, int type, bool is_integer)
std::ofstream out("events_result.xml")
main entry point for tests
#define TDS_CONVERT_OVERFLOW
tds_sysdep_int32_type TDS_INT
tds_sysdep_real64_type TDS_FLOAT
tds_sysdep_real32_type TDS_REAL
tds_sysdep_uint32_type TDS_UINT
#define tds_alloc_context
where boath are integers</td > n< td ></td > n</tr > n< tr > n< td > tse</td > n< td > optional</td > n< td > String</td > n< td class=\"description\"> TSE option controls what blob is orig
T bound(T x_, T xlo_, T xhi_)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4