From 6a144f50083b2f66e47f7b6ccb75cfd01ab0e0a9 Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Thu, 27 Dec 2018 14:49:46 -0800 Subject: [PATCH] eo: add a test to enforce the upper limit of our base object size. Differential Revision: https://phab.enlightenment.org/D7523 --- src/tests/eo/suite/eo_test_general.c | 9 +++++++++ 1 file changed, 9 insertions(+) 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); }