pass_bool_string.go raw
1 package main
2
3 func wbool(x bool) {
4 if x {
5 println("PASS:bool")
6 } else {
7 println("FAIL:bool")
8 }
9 }
10
11 func wstring(x string) {
12 if x == "hello moxie" {
13 println("PASS:string")
14 } else {
15 println("FAIL:string")
16 }
17 }
18
19 func wbyte(x byte) {
20 if x == 0xFF {
21 println("PASS:byte")
22 } else {
23 println("FAIL:byte")
24 }
25 }
26
27 func wrune(x rune) {
28 if x == 0x1F600 {
29 println("PASS:rune")
30 } else {
31 println("FAIL:rune")
32 }
33 }
34
35 func main() {
36 spawn(wbool, true)
37 spawn(wstring, "hello moxie")
38 spawn(wbyte, byte(0xFF))
39 spawn(wrune, rune(0x1F600))
40 for i := int32(0); i < 50000000; i++ {
41 }
42 }
43