commit f88f1e0bcb9df8916f5b15e487d860578fe5a766
parent 2d12c3afb7054bd1f9c97d42f834bfbe34e077a3
Author: Christophe Coustet <christophe.coustet@meso-star.com>
Date: Mon, 27 Jan 2020 16:57:58 +0100
Cosmetic changes
Diffstat:
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/src/test_senc_inconsistant_cube.c b/src/test_senc_inconsistant_cube.c
@@ -60,9 +60,8 @@ test(const int convention)
struct context ctx = CONTEXT_NULL__;
unsigned i, e, ecount;
- CHK(mem_init_proxy_allocator(&allocator, &mem_default_allocator) == RES_OK);
- CHK(senc_device_create(NULL, &allocator, SENC_NTHREADS_DEFAULT, 1, &dev)
- == RES_OK);
+ OK(mem_init_proxy_allocator(&allocator, &mem_default_allocator));
+ OK(senc_device_create(NULL, &allocator, SENC_NTHREADS_DEFAULT, 1, &dev));
/* A 3D cube.
* 2 enclosures (inside, outside) sharing the same triangles,
@@ -77,10 +76,10 @@ test(const int convention)
OK(senc_scene_create(dev, convention, inconsistant_box_ntriangles,
get_indices, get_media, nvertices, get_position, &ctx, &scn));
- CHK(senc_scene_get_enclosure_count(scn, &ecount) == RES_OK);
+ OK(senc_scene_get_enclosure_count(scn, &ecount));
CHK(ecount == 2);
- CHK(senc_scene_get_convention(scn, &conv) == RES_OK);
+ OK(senc_scene_get_convention(scn, &conv));
CHK(conv == convention);
conv_front = (conv & SENC_CONVENTION_NORMAL_FRONT) != 0;
conv_in = (conv & SENC_CONVENTION_NORMAL_INSIDE) != 0;
@@ -91,10 +90,10 @@ test(const int convention)
enum senc_side side, expected_side;
unsigned gid;
(void)name;
- CHK(senc_scene_get_enclosure(scn, e, &enclosure) == RES_OK);
- CHK(senc_enclosure_get_header(enclosure, &header) == RES_OK);
+ OK(senc_scene_get_enclosure(scn, e, &enclosure));
+ OK(senc_enclosure_get_header(enclosure, &header));
CHK(header.enclosed_media_count == 1);
- CHK(senc_enclosure_get_medium(enclosure, 0, &medium) == RES_OK);
+ OK(senc_enclosure_get_medium(enclosure, 0, &medium));
/* If NORMAL_FRONT the external enclosure's medium should be 0,
* 1 if NORMAL_BACK */
expected_external_medium = conv_front ? 0 : 1;
@@ -119,7 +118,7 @@ test(const int convention)
/* Should be made of the same triangles */
CHK(same);
CHK(i ? reversed != fst_reversed : reversed == fst_reversed);
- CHK(senc_enclosure_get_triangle_global_id(enclosure, i, &gid, &side) == RES_OK);
+ OK(senc_enclosure_get_triangle_global_id(enclosure, i, &gid, &side));
CHK(side == expected_side);
}
SENC(enclosure_ref_put(enclosure));