mirror of
https://gitlab.gnome.org/GNOME/libxml2
synced 2025-03-28 21:33:13 +00:00
first stb at unimplemnted detection fixing Windows code Daniel
* runsuite.c: first stb at unimplemnted detection * runtest.c: fixing Windows code Daniel
This commit is contained in:
parent
4ac5f9af14
commit
9083778967
@ -1,3 +1,8 @@
|
||||
Mon Jul 4 17:44:26 CEST 2005 Daniel Veillard <daniel@veillard.com>
|
||||
|
||||
* runsuite.c: first stb at unimplemnted detection
|
||||
* runtest.c: fixing Windows code
|
||||
|
||||
Mon Jul 4 17:19:31 CEST 2005 Daniel Veillard <daniel@veillard.com>
|
||||
|
||||
* runsuite.c: fix on schemas error
|
||||
|
17
runsuite.c
17
runsuite.c
@ -71,6 +71,7 @@ static int nb_tests = 0;
|
||||
static int nb_errors = 0;
|
||||
static int nb_internals = 0;
|
||||
static int nb_schematas = 0;
|
||||
static int nb_unimplemented = 0;
|
||||
static int nb_leaks = 0;
|
||||
static long libxmlMemoryAllocatedBase = 0;
|
||||
static int extraMemoryFromResolver = 0;
|
||||
@ -908,6 +909,14 @@ xstcTestGroup(xmlNodePtr cur, const char *base) {
|
||||
if (schemas == NULL) {
|
||||
test_log("valid schemas %s failed to parse\n",
|
||||
path);
|
||||
ret = 1;
|
||||
nb_errors++;
|
||||
}
|
||||
if ((ret == 0) && (strstr(testErrors, "nimplemented") != NULL)) {
|
||||
test_log("valid schemas %s hit an unimplemented block\n",
|
||||
path);
|
||||
ret = 1;
|
||||
nb_unimplemented++;
|
||||
nb_errors++;
|
||||
}
|
||||
instance = getNext(cur, "./ts:instanceTest[1]");
|
||||
@ -929,6 +938,14 @@ xstcTestGroup(xmlNodePtr cur, const char *base) {
|
||||
test_log("Failed to detect error in schemas %s\n",
|
||||
path);
|
||||
nb_errors++;
|
||||
ret = 1;
|
||||
}
|
||||
if ((ret == 0) && (strstr(testErrors, "nimplemented") != NULL)) {
|
||||
nb_unimplemented++;
|
||||
test_log("invalid schemas %s hit an unimplemented block\n",
|
||||
path);
|
||||
ret = 1;
|
||||
nb_errors++;
|
||||
}
|
||||
} else {
|
||||
test_log("testGroup line %ld misses unexpected validity value%s\n",
|
||||
|
20
runtest.c
20
runtest.c
@ -89,7 +89,7 @@ static int checkTestFile(const char *filename);
|
||||
|
||||
#if defined(_WIN32) && !defined(__CYGWIN__)
|
||||
|
||||
/* #include <windows.h> */
|
||||
#include <windows.h>
|
||||
|
||||
typedef struct
|
||||
{
|
||||
@ -109,9 +109,7 @@ static int glob(const char *pattern, int flags,
|
||||
|
||||
if ((pattern == NULL) || (pglob == NULL)) return(-1);
|
||||
|
||||
ret = malloc(sizeof(glob_t));
|
||||
if (ret == NULL)
|
||||
return(-1);
|
||||
ret = &pglob;
|
||||
memset(ret, 0, sizeof(glob_t));
|
||||
|
||||
hFind = FindFirstFileA(pattern, &FindFileData);
|
||||
@ -121,7 +119,6 @@ static int glob(const char *pattern, int flags,
|
||||
ret->gl_pathv = (char **) malloc(nb_paths * sizeof(char *));
|
||||
if (ret->gl_pathv == NULL) {
|
||||
FindClose(hFind);
|
||||
free(ret);
|
||||
return(-1);
|
||||
}
|
||||
ret->gl_pathv[ret->gl_pathc] = strdup(FindFileData.cFileName);
|
||||
@ -145,11 +142,13 @@ static int glob(const char *pattern, int flags,
|
||||
|
||||
done:
|
||||
FindClose(hFind);
|
||||
*pglob = ret;
|
||||
return(0);
|
||||
}
|
||||
void globfree(glob_t *pglob) {
|
||||
int i;
|
||||
|
||||
|
||||
|
||||
static void globfree(glob_t *pglob) {
|
||||
unsigned int i;
|
||||
if (pglob == NULL)
|
||||
return;
|
||||
|
||||
@ -160,6 +159,7 @@ void globfree(glob_t *pglob) {
|
||||
free(pglob);
|
||||
}
|
||||
#define vsnprintf _vsnprintf
|
||||
#define snprintf _snprintf
|
||||
#else
|
||||
#include <glob.h>
|
||||
#endif
|
||||
@ -3737,12 +3737,14 @@ testThread(void)
|
||||
#include <windows.h>
|
||||
#include <string.h>
|
||||
|
||||
#define TEST_REPEAT_COUNT 500
|
||||
|
||||
static HANDLE tid[MAX_ARGC];
|
||||
|
||||
static DWORD WINAPI
|
||||
win32_thread_specific_data(void *private_data)
|
||||
{
|
||||
return((DWORD) thread_specific_data());
|
||||
return((DWORD) thread_specific_data(private_data));
|
||||
}
|
||||
|
||||
static int
|
||||
|
Loading…
x
Reference in New Issue
Block a user