diff options
author | Dave Davenport <DaveDavenport@users.noreply.github.com> | 2019-08-08 20:02:20 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-08 20:02:20 +0200 |
commit | 618d1396eefea6ea26d954e44015c1fa422801f3 (patch) | |
tree | bd52799b1024ef97edcbbef6153108a1f44a95af /test | |
parent | d9eb9f25a16b3e95cfc32c3c1076caae58c0ceb1 (diff) |
Issue949 (#999)
* [Issue 949] Add initial split of listview row into widget tree.
Allowing better themeing.
* Remove unneeded code from textbox. allow dis. icons.
* Fix typo.
* Fix wrong widget offset in textbox.
* Fix mouse handling
* [ListView] Add 'fixed-columns' boolean option.
* [Listview] Fix inversion of option.
* [ListView] remove commented old code.
* [Textbox] Handle null pointer on desired width.
* [Listview] Fix crasher with fixed_columns and more max elements requested items.
* Add hack to get backwards compatibility for new listview structure.
* Fix the scrollbar test.
* Fix tests for theme update..
Diffstat (limited to 'test')
-rw-r--r-- | test/scrollbar-test.c | 1 | ||||
-rw-r--r-- | test/theme-parser-test.c | 22 |
2 files changed, 12 insertions, 11 deletions
diff --git a/test/scrollbar-test.c b/test/scrollbar-test.c index 367677df..4f73974e 100644 --- a/test/scrollbar-test.c +++ b/test/scrollbar-test.c @@ -34,6 +34,7 @@ #include <string.h> #include <widgets/scrollbar.h> #include <widgets/textbox.h> +#include <widgets/icon.h> #include <widgets/listview.h> #include <widgets/widget.h> #include <widgets/widget-internal.h> diff --git a/test/theme-parser-test.c b/test/theme-parser-test.c index 368a03c3..7a4402ec 100644 --- a/test/theme-parser-test.c +++ b/test/theme-parser-test.c @@ -125,7 +125,7 @@ START_TEST (test_core_empty_string ) { rofi_theme_parse_string ( ""); ck_assert_ptr_nonnull ( rofi_theme ); - ck_assert_ptr_null ( rofi_theme->widgets ); + //ck_assert_ptr_null ( rofi_theme->widgets ); ck_assert_ptr_null ( rofi_theme->properties ); ck_assert_ptr_null ( rofi_theme->parent ); ck_assert_str_eq ( rofi_theme->name, "Root" ); @@ -135,7 +135,7 @@ START_TEST (test_core_empty_global_section ) { rofi_theme_parse_string ( " * {}"); ck_assert_ptr_nonnull ( rofi_theme ); - ck_assert_ptr_null ( rofi_theme->widgets ); + //ck_assert_ptr_null ( rofi_theme->widgets ); ck_assert_ptr_null ( rofi_theme->properties ); ck_assert_ptr_null ( rofi_theme->parent ); ck_assert_str_eq ( rofi_theme->name, "Root" ); @@ -149,9 +149,9 @@ START_TEST (test_core_empty_section ) ck_assert_ptr_null ( rofi_theme->properties ); ck_assert_ptr_null ( rofi_theme->parent ); ck_assert_str_eq ( rofi_theme->name, "Root" ); - ck_assert_str_eq ( rofi_theme->widgets[0]->name, "test" ); - ck_assert_ptr_null ( rofi_theme->widgets[0]->properties ); - ck_assert_ptr_eq ( rofi_theme->widgets[0]->parent, rofi_theme ); + ck_assert_str_eq ( rofi_theme->widgets[3]->name, "test" ); + ck_assert_ptr_null ( rofi_theme->widgets[3]->properties ); + ck_assert_ptr_eq ( rofi_theme->widgets[3]->parent, rofi_theme ); } END_TEST START_TEST (test_core_error_root ) @@ -159,7 +159,7 @@ START_TEST (test_core_error_root ) rofi_theme_parse_string ( "Blaat"); ck_assert_int_eq ( error, 1 ); ck_assert_ptr_nonnull ( rofi_theme ); - ck_assert_ptr_null ( rofi_theme->widgets ); + //ck_assert_ptr_null ( rofi_theme->widgets ); ck_assert_ptr_null ( rofi_theme->properties ); ck_assert_ptr_null ( rofi_theme->parent ); const char *error_str = "<big><b>Error while parsing theme:</b></big> <i>Blaat</i>\n"\ @@ -181,7 +181,7 @@ START_TEST ( test_core_comments ) rofi_theme_parse_string ( "// Random comments\n// /*test */"); rofi_theme_parse_string ( "/* test \n*\n* /* aap */ */"); ck_assert_ptr_nonnull ( rofi_theme ); - ck_assert_ptr_null ( rofi_theme->widgets ); + //ck_assert_ptr_null ( rofi_theme->widgets ); ck_assert_ptr_null ( rofi_theme->properties ); ck_assert_ptr_null ( rofi_theme->parent ); ck_assert_str_eq ( rofi_theme->name, "Root" ); @@ -195,7 +195,7 @@ START_TEST ( test_core_newline ) { rofi_theme_parse_string ( "\r\n\n\r\n\n/*\r\n*/"); ck_assert_ptr_nonnull ( rofi_theme ); - ck_assert_ptr_null ( rofi_theme->widgets ); + //ck_assert_ptr_null ( rofi_theme->widgets ); ck_assert_ptr_null ( rofi_theme->properties ); ck_assert_ptr_null ( rofi_theme->parent ); ck_assert_str_eq ( rofi_theme->name, "Root" ); @@ -210,7 +210,7 @@ START_TEST(test_properties_boolean) /** Boolean property */ rofi_theme_parse_string ( "*{ test: true; test2:/* inline */false; }"); ck_assert_ptr_nonnull ( rofi_theme ); - ck_assert_ptr_null ( rofi_theme->widgets ); + //ck_assert_ptr_null ( rofi_theme->widgets ); ck_assert_ptr_nonnull ( rofi_theme->properties ); ck_assert_ptr_null ( rofi_theme->parent ); ck_assert_int_eq( rofi_theme_get_boolean ( &wid, "test", FALSE), TRUE ); @@ -1146,7 +1146,7 @@ START_TEST ( test_parse_file_empty ) { rofi_theme_parse_file ("/dev/null"); ck_assert_ptr_nonnull ( rofi_theme ); - ck_assert_ptr_null ( rofi_theme->widgets ); + //ck_assert_ptr_null ( rofi_theme->widgets ); ck_assert_ptr_null ( rofi_theme->properties ); ck_assert_ptr_null ( rofi_theme->parent ); ck_assert_str_eq ( rofi_theme->name, "Root" ); @@ -1168,7 +1168,7 @@ START_TEST ( test_import_empty) { rofi_theme_parse_string("@import \"/dev/null\""); ck_assert_ptr_nonnull ( rofi_theme ); - ck_assert_ptr_null ( rofi_theme->widgets ); + //ck_assert_ptr_null ( rofi_theme->widgets ); ck_assert_ptr_null ( rofi_theme->properties ); ck_assert_ptr_null ( rofi_theme->parent ); ck_assert_str_eq ( rofi_theme->name, "Root" ); |