Changeset 310 for trunk

Show
Ignore:
Timestamp:
04/27/2008 08:59:21 (7 months ago)
Author:
indeyets
Message:

proper check for test-engine

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/tests/YTS.c

    r229 r310  
    159159 
    160160        /* Add document to stream */ 
    161         syck_lookup_sym( parser, oid, (char **)&ydoc ); 
     161        int res = syck_lookup_sym( parser, oid, (char **)&ydoc ); 
     162        if (0 == res) 
     163            break; 
     164 
    162165        ystream[doc_ct] = ydoc[0]; 
    163166        doc_ct++; 
     
    279282YtsFoldedScalars_7( CuTest *tc ) 
    280283{ 
    281 struct test_node map[] = { 
    282     { T_STR, 0, "a" }, 
     284    struct test_node map[] = { 
     285        { T_STR, 0, "a" }, 
    283286        { T_STR, 0, "b" }, 
    284     end_node 
    285 }; 
    286 struct test_node stream[] = { 
    287     { T_MAP, 0, 0, map }, 
    288     end_node 
    289 }; 
    290  
    291     CuStreamCompare( tc, 
    292  
    293         /* YAML document */  
    294 "a: b\t  \n" 
    295         , 
    296  
    297         /* C structure of validations */ 
    298         stream 
    299     ); 
    300  
    301     CuRoundTrip( tc, stream ); 
    302 } 
     287        end_node 
     288    }; 
     289 
     290    struct test_node stream[] = { 
     291        { T_MAP, 0, 0, map }, 
     292        end_node 
     293    }; 
     294 
     295    CuStreamCompare( tc, "a: b\t  \n", stream ); 
     296    CuRoundTrip( tc, stream ); 
     297} 
     298 
    303299/* 
    304300 * Example : Empty Sequence