Skip to content

Commit

Permalink
Added a regression test
Browse files Browse the repository at this point in the history
  • Loading branch information
meister committed Nov 29, 2023
1 parent 8bce45e commit ae2a525
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/lisp/regression-tests/geometry.lisp
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
(in-package #:clasp-tests)


(test-true sign-dihedral (> (geom:calculate-dihedral (geom:vec -1.0 1.0 0.0) (geom:vec -1.0 0.0 0.0) (geom:vec 0.0 0.0 0.0) (geom:vec 0.0 0.0 1.0)) 0.0))
(test-true sign-inv-dihedral (< (geom:vz (geom:point-from-stub-and-internal-coordinates (geom:make-matrix t) 1.0 (/ pi 2.0) (/ pi 2.0))) 0.0))
(test-true sign-other-dihedral (> (geom:vz (geom:build-using-bond-angle-dihedral
1.0 (geom:vec 0.0 0.0 0.0)
(/ pi 2.0) (geom:vec -1.0 0.0 0.0)
(/ pi 2.0) (geom:vec -1.0 1.0 0.0)))
0.0))
(test-true sign-plane-vector-angle1 (< (geom:plane-vector-angle 1.0 1.0) 0.0))
(test-true sign-plane-vector-angle2 (< (geom:plane-vector-angle -1.0 1.0) 0.0))
(test-true sign-plane-vector-angle3 (> (geom:plane-vector-angle 1.0 -1.0) 0.0))
(test-true sign-plane-vector-angle4 (> (geom:plane-vector-angle -1.0 -1.0) 0.0))

0 comments on commit ae2a525

Please sign in to comment.