Skip to content

Commit

Permalink
add test case for string
Browse files Browse the repository at this point in the history
  • Loading branch information
douyixuan committed Jul 21, 2024
1 parent 76ed103 commit b3de68a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ ckb-libc-debug:
-march=rv64imc \
-nostdlib \
-Wall -Werror -Wextra -Wno-unused-parameter -Wno-nonnull -fno-builtin-printf -fno-builtin-memcmp -O3 -g -fdata-sections -ffunction-sections \
-Wno-implicit-function-declaration -Wno-visibility \
-I libc \
-I molecule \
-I . \
Expand All @@ -95,6 +96,7 @@ ckb-libc-release:
-march=rv64imc \
-nostdlib \
-Wall -Werror -Wextra -Wno-unused-parameter -Wno-nonnull -fno-builtin-printf -fno-builtin-memcmp -O3 -fdata-sections -ffunction-sections \
-Wno-implicit-function-declaration -Wno-visibility \
-I libc \
-I molecule \
-I . \
Expand Down Expand Up @@ -129,6 +131,7 @@ test/example:
${CELL} -d -t riscv tests/examples/always-true.cell && ckb-debugger --bin always-true
${CELL} -d -t riscv tests/examples/helloworld.cell && ckb-debugger --bin helloworld | grep "hello world! 1"
${CELL} -t riscv tests/examples/table.cell && ckb-debugger --bin table
${CELL} -d -t riscv tests/examples/string.cell && ckb-debugger --bin string | grep "eq"
${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
10 changes: 10 additions & 0 deletions tests/examples/string.cell
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package main
import "debug"
func main() {
xx := "xxo"
if xx == "xxo" {
debug.Printf("eq")
}
debug.Printf("not")
return 0
}

0 comments on commit b3de68a

Please sign in to comment.