File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: cddd8094da090bb5522aec3c0b344b8014d37d2d
2
+ refs/heads/master: 0bcf49305cf34d6894c94b2eb8efcb3c022ffc0d
Original file line number Diff line number Diff line change @@ -34,6 +34,22 @@ impure fn test_vec() {
34
34
check ( v1. ( 2 ) == 2 ) ;
35
35
}
36
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
+
37
53
impure fn test_tup ( ) {
38
54
type t = tup ( int , u8 , char ) ;
39
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 ( ) ;
You can’t perform that action at this time.
0 commit comments