From 1a8c81d07efe55c5a6909aff32359d4b8866af1c Mon Sep 17 00:00:00 2001 From: Elizabeth Hunt Date: Wed, 27 Sep 2023 09:53:37 -0600 Subject: keep unit tests but make directory structure more consistent with requirements i did not read --- tests/approx.lisp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 tests/approx.lisp (limited to 'tests/approx.lisp') diff --git a/tests/approx.lisp b/tests/approx.lisp new file mode 100644 index 0000000..2fd8124 --- /dev/null +++ b/tests/approx.lisp @@ -0,0 +1,24 @@ +(defpackage lizfcm/tests.approx + (:use :cl + :fiveam + :lizfcm.approx + :lizfcm.utils + :lizfcm/tests) + (:export :approx-suite)) +(in-package :lizfcm/tests.approx) + +(def-suite approx-suite + :in lizfcm-test-suite) +(in-suite approx-suite) + +(test derivative-at + :description "derivative at is within bounds" + (let ((f (lambda (x) (* x x))) + (x 2) + (accepted-delta 0.02) + (f-prime-at-x 4) + (delta 0.01)) + (is (within-range-p + (derivative-at f x delta) + f-prime-at-x + accepted-delta)))) -- cgit v1.3