awtk/tests/tab_button_group_test.cc

20 lines
690 B
C++
Raw Normal View History

#include "widgets/tab_button_group.h"
#include "gtest/gtest.h"
TEST(TabButtonGroup, cast) {
widget_t* w = tab_button_group_create(NULL, 10, 20, 30, 40);
ASSERT_EQ(w, tab_button_group_cast(w));
2019-07-11 09:11:35 +08:00
ASSERT_EQ(widget_get_prop_bool(w, WIDGET_PROP_COMPACT, FALSE), FALSE);
ASSERT_EQ(widget_get_prop_bool(w, WIDGET_PROP_SCROLLABLE, FALSE), FALSE);
ASSERT_EQ(widget_set_prop_bool(w, WIDGET_PROP_COMPACT, TRUE), FALSE);
ASSERT_EQ(widget_set_prop_bool(w, WIDGET_PROP_SCROLLABLE, TRUE), FALSE);
ASSERT_EQ(widget_get_prop_bool(w, WIDGET_PROP_COMPACT, FALSE), TRUE);
ASSERT_EQ(widget_get_prop_bool(w, WIDGET_PROP_SCROLLABLE, FALSE), TRUE);
widget_destroy(w);
2020-10-18 12:17:55 +08:00
idle_dispatch();
}