[gtk+] Add a test for gdk_rgba_copy
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] Add a test for gdk_rgba_copy
- Date: Sun, 8 Jan 2012 00:03:24 +0000 (UTC)
commit 2b16ec9f1467964c869e3705096a92193d8df8ed
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Jan 7 19:00:32 2012 -0500
Add a test for gdk_rgba_copy
gdk/tests/gdk-color.c | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/gdk/tests/gdk-color.c b/gdk/tests/gdk-color.c
index 3c3955a..af69c20 100644
--- a/gdk/tests/gdk-color.c
+++ b/gdk/tests/gdk-color.c
@@ -90,6 +90,23 @@ test_color_to_string (void)
g_free (orig);
}
+static void
+test_color_copy (void)
+{
+ GdkRGBA rgba;
+ GdkRGBA *out;
+
+ rgba.red = 0.0;
+ rgba.green = 0.1;
+ rgba.blue = 0.6;
+ rgba.alpha = 0.9;
+
+ out = gdk_rgba_copy (&rgba);
+ g_assert (gdk_rgba_equal (&rgba, out));
+
+ gdk_rgba_free (out);
+}
+
int
main (int argc, char *argv[])
{
@@ -97,6 +114,7 @@ main (int argc, char *argv[])
g_test_add_func ("/color/parse", test_color_parse);
g_test_add_func ("/color/to-string", test_color_to_string);
+ g_test_add_func ("/color/copy", test_color_copy);
return g_test_run ();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]