Skip to content

Commit

Permalink
Port frame-at test to fiasco
Browse files Browse the repository at this point in the history
  • Loading branch information
sdilts committed Oct 24, 2024
1 parent 81d0dc2 commit 18149bc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
7 changes: 7 additions & 0 deletions test/tree-tests-2.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -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)))))
11 changes: 1 addition & 10 deletions test/tree-tests.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 18149bc

Please sign in to comment.