[Commits] [SCM] clawsker branch, master, updated. 1.3.5-4-g1b1c905

mones at claws-mail.org mones at claws-mail.org
Tue Feb 22 23:42:20 UTC 2022


The branch, master has been updated
       via  1b1c90507e3795c94c92bf08607e00cee4830dd4 (commit)
      from  d9bbeeeae01ce28cf9cc91636f9630c1486532e7 (commit)

Summary of changes:
 t/str_rgba.t | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)


- Log -----------------------------------------------------------------
commit 1b1c90507e3795c94c92bf08607e00cee4830dd4
Author: Ricardo Mones <ricardo at mones.org>
Date:   Wed Feb 23 00:41:58 2022 +0100

    Improve color tests

diff --git a/t/str_rgba.t b/t/str_rgba.t
index 6d1cef6..60f116f 100644
--- a/t/str_rgba.t
+++ b/t/str_rgba.t
@@ -1,7 +1,8 @@
 use 5.010_000;
 use strict;
 use utf8;
-use Test::More tests => 6;
+use Gtk3;
+use Test::More tests => 12;
 
 require_ok ('Clawsker');
 
@@ -33,3 +34,19 @@ ok (
     'complementarity white'
 );
 
+my @colors = (
+    [Gtk3::Gdk::RGBA->new (1.0, 1.0, 1.0, 1.0), '#ffffff'],
+    [Gtk3::Gdk::RGBA->new (1.0, 1.0, 1.0, 0.5), '#ffffff'],
+    [Gtk3::Gdk::RGBA->new (0.505, 0.505, 0.505, 1.0), '#808080'],
+    [Gtk3::Gdk::RGBA->new (0.505, 0.505, 0.505, 0.5), '#808080'],
+    [Gtk3::Gdk::RGBA->new (0.0, 0.0, 0.0, 1.0), '#000000'],
+    [Gtk3::Gdk::RGBA->new (0.0, 0.0, 0.0, 0.5), '#000000'],
+);
+
+for my $color (@colors) {
+    is (
+        Clawsker::str_from_gdk_rgba($color->[0]),
+        $color->[1],
+        join(' ', 'color', $color->[1])
+    )
+}

-----------------------------------------------------------------------


hooks/post-receive
-- 
Hidden preferences editor for Claws Mail


More information about the Commits mailing list