We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cddd809 commit 0bcf493Copy full SHA for 0bcf493
src/test/run-pass/task-comm-16.rs
@@ -34,6 +34,22 @@ impure fn test_vec() {
34
check (v1.(2) == 2);
35
}
36
37
+impure fn test_str() {
38
+ let port[str] po = port();
39
+ let chan[str] ch = chan(po);
40
+ let str s0 = "test";
41
+
42
+ ch <| s0;
43
44
+ let str s1;
45
+ s1 <- po;
46
47
+ check (s1.(0) as u8 == 't' as u8);
48
+ check (s1.(1) as u8 == 'e' as u8);
49
+ check (s1.(2) as u8 == 's' as u8);
50
+ check (s1.(3) as u8 == 't' as u8);
51
+}
52
53
impure fn test_tup() {
54
type t = tup(int, u8, char);
55
@@ -99,6 +115,7 @@ impure fn test_chan() {
99
115
impure fn main() {
100
116
test_rec();
101
117
test_vec();
118
+ test_str();
102
119
test_tup();
103
120
test_tag();
104
121
test_chan();
0 commit comments