Skip to content

Commit

Permalink
rename test case
Browse files Browse the repository at this point in the history
  • Loading branch information
douyixuan committed Aug 20, 2024
1 parent ff65780 commit 04721c2
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ test/example:
${CELL} -d -t riscv tests/examples/return.cell && ckb-debugger --bin return
${CELL} -d -t riscv tests/examples/named-ret-type.cell && ckb-debugger --bin named-ret-type | grep "0"
${CELL} -d -t riscv tests/examples/func.cell && ckb-debugger --bin func | grep "999"
${CELL} -d -t riscv tests/examples/interface.cell && ckb-debugger --bin interface | grep "0"
${CELL} -d -t riscv tests/examples/method.cell && ckb-debugger --bin method | grep "100"
${CELL} -t riscv tests/examples/cell-data.cell && ckb-debugger --bin cell-data
${CELL} -t riscv tests/examples/inputs.cell && ckb-debugger --bin inputs
${CELL} -t riscv tests/examples/outputs.cell && ckb-debugger --bin outputs
Expand Down
21 changes: 21 additions & 0 deletions tests/examples/method.cell
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import (
"errors"
"debug"
)

type Buffer table {
start uint64
end uint64
}
func (b *Buffer) Start() (n uint64, err error) {
return b.start, errors.None()
}
func main() {
b := Buffer {
start: 100
end: 200
}
n, _ := b.Start()
debug.Printf("%d", n)
return 0
}

0 comments on commit 04721c2

Please sign in to comment.