summaryrefslogtreecommitdiff
path: root/test/painter/color.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/painter/color.c')
-rw-r--r--test/painter/color.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/painter/color.c b/test/painter/color.c
new file mode 100644
index 0000000..bdfe9b3
--- /dev/null
+++ b/test/painter/color.c
@@ -0,0 +1,14 @@
1#include "painter/color.h"
2#include <assert.h>
3
4static void test_color_blend() {
5 Color a = {{1, 10, 100, 200}}, b = {{100, 1, 200, 10}};
6 assert(color_equals(color_blend(a, b, TIME_ORIGIN), a));
7 assert(color_equals(color_blend(a, b, TIME_UNIT), b));
8 assert(color_equals(color_blend(a, b, 0.25), (Color) {{50, 9, 132, 173}}));
9}
10
11int main(int argc, char **argv) {
12 test_color_blend();
13 return 0;
14}