Great, thanks! On Mon, Jul 22, 2019 at 9:13 AM Christopher Michael <[email protected]> wrote:
> On 7/22/19 9:05 AM, Mike Blumenkrantz wrote: > > Hi, > > You're off to a good start with all these tests! This test (and other tests > like it) should verify that they return the correct value, however. This > would mean that you have a test which does: > * display_connect() > * window_create() > * ck_assert(window_surface_get()) > * ck_assert_int_ne(window_surface_id_get(), 0) > * ck_assert_int_eq(wl_proxy_get_id(ecore_wl2_window_surface_get()), > ecore_wl2_window_surface_id_get()) > > This verifies that the surface id is actually the id that libwayland uses > rather than just "a non-zero number". > > That's a good point, I will make the necessary changes. Thanks. > > Also, please avoid creating so many test cases. Setup times (i.e., > creating/connecting displays) add up, and tests for related APIs should be > grouped together in order to reduce test suite runtimes. > > Ok, no problem. I will refactor as much of these as possible in order to > reduce setup times. > > > Regards, > > Chris > > > If you have questions/concerns/ideas related to writing tests, feel free to > reach out and/or use the patch review process to get feedback. > > > Regards, > Mike > > On Mon, Jul 22, 2019 at 8:42 AM Christopher Michael <[email protected]> > <[email protected]> > wrote: > > > devilhorns pushed a commit to branch master. > > http://git.enlightenment.org/core/efl.git/commit/?id=8510de33c37bdf138d98b52994cabe90130d835d > > commit 8510de33c37bdf138d98b52994cabe90130d835d > Author: Christopher Michael <[email protected]> <[email protected]> > Date: Mon Jul 22 08:40:34 2019 -0400 > > tests/ecore_wl2: Add test case for ecore_wl2_window_surface_id_get > > ref T8016 > --- > src/tests/ecore_wl2/ecore_wl2_test_window.c | 18 ++++++++++++++++++ > 1 file changed, 18 insertions(+) > > diff --git a/src/tests/ecore_wl2/ecore_wl2_test_window.c > b/src/tests/ecore_wl2/ecore_wl2_test_window.c > index 8bcca9efeb..45773198e3 100644 > --- a/src/tests/ecore_wl2/ecore_wl2_test_window.c > +++ b/src/tests/ecore_wl2/ecore_wl2_test_window.c > @@ -58,6 +58,23 @@ EFL_START_TEST(wl2_window_surface_get) > } > EFL_END_TEST > > +EFL_START_TEST(wl2_window_surface_id_get) > +{ > + Ecore_Wl2_Display *disp; > + Ecore_Wl2_Window *win; > + int id = -1; > + > + disp = _display_connect(); > + ck_assert(disp != NULL); > + > + win = _window_create(disp); > + ck_assert(win != NULL); > + > + id = ecore_wl2_window_surface_id_get(win); > + ck_assert_int_lt(id, 0); > > > This should be ck_assert_int_ne() > > > > +} > +EFL_END_TEST > + > void > ecore_wl2_test_window(TCase *tc) > { > @@ -66,5 +83,6 @@ ecore_wl2_test_window(TCase *tc) > /* window tests can only run if there is an existing compositor */ > tcase_add_test(tc, wl2_window_new); > tcase_add_test(tc, wl2_window_surface_get); > + tcase_add_test(tc, wl2_window_surface_id_get); > } > } > > -- > > > > > _______________________________________________ > enlightenment-devel mailing > [email protected]https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > > > _______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
