summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@redhat.com>2005-03-10 09:22:20 +0000
committerKristian Høgsberg <krh@redhat.com>2005-03-10 09:22:20 +0000
commitb032d02322a656a3cfc02d0ea788680c12689d1f (patch)
tree0cd2084a12c4b53966f3437fe97455dd755d6b48 /test
parent05a7c69c904119ee08df40b8e3f7154614fcbf8e (diff)
Fix assert()'s using = instead of ==.
Move xunlink call below the xasprintf that builds the filename to unlink.
Diffstat (limited to 'test')
-rw-r--r--test/cairo-test.c4
-rw-r--r--test/cairo_test.c4
-rw-r--r--test/user-data.c4
-rw-r--r--test/user_data.c4
4 files changed, 8 insertions, 8 deletions
diff --git a/test/cairo-test.c b/test/cairo-test.c
index 0c3ae8fe..7e468b0b 100644
--- a/test/cairo-test.c
+++ b/test/cairo-test.c
@@ -111,8 +111,6 @@ cairo_test (cairo_test_t *test, cairo_test_draw_function_t draw)
FILE *png_file;
FILE *log_file;
- xunlink (log_name);
-
/* Get the strings ready that we'll need. */
srcdir = getenv ("srcdir");
if (!srcdir)
@@ -122,6 +120,8 @@ cairo_test (cairo_test_t *test, cairo_test_draw_function_t draw)
xasprintf (&ref_name, "%s/%s%s", srcdir, test->name, CAIRO_TEST_REF_SUFFIX);
xasprintf (&diff_name, "%s%s", test->name, CAIRO_TEST_DIFF_SUFFIX);
+ xunlink (log_name);
+
/* Run the actual drawing code. */
cr = cairo_create ();
diff --git a/test/cairo_test.c b/test/cairo_test.c
index 0c3ae8fe..7e468b0b 100644
--- a/test/cairo_test.c
+++ b/test/cairo_test.c
@@ -111,8 +111,6 @@ cairo_test (cairo_test_t *test, cairo_test_draw_function_t draw)
FILE *png_file;
FILE *log_file;
- xunlink (log_name);
-
/* Get the strings ready that we'll need. */
srcdir = getenv ("srcdir");
if (!srcdir)
@@ -122,6 +120,8 @@ cairo_test (cairo_test_t *test, cairo_test_draw_function_t draw)
xasprintf (&ref_name, "%s/%s%s", srcdir, test->name, CAIRO_TEST_REF_SUFFIX);
xasprintf (&diff_name, "%s%s", test->name, CAIRO_TEST_DIFF_SUFFIX);
+ xunlink (log_name);
+
/* Run the actual drawing code. */
cr = cairo_create ();
diff --git a/test/user-data.c b/test/user-data.c
index 45dc868f..4f3b761b 100644
--- a/test/user-data.c
+++ b/test/user-data.c
@@ -63,8 +63,8 @@ main (void)
assert (cairo_surface_set_user_data (surface, &key1, &data1, destroy_data1)
== CAIRO_STATUS_SUCCESS);
cairo_surface_destroy (surface);
- assert (data1 = 1);
- assert (data2 = 2);
+ assert (data1 == 1);
+ assert (data2 == 2);
return 0;
}
diff --git a/test/user_data.c b/test/user_data.c
index 45dc868f..4f3b761b 100644
--- a/test/user_data.c
+++ b/test/user_data.c
@@ -63,8 +63,8 @@ main (void)
assert (cairo_surface_set_user_data (surface, &key1, &data1, destroy_data1)
== CAIRO_STATUS_SUCCESS);
cairo_surface_destroy (surface);
- assert (data1 = 1);
- assert (data2 = 2);
+ assert (data1 == 1);
+ assert (data2 == 2);
return 0;
}