mirror of
https://gitee.com/zlgopen/awtk.git
synced 2024-11-30 02:58:26 +08:00
improve typecheck
This commit is contained in:
parent
4271ad17ed
commit
a62c9303b2
@ -2002,6 +2002,10 @@ bool_t widget_is_instance_of(widget_t* widget, const widget_vtable_t* vt) {
|
||||
|
||||
iter = iter->parent;
|
||||
}
|
||||
|
||||
#ifdef WITH_WIDGET_TYPE_CHECK
|
||||
return FALSE;
|
||||
#else
|
||||
log_warn("%s is not instance of %s\n", widget->vt->type, vt->type);
|
||||
return TRUE;
|
||||
#endif/*WITH_WIDGET_TYPE_CHECK*/
|
||||
}
|
||||
|
@ -39,8 +39,3 @@ TEST(Dialog, cast) {
|
||||
widget_destroy(w);
|
||||
}
|
||||
|
||||
TEST(Dialog, invalid_modal) {
|
||||
widget_t* w = window_create(NULL, 10, 20, 30, 40);
|
||||
ASSERT_EQ(dialog_modal(w), RET_BAD_PARAMS);
|
||||
widget_destroy(w);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user