mirror of
https://github.com/weechat/weechat.git
synced 2026-06-12 14:14:48 +02:00
tests: add tests on function gui_buffer_valid
This commit is contained in:
@@ -469,7 +469,22 @@ TEST(GuiBuffer, UserSetCallbacks)
|
||||
|
||||
TEST(GuiBuffer, Valid)
|
||||
{
|
||||
/* TODO: write tests */
|
||||
struct t_gui_buffer *buffer;
|
||||
|
||||
buffer = gui_buffer_new (NULL, TEST_BUFFER_NAME,
|
||||
&test_buffer_input_cb, NULL, NULL,
|
||||
&test_buffer_close_cb, NULL, NULL);
|
||||
|
||||
LONGS_EQUAL(0, gui_buffer_valid ((struct t_gui_buffer *)0x1));
|
||||
LONGS_EQUAL(0, gui_buffer_valid (buffer + 1));
|
||||
|
||||
/* NULL pointer is considered valid: to print on core buffer */
|
||||
LONGS_EQUAL(1, gui_buffer_valid (NULL));
|
||||
|
||||
LONGS_EQUAL(1, gui_buffer_valid (gui_buffers));
|
||||
LONGS_EQUAL(1, gui_buffer_valid (buffer));
|
||||
|
||||
gui_buffer_close (buffer);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user