Skip to content

Commit b3de68a

Browse files
committed
add test case for string
1 parent 76ed103 commit b3de68a

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

Makefile

+3
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ ckb-libc-debug:
8080
-march=rv64imc \
8181
-nostdlib \
8282
-Wall -Werror -Wextra -Wno-unused-parameter -Wno-nonnull -fno-builtin-printf -fno-builtin-memcmp -O3 -g -fdata-sections -ffunction-sections \
83+
-Wno-implicit-function-declaration -Wno-visibility \
8384
-I libc \
8485
-I molecule \
8586
-I . \
@@ -95,6 +96,7 @@ ckb-libc-release:
9596
-march=rv64imc \
9697
-nostdlib \
9798
-Wall -Werror -Wextra -Wno-unused-parameter -Wno-nonnull -fno-builtin-printf -fno-builtin-memcmp -O3 -fdata-sections -ffunction-sections \
99+
-Wno-implicit-function-declaration -Wno-visibility \
98100
-I libc \
99101
-I molecule \
100102
-I . \
@@ -129,6 +131,7 @@ test/example:
129131
${CELL} -d -t riscv tests/examples/always-true.cell && ckb-debugger --bin always-true
130132
${CELL} -d -t riscv tests/examples/helloworld.cell && ckb-debugger --bin helloworld | grep "hello world! 1"
131133
${CELL} -t riscv tests/examples/table.cell && ckb-debugger --bin table
134+
${CELL} -d -t riscv tests/examples/string.cell && ckb-debugger --bin string | grep "eq"
132135
${CELL} -t riscv tests/examples/cell-data.cell && ckb-debugger --bin cell-data
133136
${CELL} -t riscv tests/examples/inputs.cell && ckb-debugger --bin inputs
134137
${CELL} -t riscv tests/examples/outputs.cell && ckb-debugger --bin outputs

tests/examples/string.cell

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package main
2+
import "debug"
3+
func main() {
4+
xx := "xxo"
5+
if xx == "xxo" {
6+
debug.Printf("eq")
7+
}
8+
debug.Printf("not")
9+
return 0
10+
}

0 commit comments

Comments
 (0)