X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;ds=sidebyside;f=src%2FTests%2FTetrahedron.hs;h=1ec4c8e6a0672e2541d383ae233b1e684b801291;hb=7c648d2c1ca966c4ba1dfff08a13100f065d5dbf;hp=159acd7f95bdb11a4a583c994fcd7a0ed350a2ee;hpb=ea92f7319ba4350715e2397928def15f574d9d8c;p=spline3.git diff --git a/src/Tests/Tetrahedron.hs b/src/Tests/Tetrahedron.hs index 159acd7..1ec4c8e 100644 --- a/src/Tests/Tetrahedron.hs +++ b/src/Tests/Tetrahedron.hs @@ -366,3 +366,27 @@ prop_z_rotation_doesnt_affect_top t = fv1 = rotate (Tetrahedron.fv t) cwz expr1 = top $ fv0 expr2 = top $ fv1 + +prop_swapping_vertices_doesnt_affect_coefficients1 :: Tetrahedron -> Bool +prop_swapping_vertices_doesnt_affect_coefficients1 t = + c t 0 0 1 2 == c t' 0 0 1 2 + where + t' = t { v0 = (v1 t), v1 = (v0 t) } + +prop_swapping_vertices_doesnt_affect_coefficients2 :: Tetrahedron -> Bool +prop_swapping_vertices_doesnt_affect_coefficients2 t = + c t 0 1 1 1 == c t' 0 1 1 1 + where + t' = t { v2 = (v3 t), v3 = (v2 t) } + +prop_swapping_vertices_doesnt_affect_coefficients3 :: Tetrahedron -> Bool +prop_swapping_vertices_doesnt_affect_coefficients3 t = + c t 2 1 0 0 == c t' 2 1 0 0 + where + t' = t { v2 = (v3 t), v3 = (v2 t) } + +prop_swapping_vertices_doesnt_affect_coefficients4 :: Tetrahedron -> Bool +prop_swapping_vertices_doesnt_affect_coefficients4 t = + c t 2 0 0 1 == c t' 2 0 0 1 + where + t' = t { v0 = (v3 t), v3 = (v0 t) }