diff options
author | Tom Hacohen <tom@stosb.com> | 2013-11-26 12:26:30 +0000 |
---|---|---|
committer | Tom Hacohen <tom@stosb.com> | 2013-11-26 12:27:31 +0000 |
commit | 1b51bc256bc2a4aaeb3fe209709e435b6195af94 (patch) | |
tree | f1b50cfbd258067173c8c504027a494d867d6df7 /src | |
parent | 8bba92fbca7c721a7582b098698404e491f44941 (diff) | |
download | efl-1b51bc256bc2a4aaeb3fe209709e435b6195af94.tar.gz |
Evas tests: Add canvas free with ref tests.
This should check test for the issue fixed in:
bb4a19b5ad6a8fc6720154700aabfa32f4b71244
8bba92fbca7c721a7582b098698404e491f44941
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile_Evas.am | 1 | ||||
-rw-r--r-- | src/tests/evas/evas_suite.c | 1 | ||||
-rw-r--r-- | src/tests/evas/evas_suite.h | 1 | ||||
-rw-r--r-- | src/tests/evas/evas_test_object.c | 36 |
4 files changed, 39 insertions, 0 deletions
diff --git a/src/Makefile_Evas.am b/src/Makefile_Evas.am index 7a52016126..bb80008340 100644 --- a/src/Makefile_Evas.am +++ b/src/Makefile_Evas.am @@ -1582,6 +1582,7 @@ TESTS += tests/evas/evas_suite tests_evas_evas_suite_SOURCES = \ tests/evas/evas_suite.c \ tests/evas/evas_test_init.c \ +tests/evas/evas_test_object.c \ tests/evas/evas_test_textblock.c \ tests/evas/evas_test_text.c \ tests/evas/evas_test_callbacks.c \ diff --git a/src/tests/evas/evas_suite.c b/src/tests/evas/evas_suite.c index 057f0988ea..aa9841e1b1 100644 --- a/src/tests/evas/evas_suite.c +++ b/src/tests/evas/evas_suite.c @@ -19,6 +19,7 @@ struct _Evas_Test_Case static const Evas_Test_Case etc[] = { { "Evas", evas_test_init }, + { "Object", evas_test_object }, { "Object Textblock", evas_test_textblock }, { "Object Text", evas_test_text }, { "Callbacks", evas_test_callbacks }, diff --git a/src/tests/evas/evas_suite.h b/src/tests/evas/evas_suite.h index 98b24dec18..34ba0a63bd 100644 --- a/src/tests/evas/evas_suite.h +++ b/src/tests/evas/evas_suite.h @@ -4,6 +4,7 @@ #include <check.h> void evas_test_init(TCase *tc); +void evas_test_object(TCase *tc); void evas_test_textblock(TCase *tc); void evas_test_text(TCase *tc); void evas_test_callbacks(TCase *tc); diff --git a/src/tests/evas/evas_test_object.c b/src/tests/evas/evas_test_object.c new file mode 100644 index 0000000000..48770b72b1 --- /dev/null +++ b/src/tests/evas/evas_test_object.c @@ -0,0 +1,36 @@ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include <stdio.h> + +#include "evas_suite.h" +#include "Evas.h" +#include "evas_tests_helpers.h" + +START_TEST(evas_object_various) +{ + Evas *evas = EVAS_TEST_INIT_EVAS(); + + Evas_Object *obj = evas_object_rectangle_add(evas); + + evas_object_ref(obj); + evas_free(evas); + evas_object_unref(obj); + + evas = EVAS_TEST_INIT_EVAS(); + eo_ref(obj); + evas_free(evas); + eo_unref(obj); + + + /* Twice because EVAS_TEST_INIT_EVAS inits it twice. */ + evas_shutdown(); + evas_shutdown(); +} +END_TEST + +void evas_test_object(TCase *tc) +{ + tcase_add_test(tc, evas_object_various); +} |