anchor.diff:              (list (event :foo 1 :bar 1) (event :foo 2 :bar 2) (event :foo 3 :bar 3) nil)
               (next-n (pchain (pbind :foo (pseq '(1 2 3) 1)) (pbind :bar (pk :foo))) 4))
              "values from previous patterns are accessible in subsequent patterns when pchain'd"))
  -
  -;; pdiff
   
   (test pdiff
     "Test pdiff"
     (is (equal (list -2 3 -1 nil)
                (next-n (pdiff (pseq (list 3 1 4 3) 1)) 4))))
   
  -;; pdrop
  -
   (test pdrop
     "Test pdrop"
     (is (equal (list 3 4 nil nil)
                (next-n (pdrop (pseq '(1 2 3 4) 1) 2) 4))))
   
  -;;; conversions (FIX: add more)
  -
  -(test conversions
  -  "Test unit conversion functions"
  -  (is (=
  -       0.5
  -       (db-amp (amp-db 0.5)))
  -      "db-to-amp conversion is equivalent to amp-to-db conversion"))
  -
  -;;; events (FIX: add more)
  -
  -(test events
  -  "Test events"
  -  (is (=
  -       1
  -       (event-value (event :dur 0 :sustain 1) :sustain))
  -      "event returns the correct sustain when sustain is provided and dur is 0")
  -  (is (=
  -       0.8
  -       (event-value (event) :sustain))
  -      "event returns the correct default value for sustain")
  -  (is (=
  -       0.5
  -       (event-value (event :dur 0 :legato 0.5) :legato))
  -      "event returns the correct legato when legato is provided and dur is 0")
  -  (is (=
  -       0.8
  -       (event-value (event) :legato))
  -      "event returns the correct default value for legato")
  -  (is (=
  -       1
  -       (event-value (event) :dur))
  -      "event returns the correct default value for dur")
  -  (is (eq
  -       :default
  -       (event-value (event) :instrument))
  -      "event returns the correct default value for instrument")
  -  (is (= (amp-db 0.125)
  -         (event-value (event :amp 0.125) :db))
  -      "event correctly converts amp to db")
  -  (is (= (db-amp -7)
  -         (event-value (event :db -7) :amp))
  -      "event correctly converts db to amp"))
  -
  -(test event-equal
  -  "Test event-equal"
  -  (is-true
  -   (event-equal (event :dur 1) (event :dur 1))
  -   "event-equal returns true for equivalent events"))
  -
  -(test every-event-equal
  -  "Test every-event-equal"
  -  (is-true (every-event-equal
  -            (list (event :freq 440))
  -            (list (event :freq 440)))
  -           "every-event-equal returns true for two lists of equivalent events")
  -  (is-false (every-event-equal
  -             (list (event :dur 1))
  -             (list))
  -            "every-event-equal returns false for two lists of different length"))
  +;;; bjorklund (FIX)
  +
  +;;; cycles (FIX)
  +
  +;;; tracker (FIX)
  +
  +;;; backend (FIX)
   
   ;;; clock (FIX)
   
  -;;; tsubseq
  -
  -;; (let* ((pb (pbind :dur 1/3)))
  -;;   (is (= 2/3 (reduce #'+ (gete (tsubseq pb 1 1.5) :dur))))
  -;;   (is (= 2/3 (reduce #'+ (gete (tsubseq (as-pstream pb) 1 1.5) :dur))))
  -;;   (is (= 2/3 (reduce #'+ (gete (tsubseq (next-n pb 15) 1 1.5) :dur)))))
  -
  -;; (let* ((pb (pbind :dur 1/3)))
  -;;   (is (= 0.25 (reduce #'+ (gete (tsubseq* pb 1.25 1.5) :dur))))
  -;;   (is (= 0.25 (reduce #'+ (gete (tsubseq* (as-pstream pb) 1.25 1.5) :dur))))
  -;;   (is (= 0.25 (reduce #'+ (gete (tsubseq* (next-n pb 15) 1.25 1.5) :dur)))))
  +;;; sugar (FIX)
  +
  +;;; cl-collider backend (FIX)
  +
  +;;; incudine backend (FIX)
  +
  +;;; midi backend (FIX)
  
positive.code:          (length (next-upto-n (prand '(1 2 3) 3))))
        "prand returns the correct number of results"))
  
  ;; pxrand (FIX)
  
  ;; pwxrand (FIX)
  
  (test pfunc
    "Test pfunc"
  
negative.code:              (next-n (pindex (list 99 98 97) (pseries 0 1 4) 2 t) 9))
        "pindex returns correct results when its WRAP-P is t"))
  
  (test prun
    "Test prun"
    (is-true (every-event-equal
  