This is an automated email from the git hooks/post-receive script.

git pushed a commit to reference refs/pull/114/head
in repository efl.

View the commit online.

commit a9c3a931d3bab4521177195b7a05ecf56922a8d3
Author: [email protected] <[email protected]>
AuthorDate: Sun Sep 13 20:43:42 2026 -0600

    tests: apply the review style rules to the branch's unit tests
    
    The earlier review-fix sweeps covered the library and engine code but
    skipped src/tests. The review tools report the same issues in the unit
    tests this branch adds, so fix them there too:
    
    - Parenthesize mixed-precedence expressions, as EFL does elsewhere:
      15 found through the clang AST in ector_test_grad_atlas.c,
      ector_test_span_collector.c and evas_test_vg.c, plus 3 inside
      ck_assert arguments that clang cannot see through the macros.
    - Align a continuation line in ector_test_span_collector.c under its
      open parenthesis; it was one column to the right.
    
    The clang-driven change was verified to add only parentheses. The build
    is clean, and ector_suite and evas_suite pass.
    
    Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
---
 src/tests/ector/suite/ector_test_grad_atlas.c     | 10 +++++-----
 src/tests/ector/suite/ector_test_span_collector.c | 14 +++++++-------
 src/tests/evas/evas_test_vg.c                     |  4 ++--
 3 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/src/tests/ector/suite/ector_test_grad_atlas.c b/src/tests/ector/suite/ector_test_grad_atlas.c
index 75c509cc27..fc7cf10a2a 100644
--- a/src/tests/ector/suite/ector_test_grad_atlas.c
+++ b/src/tests/ector/suite/ector_test_grad_atlas.c
@@ -40,11 +40,11 @@ _fill_ramp(uint8_t *buf, uint32_t seed)
 {
    for (int i = 0; i < SPAN_GRAD_ATLAS_W; i++)
      {
-        uint32_t v = seed * 2654435761u + (uint32_t)i;
-        buf[i*4 + 0] = (uint8_t)(v >>  0);
-        buf[i*4 + 1] = (uint8_t)(v >>  8);
-        buf[i*4 + 2] = (uint8_t)(v >> 16);
-        buf[i*4 + 3] = (uint8_t)(v >> 24);
+        uint32_t v = (seed * 2654435761u) + (uint32_t)i;
+        buf[(i*4) + 0] = (uint8_t)(v >>  0);
+        buf[(i*4) + 1] = (uint8_t)(v >>  8);
+        buf[(i*4) + 2] = (uint8_t)(v >> 16);
+        buf[(i*4) + 3] = (uint8_t)(v >> 24);
      }
 }
 
diff --git a/src/tests/ector/suite/ector_test_span_collector.c b/src/tests/ector/suite/ector_test_span_collector.c
index bd5a12cd46..1df326b834 100644
--- a/src/tests/ector/suite/ector_test_span_collector.c
+++ b/src/tests/ector/suite/ector_test_span_collector.c
@@ -107,7 +107,7 @@ _reconstruct_spans(Span_Texture *tex, int y, int stride, int max_ent,
         abs_x += gap;
 
         // Gap extender: cov==0, len==1 - advances position, not a real span.
-        if (cov == 0 && len == 1)
+        if ((cov == 0) && (len == 1))
           {
              abs_x += len;
              continue;
@@ -360,7 +360,7 @@ EFL_START_TEST(span_collector_gap_extender)
 
    // Reconstruct absolute x: both real spans must land at the right positions
    rcount = _reconstruct_spans(&sc->textures[0], 5, sc->stride,
-                                sc->max_spans, rx, rl, 8);
+                               sc->max_spans, rx, rl, 8);
    ck_assert_int_eq(rcount, 2);
    ck_assert_int_eq(rx[0],  10);
    ck_assert_int_eq(rl[0],   5);
@@ -427,7 +427,7 @@ EFL_START_TEST(span_collector_overflow_split)
         int n;
         n = _reconstruct_spans(&sc->textures[i], 5, sc->stride,
                                sc->max_spans, t_rx, t_rl, 16);
-        while (n > 0 && all_count < 16)
+        while ((n > 0) && (all_count < 16))
           {
              rx[all_count] = t_rx[n - 1];
              rl[all_count] = t_rl[n - 1];
@@ -456,7 +456,7 @@ EFL_START_TEST(span_collector_overflow_split)
         {
            for (k = 0; k < all_count; k++)
              {
-                if (rx[k] == orig_x[j] && rl[k] == 5)
+                if ((rx[k] == orig_x[j]) && (rl[k] == 5))
                   {
                      found[j] = 1;
                      break;
@@ -531,7 +531,7 @@ EFL_START_TEST(span_collector_split_absolute_x)
         {
            for (k = 0; k < all_count; k++)
              {
-                if (rx[k] == orig_x[j] && rl[k] == 5)
+                if ((rx[k] == orig_x[j]) && (rl[k] == 5))
                   {
                      found[j] = 1;
                      break;
@@ -734,11 +734,11 @@ EFL_START_TEST(span_collector_solid_row_terminator)
    // a strided memset of the full row for every row of every shape, and no
    // consumer ever reads past the terminator, so those bytes only had to be
    // erased to satisfy a test.
-   ck_assert_int_eq(row[1 * 4 + 1], 0);
+   ck_assert_int_eq(row[(1 * 4) + 1], 0);
 
    // And the stale bytes beyond it are indeed still stale, which is the
    // point: this documents the weaker invariant rather than hiding it.
-   ck_assert_int_eq(row[2 * 4 + 1], 0xAB);
+   ck_assert_int_eq(row[(2 * 4) + 1], 0xAB);
 
    span_collector_free(sc);
 }
diff --git a/src/tests/evas/evas_test_vg.c b/src/tests/evas/evas_test_vg.c
index 5c3d96458e..6c043e915c 100644
--- a/src/tests/evas/evas_test_vg.c
+++ b/src/tests/evas/evas_test_vg.c
@@ -106,7 +106,7 @@ _scene_sample(const char *engine, void (*build)(Evas *e),
 
    evas_object_image_size_get(snap, &sw, NULL);
    pixels = evas_object_image_data_get(snap, EINA_FALSE);
-   if (pixels && sw > 0) *out = pixels[py * sw + px];
+   if (pixels && (sw > 0)) *out = pixels[(py * sw) + px];
    else                  *out = 0;
    if (pixels) evas_object_image_data_set(snap, pixels);
 
@@ -170,7 +170,7 @@ EFL_START_TEST(evas_vg_container_alpha_is_applied)
         r = (px >> 16) & 0xff;
         // Wide tolerance: this is checking that the alpha was applied at
         // all, not the exact rounding of the blend.
-        ck_assert_msg(r > 100 && r < 160,
+        ck_assert_msg((r > 100) && (r < 160),
                       "engine %s: group alpha 128 over black should give a "
                       "channel near 128, got %d (pixel %08x)",
                       *eng, r, px);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to