anchor.diff:    (is (= 8
            (cl-patterns::round-up 5 4))
         "round-up gives correct results for arguments 5, 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"))
  +
  +;;; scales (FIX)
  +
  +;;; event (FIX: add more)
  +
  +(test event
  +  "Test event functionality"
  +  (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"))
   
   ;;; patterns
   
  
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-upto-n (pbind :foo (pseq '(1 2 3 4 5) 1) :bar (prun (pseq (list 4 5 6 7 8) 1) (pseq (list 1 2 0.5 0.5 1) 1))))) ;; FIX: if the list is quoted instead of generated, it creates garbage..
             "prun returns correct results"))
  
  (test pchain
    "Test pchain"
    (is-true (every-event-equal
  