File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,11 +12,5 @@ pub fn main() {
1212fn main_0 ( ) -> i32 {
1313 assert ! ( ( ( ( libc:: SOCK_STREAM == 1 ) as i32 ) != 0 ) ) ;
1414 assert ! ( ( ( ( libc:: SOCK_DGRAM == 2 ) as i32 ) != 0 ) ) ;
15- let x: Value < i32 > = Rc :: new ( RefCell :: new ( ( libc:: SOCK_STREAM | libc:: SOCK_CLOEXEC ) ) ) ;
16- assert ! ( ( ( ( ( ( * x. borrow( ) ) & libc:: SOCK_STREAM ) == libc:: SOCK_STREAM ) as i32 ) != 0 ) ) ;
17- assert ! ( ( ( ( ( ( * x. borrow( ) ) & libc:: SOCK_CLOEXEC ) == libc:: SOCK_CLOEXEC ) as i32 ) != 0 ) ) ;
18- let y: Value < i32 > = Rc :: new ( RefCell :: new ( ( libc:: SOCK_DGRAM | libc:: SOCK_NONBLOCK ) ) ) ;
19- assert ! ( ( ( ( ( ( * y. borrow( ) ) & libc:: SOCK_DGRAM ) == libc:: SOCK_DGRAM ) as i32 ) != 0 ) ) ;
20- assert ! ( ( ( ( ( ( * y. borrow( ) ) & libc:: SOCK_NONBLOCK ) == libc:: SOCK_NONBLOCK ) as i32 ) != 0 ) ) ;
2115 return 0 ;
2216}
Original file line number Diff line number Diff line change @@ -14,11 +14,5 @@ pub fn main() {
1414unsafe fn main_0 ( ) -> i32 {
1515 assert ! ( ( ( ( ( libc:: SOCK_STREAM ) == ( 1 ) ) as i32 ) != 0 ) ) ;
1616 assert ! ( ( ( ( ( libc:: SOCK_DGRAM ) == ( 2 ) ) as i32 ) != 0 ) ) ;
17- let mut x: i32 = ( ( libc:: SOCK_STREAM ) | ( libc:: SOCK_CLOEXEC ) ) ;
18- assert ! ( ( ( ( ( ( x) & ( libc:: SOCK_STREAM ) ) == ( libc:: SOCK_STREAM ) ) as i32 ) != 0 ) ) ;
19- assert ! ( ( ( ( ( ( x) & ( libc:: SOCK_CLOEXEC ) ) == ( libc:: SOCK_CLOEXEC ) ) as i32 ) != 0 ) ) ;
20- let mut y: i32 = ( ( libc:: SOCK_DGRAM ) | ( libc:: SOCK_NONBLOCK ) ) ;
21- assert ! ( ( ( ( ( ( y) & ( libc:: SOCK_DGRAM ) ) == ( libc:: SOCK_DGRAM ) ) as i32 ) != 0 ) ) ;
22- assert ! ( ( ( ( ( ( y) & ( libc:: SOCK_NONBLOCK ) ) == ( libc:: SOCK_NONBLOCK ) ) as i32 ) != 0 ) ) ;
2317 return 0 ;
2418}
Original file line number Diff line number Diff line change 55int main () {
66 assert (SOCK_STREAM == 1 );
77 assert (SOCK_DGRAM == 2 );
8-
9- #ifdef __linux__
10- int x = SOCK_STREAM | SOCK_CLOEXEC ;
11- assert ((x & SOCK_STREAM ) == SOCK_STREAM );
12- assert ((x & SOCK_CLOEXEC ) == SOCK_CLOEXEC );
13-
14- int y = SOCK_DGRAM | SOCK_NONBLOCK ;
15- assert ((y & SOCK_DGRAM ) == SOCK_DGRAM );
16- assert ((y & SOCK_NONBLOCK ) == SOCK_NONBLOCK );
17- #endif
18-
198 return 0 ;
209}
You can’t perform that action at this time.
0 commit comments