mirror of
https://github.com/reactos/reactos.git
synced 2025-03-01 03:45:16 +00:00
[MSVCRT_WINETEST] Add checks to not crash on reactos
This commit is contained in:
parent
748fdbcd6a
commit
4a63e19e47
3 changed files with 22 additions and 0 deletions
|
@ -627,6 +627,9 @@ static void test_setlocale(void)
|
||||||
if(IsValidCodePage(atoi(buf))) {
|
if(IsValidCodePage(atoi(buf))) {
|
||||||
ret = setlocale(LC_ALL, ".OCP");
|
ret = setlocale(LC_ALL, ".OCP");
|
||||||
ok(ret != NULL, "ret == NULL\n");
|
ok(ret != NULL, "ret == NULL\n");
|
||||||
|
#ifdef __REACTOS__
|
||||||
|
if (ret == NULL) ptr = NULL; else
|
||||||
|
#endif
|
||||||
ptr = strchr(ret, '.');
|
ptr = strchr(ret, '.');
|
||||||
ok(ptr && !strcmp(ptr + 1, buf), "ret %s, buf %s.\n", ret, buf);
|
ok(ptr && !strcmp(ptr + 1, buf), "ret %s, buf %s.\n", ret, buf);
|
||||||
}
|
}
|
||||||
|
@ -636,6 +639,9 @@ static void test_setlocale(void)
|
||||||
len = sprintf(buf, "%d", GetACP());
|
len = sprintf(buf, "%d", GetACP());
|
||||||
ret = setlocale(LC_ALL, ".ACP");
|
ret = setlocale(LC_ALL, ".ACP");
|
||||||
ok(ret != NULL, "ret == NULL\n");
|
ok(ret != NULL, "ret == NULL\n");
|
||||||
|
#ifdef __REACTOS__
|
||||||
|
if (ret == NULL) ptr = NULL; else
|
||||||
|
#endif
|
||||||
ptr = strchr(ret, '.');
|
ptr = strchr(ret, '.');
|
||||||
ok(ptr && !strncmp(ptr + 1, buf, len), "ret %s, buf %s.\n", ret, buf);
|
ok(ptr && !strncmp(ptr + 1, buf, len), "ret %s, buf %s.\n", ret, buf);
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <process.h>
|
#include <process.h>
|
||||||
|
#include <versionhelpers.h>
|
||||||
|
|
||||||
static inline BOOL almost_equal(double d1, double d2) {
|
static inline BOOL almost_equal(double d1, double d2) {
|
||||||
if(d1-d2>-1e-30 && d1-d2<1e-30)
|
if(d1-d2>-1e-30 && d1-d2<1e-30)
|
||||||
|
@ -393,6 +394,13 @@ static void test__popen(const char *name)
|
||||||
ret = fputs("child-to-parent\n", pipe);
|
ret = fputs("child-to-parent\n", pipe);
|
||||||
ok(ret != EOF, "fputs returned %x\n", ret);
|
ok(ret != EOF, "fputs returned %x\n", ret);
|
||||||
|
|
||||||
|
#ifdef __REACTOS__
|
||||||
|
if (IsReactOS())
|
||||||
|
{
|
||||||
|
skip("Skipping _pclose, because it hangs on reactos\n");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
ret = _pclose(pipe);
|
ret = _pclose(pipe);
|
||||||
ok(ret == 0x3, "_pclose returned %x, expected 0x3\n", ret);
|
ok(ret == 0x3, "_pclose returned %x, expected 0x3\n", ret);
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,6 +37,7 @@
|
||||||
#include "winbase.h"
|
#include "winbase.h"
|
||||||
#include "winnls.h"
|
#include "winnls.h"
|
||||||
#include "winuser.h"
|
#include "winuser.h"
|
||||||
|
#include <versionhelpers.h>
|
||||||
|
|
||||||
static char *buf_to_string(const unsigned char *bin, int len, int nr)
|
static char *buf_to_string(const unsigned char *bin, int len, int nr)
|
||||||
{
|
{
|
||||||
|
@ -2117,6 +2118,13 @@ static void test__strtod(void)
|
||||||
|
|
||||||
for (i=0; i<ARRAY_SIZE(tests); i++)
|
for (i=0; i<ARRAY_SIZE(tests); i++)
|
||||||
{
|
{
|
||||||
|
#ifdef __REACTOS__
|
||||||
|
if ((i == 19) && IsReactOS())
|
||||||
|
{
|
||||||
|
skip("Skipping i == 19, because it crashes on ReactOS\n");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
errno = 0xdeadbeef;
|
errno = 0xdeadbeef;
|
||||||
d = strtod(tests[i].str, &end);
|
d = strtod(tests[i].str, &end);
|
||||||
ok(d == tests[i].ret, "%d) d = %.16e\n", i, d);
|
ok(d == tests[i].ret, "%d) d = %.16e\n", i, d);
|
||||||
|
|
Loading…
Reference in a new issue