diff options
author | Waldemar Brodkorb <wbx@uclibc-ng.org> | 2016-10-28 20:29:21 +0200 |
---|---|---|
committer | Waldemar Brodkorb <wbx@uclibc-ng.org> | 2016-10-28 20:31:55 +0200 |
commit | 99ef2719fb3d703fe38c4113cd7f5adec516dd3a (patch) | |
tree | 2c1f77cb41b60ccbf8faa77a3640491a3546b546 /test/time/tst-ctime.c | |
parent | 543308f6c46cf2edf8a524bc9c631e472570fe72 (diff) |
test: remove test suite
The test suite is now a developed in a separate git repository.
See here:
http://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng-test.git
The test suite should be just like every other software compiled
with the cross-toolchain. In the past strange problems where found
when the test suite got build in the toolchain creation step.
Diffstat (limited to 'test/time/tst-ctime.c')
-rw-r--r-- | test/time/tst-ctime.c | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/test/time/tst-ctime.c b/test/time/tst-ctime.c deleted file mode 100644 index 91d827aa2..000000000 --- a/test/time/tst-ctime.c +++ /dev/null @@ -1,44 +0,0 @@ -/* vi: set sw=4 ts=4: */ -/* testcase for ctime(3) with large time - * Copyright (C) 2010 David A Ramos <daramos@gustav.stanford.edu> - * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball. - */ - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <time.h> - -#define MAX_POSITIVE(type) (~0 & ~((type) 1 << (sizeof(type)*8 - 1))) - -int do_test(int argc, char **argv) { - char *correct = 0, *s; - int status; - - /* need a very high positive number (e.g., max - 1024) */ - time_t test = MAX_POSITIVE(time_t) - 1024; - - s = asctime(localtime(&test)); - - if (s) { - // copy static buffer to heap - correct = malloc(strlen(s)+1); - strcpy(correct, s); - } - - s = ctime(&test); - - printf("ANSI:\t%suClibc:\t%s", correct, s); - - if (s != correct && strcmp(correct, s)) - status = EXIT_FAILURE; - else - status = EXIT_SUCCESS; - - if (correct) - free(correct); - - return status; -} - -#include <test-skeleton.c> |