@@ -20,14 +20,14 @@ macro_rules! function_name {
2020 type_name_of( f)
2121 . rsplit( "::" )
2222 . find( |& part| part != "f" && part != "{{closure}}" )
23- . expect( "faled to get function name" )
23+ . expect( "failed to get function name" )
2424 } } ;
2525}
2626
2727macro_rules! assert_contains {
28- ( $string: expr, $substring: expr $ ( , ) ? ) => { {
29- let string_ref: & str = & $string;
30- let substring_ref: & str = & $substring;
28+ ( $string: expr, $substring: expr) => { {
29+ let string_ref: & str = & ( $string) ;
30+ let substring_ref: & str = & ( $substring) ;
3131 assert!(
3232 string_ref. contains( substring_ref) ,
3333 "Expected `{}` to contain `{}`" ,
@@ -38,9 +38,9 @@ macro_rules! assert_contains {
3838}
3939
4040macro_rules! assert_not_contains {
41- ( $string: expr, $substring: expr $ ( , ) ? ) => { {
42- let string_ref: & str = & $string;
43- let substring_ref: & str = & $substring;
41+ ( $string: expr, $substring: expr) => { {
42+ let string_ref: & str = & ( $string) ;
43+ let substring_ref: & str = & ( $substring) ;
4444 assert!(
4545 !string_ref. contains( substring_ref) ,
4646 "Expected `{}` NOT to contain `{}`" ,
@@ -104,6 +104,7 @@ fn altstack_test(
104104) {
105105 common:: setup ( ) ;
106106
107+ // Defines the code the forked process will execute
107108 let body = || {
108109 configure_altstack ( ) ;
109110
@@ -125,12 +126,13 @@ fn altstack_test(
125126 unsafe { throw_fn ( ) } ;
126127 } ;
127128
129+ // Pipe stdout and stderr
128130 fn configure_child ( child : & mut std:: process:: Command ) {
129131 child. stdout ( Stdio :: piped ( ) ) ;
130132 child. stderr ( Stdio :: piped ( ) ) ;
131133 }
132134
133- // Define how to supervise the child process
135+ // Define how to verifz the output ot the child.
134136 let supervise = |child : & mut ChildWrapper , _file : & mut std:: fs:: File | {
135137 let mut stdout = String :: new ( ) ;
136138 child
0 commit comments