Skip to main content
Glama
emicklei

melrōse musical expression player

by emicklei
repeat_test.go771 B
package op import ( "testing" "github.com/emicklei/melrose/core" ) func TestRepeat_Storex(t *testing.T) { s := core.MustParseSequence("C D") r := Repeat{Target: []core.Sequenceable{s}, Times: core.On(2)} if got, want := r.Storex(), "repeat(2,sequence('C D'))"; got != want { t.Errorf("got [%v] want [%v]", got, want) } } func TestRepeat_Replaced(t *testing.T) { s1 := core.MustParseSequence("C") s2 := core.MustParseSequence("D") r := Repeat{Target: []core.Sequenceable{s1}, Times: core.On(1)} if core.IsIdenticalTo(r, s1) { t.Error("should not be identical") } if !core.IsIdenticalTo(r.Replaced(s1, s2).(Repeat).Target[0], s2) { t.Error("not replaced") } if !core.IsIdenticalTo(r.Replaced(r, s2), s2) { t.Error("should be replaced by s2") } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/emicklei/melrose'

If you have feedback or need assistance with the MCP directory API, please join our Discord server