summaryrefslogtreecommitdiffstats
path: root/libdimension/tests
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2014-05-31 12:32:24 -0400
committerTavian Barnes <tavianator@tavianator.com>2014-05-31 12:32:24 -0400
commitc9c85a530402541518dd585de682bb0ecdf7cf7b (patch)
tree80bc7eede025cd98983c0bcb271859ceed30fa1f /libdimension/tests
parent1de647b9d38528b640f8da473d50c04ef0674c58 (diff)
downloaddimension-c9c85a530402541518dd585de682bb0ecdf7cf7b.tar.xz
array: Add DMNSN_NEW_ARRAY macro.
Diffstat (limited to 'libdimension/tests')
-rw-r--r--libdimension/tests/prtree.c2
-rw-r--r--libdimension/tests/render.c8
2 files changed, 5 insertions, 5 deletions
diff --git a/libdimension/tests/prtree.c b/libdimension/tests/prtree.c
index b2a2be6..5c377e2 100644
--- a/libdimension/tests/prtree.c
+++ b/libdimension/tests/prtree.c
@@ -65,7 +65,7 @@ main(void)
dmnsn_die_on_warnings(true);
const size_t nobjects = 128;
- dmnsn_array *objects = dmnsn_new_array(sizeof(dmnsn_object *));
+ dmnsn_array *objects = DMNSN_NEW_ARRAY(dmnsn_object *);
for (size_t i = 0; i < nobjects; ++i) {
dmnsn_object *object = dmnsn_new_object();
diff --git a/libdimension/tests/render.c b/libdimension/tests/render.c
index c6dc537..3a5f134 100644
--- a/libdimension/tests/render.c
+++ b/libdimension/tests/render.c
@@ -157,7 +157,7 @@ dmnsn_test_scene_add_hollow_cube(dmnsn_pool *pool, dmnsn_scene *scene)
static void
dmnsn_test_scene_add_spike(dmnsn_pool *pool, dmnsn_scene *scene)
{
- dmnsn_array *arrow_array = dmnsn_new_array(sizeof(dmnsn_object *));
+ dmnsn_array *arrow_array = DMNSN_NEW_ARRAY(dmnsn_object *);
dmnsn_object *cylinder = dmnsn_new_cone(0.1, 0.1, false);
cylinder->trans = dmnsn_scale_matrix(dmnsn_new_vector(1.0, 1.25, 1.0));
@@ -192,7 +192,7 @@ dmnsn_test_scene_add_spike(dmnsn_pool *pool, dmnsn_scene *scene)
dmnsn_scale_matrix(dmnsn_new_vector(1.0, 2.75, 1.0))
);
- dmnsn_array *torus_array = dmnsn_new_array(sizeof(dmnsn_object *));
+ dmnsn_array *torus_array = DMNSN_NEW_ARRAY(dmnsn_object *);
dmnsn_object *torus1 = dmnsn_new_torus(0.15, 0.05);
torus1->trans = dmnsn_translation_matrix(dmnsn_new_vector(0.0, -1.0, 0.0));
@@ -211,7 +211,7 @@ dmnsn_test_scene_add_spike(dmnsn_pool *pool, dmnsn_scene *scene)
torii->texture->pigment = dmnsn_new_solid_pigment(DMNSN_TCOLOR(dmnsn_blue));
torii->texture->finish.ambient = dmnsn_new_ambient(dmnsn_white);
- dmnsn_array *spike_array = dmnsn_new_array(sizeof(dmnsn_object *));
+ dmnsn_array *spike_array = DMNSN_NEW_ARRAY(dmnsn_object *);
dmnsn_array_push(spike_array, &arrow);
dmnsn_array_push(spike_array, &torii);
dmnsn_object *spike = dmnsn_new_csg_union(spike_array);
@@ -225,7 +225,7 @@ dmnsn_test_scene_add_spike(dmnsn_pool *pool, dmnsn_scene *scene)
static void
dmnsn_test_scene_add_triangle_strip(dmnsn_scene *scene)
{
- dmnsn_array *strip_array = dmnsn_new_array(sizeof(dmnsn_object *));
+ dmnsn_array *strip_array = DMNSN_NEW_ARRAY(dmnsn_object *);
dmnsn_vector a = dmnsn_zero;
dmnsn_vector b = dmnsn_new_vector(0.0, sqrt(3.0)/2.0, 0.5);
dmnsn_vector c = dmnsn_z;