示例#1
0
		err error
	}{
		0: {
			// No input
			id:  "test",
			err: ErrNoInput,
		},
		1: {
			// Empty func
			id: "test",
			src: `
// Some comment

[f]
`,
			exp: AppendAny(SigVer(bytecode.Version()), Int64ToByteSlice(4), 't', 'e', 's', 't',
				// StackSz - ExpArgs - ParentFnIx - LineStart - LineEnd
				ExpZeroInt64, ExpZeroInt64, ExpZeroInt64, ExpZeroInt64, ExpZeroInt64,
				// Ks - Ls - Is
				ExpZeroInt64, ExpZeroInt64, ExpZeroInt64),
		},
		2: {
			// Full valid func
			id: "test",
			src: `
[f]
test
1
0
0
0
示例#2
0
文件: agora.go 项目: jmptrader/agora
func (v *version) Execute(args []string) error {
	maj, min := bytecode.Version()
	fmt.Printf("agora version %d.%d (git revision %s)\n", maj, min, bytecode.AGORA_BUILD)
	return nil
}