File: ParamsTest.hs

package info (click to toggle)
haskell-tidal 1.7.10-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 776 kB
  • sloc: haskell: 9,594; lisp: 413; makefile: 5
file content (40 lines) | stat: -rw-r--r-- 1,066 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{-# LANGUAGE OverloadedStrings #-}

module Sound.Tidal.ParamsTest where

import Test.Microspec
import TestUtils
import Sound.Tidal.Core
import Sound.Tidal.Params
import Sound.Tidal.Pattern

run :: Microspec ()
run =
  describe "Sound.Tidal.Params" $ do
    describe "VF params" $ do
      it "should parse fractional ratio" $ do
        compareP (Arc 0 1)
          (sound "bd" # delay "e")
          (sound "bd" # delay (1/8))

      it "should parse correctly floating point number" $ do
        compareP (Arc 0 1)
          (sound "bd" # delay "0.5")
          (sound "bd" # delay (1/2))

    describe "VN params" $ do
        it "should parse note value" $ do
          compareP (Arc 0 1)
            (sound "bd" # note "e")
            (sound "bd" # note 4)

        it "should parse n value" $ do
          compareP (Arc 0 1)
            (sound "bd" # n "e")
            (sound "bd" # n 4)

        it "should parse correctly floating point number" $ do
          compareP (Arc 0 1)
            (sound "bd" # note "0.5")
            (sound "bd" # note (1/2))