Go to the documentation of this file.Go to the SVN repository for this file.
25 #include <freetds/convert.h>
26 #include <freetds/time.h>
40 fprintf(stderr,
"%d: Wrong results got '%s' expected '%s'\n", line,
out,
expected);
48 main(
int argc,
char **argv)
52 memset(&
dr, 0,
sizeof(
dr));
54 #define TEST(prec, fmt, exp) test(&dr, prec, fmt, exp, __LINE__)
59 TEST(3,
".%z",
".000");
60 dr.decimicrosecond = 1234567;
61 TEST(5,
".%z",
".12345");
62 TEST(4,
"%z",
"1234");
63 TEST(4,
"%z%%",
"1234%");
64 TEST(4,
"%z%H",
"123400");
71 TEST(0,
"%%%l",
"%12");
79 TEST(0,
"x%e",
"x 5");
std::ofstream out("events_result.xml")
main entry point for tests
static const char * expected[]
int strcmp(const char *str1, const char *str2)
int main(int argc, char **argv)
#define TEST(prec, fmt, exp)
static void test(const TDSDATEREC *dr, int prec, const char *fmt, const char *expected, int line)