On Thu, Dec 15, 2016 at 9:24 PM, Cedric BAIL <cedric.b...@free.fr> wrote: > cedric pushed a commit to branch master. > > http://git.enlightenment.org/core/efl.git/commit/?id=0ff7bf3611d3769d2da0bc2521586dc285d5765e > > commit 0ff7bf3611d3769d2da0bc2521586dc285d5765e > Author: Cedric BAIL <ced...@osg.samsung.com> > Date: Thu Dec 15 15:00:58 2016 -0800 > > eina: add a test for eina_stringshare_refplace. > --- > src/tests/eina/eina_test_stringshare.c | 36 > ++++++++++++++++++++++++++++++++++ > 1 file changed, 36 insertions(+) > > diff --git a/src/tests/eina/eina_test_stringshare.c > b/src/tests/eina/eina_test_stringshare.c > index 02e5c81..0aa1beb 100644 > --- a/src/tests/eina/eina_test_stringshare.c > +++ b/src/tests/eina/eina_test_stringshare.c > @@ -66,6 +66,41 @@ START_TEST(eina_stringshare_simple) > } > END_TEST > > +START_TEST(eina_stringshare_simple_refplace) > +{ > + const char *t0; > + const char *t1; > + Eina_Slice slice; > + > + eina_init(); > + > + t0 = eina_stringshare_add(TEST0); > + t1 = eina_stringshare_add(TEST1); > + > + fail_if(t0 == NULL); > + fail_if(t1 == NULL); > + fail_if(strcmp(t0, TEST0) != 0); > + fail_if(strcmp(t1, TEST1) != 0); > + fail_if((int)strlen(TEST0) != eina_stringshare_strlen(t0)); > + fail_if((int)strlen(TEST1) != eina_stringshare_strlen(t1));
see, these things I was talking about the other day. ck_assert_str_eq() and ck_assert_int_eq() are as simple and produces much better results. http://check.sourceforge.net/doc/check_html/check_4.html -- Gustavo Sverzut Barbieri -------------------------------------- Mobile: +55 (16) 99354-9890 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel