From f7880bbeacee1c5b3b06b5187244ac781edb033c Mon Sep 17 00:00:00 2001 From: Stuart Dilts Date: Wed, 23 Oct 2024 21:15:31 -0600 Subject: [PATCH] Port frame-at test to fiasco --- test/tree-tests-2.lisp | 7 +++++++ test/tree-tests.lisp | 11 +---------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/test/tree-tests-2.lisp b/test/tree-tests-2.lisp index ab397d7..86d134f 100644 --- a/test/tree-tests-2.lisp +++ b/test/tree-tests-2.lisp @@ -64,3 +64,10 @@ (is (= (frame-x child-1) 100)) (is (= (frame-y child-2) 0)) (is (= (frame-x child-2) 151)))) + +(fiasco:deftest single-frame--frame-at-test () + (let ((frame (make-instance 'frame :x 0 :y 0 :width 100 :height 100))) + (is (equal frame (frame-at frame 50 50))) + (is (not (frame-at frame -1 50))) + (is (not (frame-at frame 50 -1))) + (is (not (frame-at frame -1 -1))))) diff --git a/test/tree-tests.lisp b/test/tree-tests.lisp index 6b028e0..cb7ce54 100644 --- a/test/tree-tests.lisp +++ b/test/tree-tests.lisp @@ -145,19 +145,10 @@ (is second-tree first-tree2 :test #'eq) (is first-tree second-tree2 :test #'eq))))) -(deftest frame-at-test - (subtest "Single frame" - (let ((frame (make-instance 'frame :x 0 :y 0 :width 100 :height 100))) - (ok (frame-at frame 50 50)) - (ok (not (frame-at frame -1 50))) - (ok (not (frame-at frame 50 -1))) - (ok (not (frame-at frame -1 -1)))))) - -(plan 6) +(plan 5) (prove:run-test 'find-frame) (prove:run-test 'poly-split-dimensions) (prove:run-test 'binary-split-dimensions) (prove:run-test 'binary-split-direction) (prove:run-test 'frame-swap) -(prove:run-test 'frame-at-test) (finalize)