Debian Codegraph @

gcc/testsuite/go.go-torture/execute/string-1.go

raw
1 package main
2
3 func fn(s string) int {
4 if s[0] != 'a' || s[1] != 'b' || s[2] != 'c' {
5 panic(0);
6 }
7 return len(s);
8 }
9
10 func main() {
11 s := "abc";
12 if fn(s) != 3 {
13 panic(1);
14 }
15 }