aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2018-12-27 14:49:46 -0800
committerCedric BAIL <cedric.bail@free.fr>2019-01-09 11:02:07 -0800
commit6a144f50083b2f66e47f7b6ccb75cfd01ab0e0a9 (patch)
tree8f70aa4305322fc942a01b3d13622aa7cbab1ed1 /src
parenteo: add the ability to get the size of object of a certain class. (diff)
downloadefl-6a144f50083b2f66e47f7b6ccb75cfd01ab0e0a9.tar.gz
eo: add a test to enforce the upper limit of our base object size.
Differential Revision: https://phab.enlightenment.org/D7523
Diffstat (limited to 'src')
-rw-r--r--src/tests/eo/suite/eo_test_general.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/tests/eo/suite/eo_test_general.c b/src/tests/eo/suite/eo_test_general.c
index 603b14e836..889bfdd294 100644
--- a/src/tests/eo/suite/eo_test_general.c
+++ b/src/tests/eo/suite/eo_test_general.c
@@ -1788,6 +1788,14 @@ EFL_START_TEST(efl_object_auto_unref_test)
}
EFL_END_TEST
+EFL_START_TEST(efl_object_size)
+{
+ // This test is checking that we are not increasing the size of our object over time
+ // Update this number only if you modified the class size on purpose
+ ck_assert_int_le(efl_class_memory_size_get(SIMPLE_CLASS), 148);
+}
+EFL_END_TEST
+
void eo_test_general(TCase *tc)
{
tcase_add_test(tc, eo_simple);
@@ -1815,4 +1823,5 @@ void eo_test_general(TCase *tc)
tcase_add_test(tc, efl_cast_test);
tcase_add_test(tc, efl_object_destruct_test);
tcase_add_test(tc, efl_object_auto_unref_test);
+ tcase_add_test(tc, efl_object_size);
}