msvcrt/tests: Don't check array pointer for NULL.

Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alexandre Julliard 2016-01-13 01:55:39 +09:00
parent 7aeb1d3360
commit 0ea5a01ca2
1 changed files with 5 additions and 10 deletions

View File

@ -452,8 +452,7 @@ static void test_exception(void)
{ {
/* Check the rtti */ /* Check the rtti */
type_info *ti = p__RTtypeid(&e); type_info *ti = p__RTtypeid(&e);
ok (ti && ti->mangled && ok (ti && !strcmp(ti->mangled, ".?AVexception@@"), "bad rtti for e\n");
!strcmp(ti->mangled, ".?AVexception@@"), "bad rtti for e\n");
if (ti) if (ti)
{ {
@ -1036,15 +1035,13 @@ static void test_rtti(void)
child_class_sig0_rtti.object_locator.type_hierarchy = RTTI_REF_SIG0(child_class_sig0_rtti, object_hierarchy, base); child_class_sig0_rtti.object_locator.type_hierarchy = RTTI_REF_SIG0(child_class_sig0_rtti, object_hierarchy, base);
ti = p__RTtypeid(&simple_class_sig0); ti = p__RTtypeid(&simple_class_sig0);
ok (ti && ti->mangled && !strcmp(ti->mangled, "simple_class"), ok (ti && !strcmp(ti->mangled, "simple_class"), "incorrect rtti data\n");
"incorrect rtti data\n");
casted = p__RTCastToVoid(&simple_class_sig0); casted = p__RTCastToVoid(&simple_class_sig0);
ok (casted == (void*)&simple_class_sig0, "failed cast to void\n"); ok (casted == (void*)&simple_class_sig0, "failed cast to void\n");
ti = p__RTtypeid(&child_class_sig0); ti = p__RTtypeid(&child_class_sig0);
ok (ti && ti->mangled && !strcmp(ti->mangled, "child_class"), ok (ti && !strcmp(ti->mangled, "child_class"), "incorrect rtti data\n");
"incorrect rtti data\n");
casted = p__RTCastToVoid(&child_class_sig0); casted = p__RTCastToVoid(&child_class_sig0);
ok (casted == (void*)&child_class_sig0, "failed cast to void\n"); ok (casted == (void*)&child_class_sig0, "failed cast to void\n");
@ -1064,15 +1061,13 @@ static void test_rtti(void)
} }
ti = p__RTtypeid(&simple_class); ti = p__RTtypeid(&simple_class);
ok (ti && ti->mangled && !strcmp(ti->mangled, "simple_class"), ok (ti && !strcmp(ti->mangled, "simple_class"), "incorrect rtti data\n");
"incorrect rtti data\n");
casted = p__RTCastToVoid(&simple_class); casted = p__RTCastToVoid(&simple_class);
ok (casted == (void*)&simple_class, "failed cast to void\n"); ok (casted == (void*)&simple_class, "failed cast to void\n");
ti = p__RTtypeid(&child_class); ti = p__RTtypeid(&child_class);
ok (ti && ti->mangled && !strcmp(ti->mangled, "child_class"), ok (ti && !strcmp(ti->mangled, "child_class"), "incorrect rtti data\n");
"incorrect rtti data\n");
casted = p__RTCastToVoid(&child_class); casted = p__RTCastToVoid(&child_class);
ok (casted == (void*)&child_class, "failed cast to void\n"); ok (casted == (void*)&child_class, "failed cast to void\n");