summaryrefslogtreecommitdiffstats
path: root/tests/libdimension/png.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2009-11-09 11:31:28 -0500
committerTavian Barnes <tavianator@gmail.com>2009-11-09 11:32:25 -0500
commit354f43020d956e7f02dcc81feab13e6fa0e98e10 (patch)
treeb3c6484ce799b1807e7f7b179ecfdead00f56aaa /tests/libdimension/png.c
parentb79e24ded809056b3cd3a338c042d1a794bdcab3 (diff)
downloaddimension-354f43020d956e7f02dcc81feab13e6fa0e98e10.tar.xz
Make dmnsn_delete_scene() delete the scene's elements too.
Diffstat (limited to 'tests/libdimension/png.c')
-rw-r--r--tests/libdimension/png.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/libdimension/png.c b/tests/libdimension/png.c
index 0937a87..611ab11 100644
--- a/tests/libdimension/png.c
+++ b/tests/libdimension/png.c
@@ -43,7 +43,7 @@ main() {
/* Optimize the canvas for PNG export */
if (dmnsn_png_optimize_canvas(scene->canvas) != 0) {
- dmnsn_delete_default_scene(scene);
+ dmnsn_delete_scene(scene);
fprintf(stderr, "--- Couldn't optimize canvas for PNG! ---\n");
return EXIT_FAILURE;
}
@@ -52,7 +52,7 @@ main() {
printf("Rendering scene\n");
if (dmnsn_raytrace_scene(scene) != 0) {
- dmnsn_delete_default_scene(scene);
+ dmnsn_delete_scene(scene);
fprintf(stderr, "--- Raytracing failed! ---\n");
return EXIT_FAILURE;
}
@@ -62,20 +62,20 @@ main() {
printf("Writing scene to PNG\n");
ofile = fopen("png1.png", "wb");
if (!ofile) {
- dmnsn_delete_default_scene(scene);
+ dmnsn_delete_scene(scene);
fprintf(stderr, "--- Couldn't open 'png1.png' for writing! ---\n");
return EXIT_FAILURE;
}
if (dmnsn_png_write_canvas(scene->canvas, ofile) != 0) {
fclose(ofile);
- dmnsn_delete_default_scene(scene);
+ dmnsn_delete_scene(scene);
fprintf(stderr, "--- Writing canvas to PNG failed! ---\n");
return EXIT_FAILURE;
}
fclose(ofile);
- dmnsn_delete_default_scene(scene);
+ dmnsn_delete_scene(scene);
/*
* Now test PNG import/export