diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/common/geom.c | 7 | ||||
-rw-r--r-- | test/morpher/matrix.c | 7 | ||||
-rw-r--r-- | test/morpher/quadrilateral.c | 7 | ||||
-rw-r--r-- | test/morpher/trianglemap.c | 7 | ||||
-rw-r--r-- | test/painter/color.c | 7 | ||||
-rw-r--r-- | test/painter/rasterizer.c | 7 |
6 files changed, 42 insertions, 0 deletions
diff --git a/test/common/geom.c b/test/common/geom.c index f05e0a1..1775315 100644 --- a/test/common/geom.c +++ b/test/common/geom.c | |||
@@ -1,6 +1,13 @@ | |||
1 | #include "common/geom.h" | 1 | #include "common/geom.h" |
2 | #include <assert.h> | 2 | #include <assert.h> |
3 | 3 | ||
4 | /** | ||
5 | * File: geom.c | ||
6 | * | ||
7 | * Author: | ||
8 | * Pacien TRAN-GIRARD | ||
9 | */ | ||
10 | |||
4 | static void test_square_area() { | 11 | static void test_square_area() { |
5 | assert(square_area(v(0, 0), v(10, 0), v(10, 10)) == 100); | 12 | assert(square_area(v(0, 0), v(10, 0), v(10, 10)) == 100); |
6 | assert(square_area(v(0, 0), v(0, 10), v(10, 10)) == -100); | 13 | assert(square_area(v(0, 0), v(0, 10), v(10, 10)) == -100); |
diff --git a/test/morpher/matrix.c b/test/morpher/matrix.c index 0c96fab..42bb34b 100644 --- a/test/morpher/matrix.c +++ b/test/morpher/matrix.c | |||
@@ -1,6 +1,13 @@ | |||
1 | #include "morpher/matrix.h" | 1 | #include "morpher/matrix.h" |
2 | #include <assert.h> | 2 | #include <assert.h> |
3 | 3 | ||
4 | /** | ||
5 | * File: matrix.c | ||
6 | * | ||
7 | * Author: | ||
8 | * Pacien TRAN-GIRARD | ||
9 | */ | ||
10 | |||
4 | static void test_matrix_int_det2() { | 11 | static void test_matrix_int_det2() { |
5 | assert(matrix_int_det2(5, 7, | 12 | assert(matrix_int_det2(5, 7, |
6 | 2, 3) == 1); | 13 | 2, 3) == 1); |
diff --git a/test/morpher/quadrilateral.c b/test/morpher/quadrilateral.c index c632b82..b2c9a21 100644 --- a/test/morpher/quadrilateral.c +++ b/test/morpher/quadrilateral.c | |||
@@ -2,6 +2,13 @@ | |||
2 | #include <assert.h> | 2 | #include <assert.h> |
3 | #include <stdlib.h> | 3 | #include <stdlib.h> |
4 | 4 | ||
5 | /** | ||
6 | * File: quadrilateral.c | ||
7 | * | ||
8 | * Author: | ||
9 | * Pacien TRAN-GIRARD | ||
10 | */ | ||
11 | |||
5 | static inline bool neighbors_equals(TriangleMap *neighbors[], | 12 | static inline bool neighbors_equals(TriangleMap *neighbors[], |
6 | TriangleMap *n1, TriangleMap *n2, TriangleMap *n3) { | 13 | TriangleMap *n1, TriangleMap *n2, TriangleMap *n3) { |
7 | return neighbors[0] == n1 && neighbors[1] == n2 && neighbors[2] == n3; | 14 | return neighbors[0] == n1 && neighbors[1] == n2 && neighbors[2] == n3; |
diff --git a/test/morpher/trianglemap.c b/test/morpher/trianglemap.c index 986e406..55f5746 100644 --- a/test/morpher/trianglemap.c +++ b/test/morpher/trianglemap.c | |||
@@ -3,6 +3,13 @@ | |||
3 | #include <assert.h> | 3 | #include <assert.h> |
4 | #include "morpher/quadrilateral.h" | 4 | #include "morpher/quadrilateral.h" |
5 | 5 | ||
6 | /** | ||
7 | * File: trianglemap.c | ||
8 | * | ||
9 | * Author: | ||
10 | * Pacien TRAN-GIRARD | ||
11 | */ | ||
12 | |||
6 | static inline bool neighbors_equals(TriangleMap *neighbors[], | 13 | static inline bool neighbors_equals(TriangleMap *neighbors[], |
7 | TriangleMap *n1, TriangleMap *n2, TriangleMap *n3) { | 14 | TriangleMap *n1, TriangleMap *n2, TriangleMap *n3) { |
8 | return neighbors[0] == n1 && neighbors[1] == n2 && neighbors[2] == n3; | 15 | return neighbors[0] == n1 && neighbors[1] == n2 && neighbors[2] == n3; |
diff --git a/test/painter/color.c b/test/painter/color.c index bdfe9b3..b1b1501 100644 --- a/test/painter/color.c +++ b/test/painter/color.c | |||
@@ -1,6 +1,13 @@ | |||
1 | #include "painter/color.h" | 1 | #include "painter/color.h" |
2 | #include <assert.h> | 2 | #include <assert.h> |
3 | 3 | ||
4 | /** | ||
5 | * File: color.c | ||
6 | * | ||
7 | * Author: | ||
8 | * Pacien TRAN-GIRARD | ||
9 | */ | ||
10 | |||
4 | static void test_color_blend() { | 11 | static void test_color_blend() { |
5 | Color a = {{1, 10, 100, 200}}, b = {{100, 1, 200, 10}}; | 12 | Color a = {{1, 10, 100, 200}}, b = {{100, 1, 200, 10}}; |
6 | assert(color_equals(color_blend(a, b, TIME_ORIGIN), a)); | 13 | assert(color_equals(color_blend(a, b, TIME_ORIGIN), a)); |
diff --git a/test/painter/rasterizer.c b/test/painter/rasterizer.c index 99a70b4..a16fa19 100644 --- a/test/painter/rasterizer.c +++ b/test/painter/rasterizer.c | |||
@@ -1,6 +1,13 @@ | |||
1 | #include "painter/rasterizer.h" | 1 | #include "painter/rasterizer.h" |
2 | #include <assert.h> | 2 | #include <assert.h> |
3 | 3 | ||
4 | /** | ||
5 | * File: rasterizer.c | ||
6 | * | ||
7 | * Author: | ||
8 | * Pacien TRAN-GIRARD | ||
9 | */ | ||
10 | |||
4 | static void test_rasterize() { | 11 | static void test_rasterize() { |
5 | Morphing *morphing; | 12 | Morphing *morphing; |
6 | Canvas *origin, *target, *result; | 13 | Canvas *origin, *target, *result; |