about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAndinus <andinus@nand.sh>2022-01-12 12:46:51 +0530
committerAndinus <andinus@nand.sh>2022-01-12 12:46:51 +0530
commit35edc87d2f8482363a30a86df409b447a2d24695 (patch)
tree7df77997d7819be12664fa0ffac2f1f064a8c0f9
parent76b0f392519912c0e7835e5cf75190ea5d650e77 (diff)
downloadoctans-35edc87d2f8482363a30a86df409b447a2d24695.tar.gz
Add basic tests
-rw-r--r--t/00-basic.rakutest12
-rw-r--r--t/01-hex2rgb.rakutest8
2 files changed, 20 insertions, 0 deletions
diff --git a/t/00-basic.rakutest b/t/00-basic.rakutest
new file mode 100644
index 0000000..0eb0ace
--- /dev/null
+++ b/t/00-basic.rakutest
@@ -0,0 +1,12 @@
+use Test;
+
+plan 8;
+
+use-ok 'Octans::CLI';
+use-ok 'Octans::Hex2RGB';
+use-ok 'Octans::Neighbors';
+use-ok 'Octans::WordSearch';
+use-ok 'Octans::Puzzle';
+use-ok 'Octans::Puzzle:Get';
+use-ok 'Octans::RangeSearch';
+use-ok 'Octans::GenerateFrame';
diff --git a/t/01-hex2rgb.rakutest b/t/01-hex2rgb.rakutest
new file mode 100644
index 0000000..313b957
--- /dev/null
+++ b/t/01-hex2rgb.rakutest
@@ -0,0 +1,8 @@
+use Test;
+use Octans::Hex2RGB;
+
+plan 3;
+
+is hex2rgb("#000000"), (0, 0, 0), "#000000";
+is hex2rgb("#b753db"), (183, 83, 219).map(* / 255), "#b753db";
+is hex2rgb("#ffffff"), (1, 1, 1), "#ffffff";