mirror of
https://github.com/hanzo-fi/stack.git
synced 2026-10-30 20:34:43 +00:00
25 lines
373 B
Go
25 lines
373 B
Go
package command
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestCompiler(t *testing.T) {
|
|
|
|
script := `send [USD/2 100] (
|
|
source = @world
|
|
destination = @bank
|
|
)`
|
|
|
|
compiler := NewCompiler(1024)
|
|
p1, err := compiler.Compile(script)
|
|
require.NoError(t, err)
|
|
|
|
p2, err := compiler.Compile(script)
|
|
require.NoError(t, err)
|
|
|
|
require.Equal(t, p1, p2)
|
|
}
|