src/test.c
changeset 47 7d4094eb3117
parent 46 0c13bca53ae1
child 49 96e0f703a58c
equal deleted inserted replaced
46:0c13bca53ae1 47:7d4094eb3117
    91     char *buf;
    91     char *buf;
    92     size_t len;
    92     size_t len;
    93     
    93     
    94     sock_test_get_send_data(sock, &buf, &len);
    94     sock_test_get_send_data(sock, &buf, &len);
    95     
    95     
    96     log_debug("get_send_data: '%*s'", (int) len, buf);
    96     log_debug("get_send_data: '%.*s'", (int) len, buf);
    97     
    97     
    98     // should be the same
    98     // should be the same
    99     assert_strncmp(buf, data, len);
    99     assert_strncmp(buf, data, len);
   100     assert_strlen(data, len);
   100     assert_strlen(data, len);
   101 
   101 
   406 
   406 
   407     // test errors by setting EOF
   407     // test errors by setting EOF
   408     log_info("test irc_net_error");
   408     log_info("test irc_net_error");
   409     sock_test_set_recv_eof(sock);
   409     sock_test_set_recv_eof(sock);
   410     assert(net->conn == NULL);
   410     assert(net->conn == NULL);
       
   411 
       
   412     // cleanup
       
   413     irc_net_destroy(net);
   411 }
   414 }
   412 
   415 
   413 /**
   416 /**
   414  * Test definition
   417  * Test definition
   415  */
   418  */