msvcirt/tests: Simplify generating a pointer to address 0x1.

Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Michael Stefaniuc 2016-08-16 09:43:37 +02:00 committed by Alexandre Julliard
parent e248f530f3
commit ac2ad35d4d
1 changed files with 3 additions and 3 deletions

View File

@ -4509,7 +4509,7 @@ static void test_istream(void)
ok(ret == EOF, "expected -1 got %d\n", ret); ok(ret == EOF, "expected -1 got %d\n", ret);
ok(is1.count == 0, "expected 0 got %d\n", is1.count); ok(is1.count == 0, "expected 0 got %d\n", is1.count);
ok(is1.base_ios.state == IOSTATE_eofbit, "expected %d got %d\n", IOSTATE_eofbit, is1.base_ios.state); ok(is1.base_ios.state == IOSTATE_eofbit, "expected %d got %d\n", IOSTATE_eofbit, is1.base_ios.state);
ok(fb1.base.gptr == (char*) NULL + 1, "wrong get pointer, expected %p got %p\n", (char*) NULL + 1, fb1.base.gptr); ok(fb1.base.gptr == (char*) 1, "wrong get pointer, expected %p got %p\n", (char*) 1, fb1.base.gptr);
/* get_char */ /* get_char */
is1.count = 0xabababab; is1.count = 0xabababab;
@ -4552,14 +4552,14 @@ static void test_istream(void)
ok(is1.count == 0, "expected 0 got %d\n", is1.count); ok(is1.count == 0, "expected 0 got %d\n", is1.count);
ok(is1.base_ios.state == (IOSTATE_eofbit|IOSTATE_failbit), "expected %d got %d\n", ok(is1.base_ios.state == (IOSTATE_eofbit|IOSTATE_failbit), "expected %d got %d\n",
IOSTATE_eofbit|IOSTATE_failbit, is1.base_ios.state); IOSTATE_eofbit|IOSTATE_failbit, is1.base_ios.state);
ok(fb1.base.gptr == (char*) NULL + 1, "wrong get pointer, expected %p got %p\n", (char*) NULL + 1, fb1.base.gptr); ok(fb1.base.gptr == (char*) 1, "wrong get pointer, expected %p got %p\n", (char*) 1, fb1.base.gptr);
ok(c == EOF, "expected -1 got %d\n", c); ok(c == EOF, "expected -1 got %d\n", c);
is1.base_ios.state = IOSTATE_failbit; is1.base_ios.state = IOSTATE_failbit;
pis = call_func2(p_istream_get_char, &is1, NULL); pis = call_func2(p_istream_get_char, &is1, NULL);
ok(pis == &is1, "wrong return, expected %p got %p\n", &is1, pis); ok(pis == &is1, "wrong return, expected %p got %p\n", &is1, pis);
ok(is1.count == 0, "expected 0 got %d\n", is1.count); ok(is1.count == 0, "expected 0 got %d\n", is1.count);
ok(is1.base_ios.state == IOSTATE_failbit, "expected %d got %d\n", IOSTATE_failbit, is1.base_ios.state); ok(is1.base_ios.state == IOSTATE_failbit, "expected %d got %d\n", IOSTATE_failbit, is1.base_ios.state);
ok(fb1.base.gptr == (char*) NULL + 1, "wrong get pointer, expected %p got %p\n", (char*) NULL + 1, fb1.base.gptr); ok(fb1.base.gptr == (char*) 1, "wrong get pointer, expected %p got %p\n", (char*) 1, fb1.base.gptr);
/* get_sb */ /* get_sb */
is1.count = 0xabababab; is1.count = 0xabababab;