func TestDuplicateTopCall(t *testing.T) {
	t.Parallel()
	testBadGrammar(t, `
stage COMPUTE(
    in  int value,
    out int result,
    src py  "stages/compute",
)
pipeline THING(
    in  int  value,
    out int  result,
)
{
    call COMPUTE(
        value = self.value,
    )
    return (
        result = COMPUTE.result,
    )
}
call THING(
    value        = 1,
)
call THING(
    value        = 2,
)
`)
}
Checks that there can be only one top-level call.
package syntax
import (
	"testing"
)
func TestBadSyntax(t *testing.T) {
	testBadGrammar(t, `
# File comment
# Stage comment
# This describes the stage.
stage SUM_SQUARES(
    in  float[] values,
    # sum comment
    osut float   sum,
    src py      "stages/sum_squares",
)
pipeline SUM_SQUARE_PIPELINE(
    in  float[] values,
    out float   sum,
)
{
    call SUM_SQUARES(
        values = self.values,
    )
    return (
        sum = SUM_SQUARES.sum,
    )
}
call SUM_SQUARE_PIPELINE(
    values = [10.0, 2.0e1, 3.0e+1, 400.0e-1, 5e1, 6e+1, 700e-1],
)
`)
}
func TestConstDisable(t *testing.T) {
	t.Parallel()
	testBadGrammar(t, `
stage SQUARE(
    in  int   value,
    src py    "stages/square",
)
pipeline SQ_PIPE()
{
    call SQUARE(
        value = 1,
    ) using (
        disabled  = true,
        volatile  = true,
        preflight = false,
    )
    return ()
}
`)
}
func TestPreflightTopCall(t *testing.T) {
	t.Parallel()
	testBadGrammar(t, `
stage SQUARE(
    in  int   value,
    src py    "stages/square",
)
pipeline SQ_PIPE(
    in int value,
)
{
    call SQUARE(
        value = self.value,
    )
    return ()
}
call SQ_PIPE(
    value = 1,
) using (
    disabled = true,
)
`)
}