aboutsummaryrefslogtreecommitdiff
path: root/src/util/test_bio.c
diff options
context:
space:
mode:
authorJi Lu <jilu@140774ce-b5e7-0310-ab8b-a85725594a96>2009-11-08 22:15:45 +0000
committerJi Lu <jilu@140774ce-b5e7-0310-ab8b-a85725594a96>2009-11-08 22:15:45 +0000
commit608fd870746a39a82c06fe9904d050af778c57d8 (patch)
tree1b9f9c9366d1e6955e8c5abdf0e5bcf91ce5cb2f /src/util/test_bio.c
parent65b0ebc8c31d7069df93a5e63a57007f372d035a (diff)
downloadgnunet-608fd870746a39a82c06fe9904d050af778c57d8.tar.gz
gnunet-608fd870746a39a82c06fe9904d050af778c57d8.zip
98% test_bio.c
Diffstat (limited to 'src/util/test_bio.c')
-rw-r--r--src/util/test_bio.c25
1 files changed, 19 insertions, 6 deletions
diff --git a/src/util/test_bio.c b/src/util/test_bio.c
index 06dcfacc8..6fb132325 100644
--- a/src/util/test_bio.c
+++ b/src/util/test_bio.c
@@ -186,6 +186,19 @@ test_bigmeta_rw ()
186} 186}
187 187
188static int 188static int
189test_directory_r(void){
190 char *msg;
191 char readResult[200];
192 const char *fileName = "/dev";
193 struct GNUNET_BIO_ReadHandle *fileR;
194 fileR = GNUNET_BIO_read_open (fileName);
195 GNUNET_assert (NULL != fileR);
196 GNUNET_assert (GNUNET_SYSERR == GNUNET_BIO_read (fileR, "Read error", readResult, 65537));
197 GNUNET_BIO_read_close (fileR, &msg);
198 return 0;
199}
200
201static int
189test_nullfile_rw (void) 202test_nullfile_rw (void)
190{ 203{
191 char *msg; 204 char *msg;
@@ -343,14 +356,14 @@ check_file_rw (void)
343{ 356{
344 GNUNET_assert (0 == test_normal_rw ()); 357 GNUNET_assert (0 == test_normal_rw ());
345 GNUNET_assert (0 == test_nullfile_rw ()); 358 GNUNET_assert (0 == test_nullfile_rw ());
359 GNUNET_assert (0 == test_directory_r());
346 return 0; 360 return 0;
347} 361}
348 362
349int 363int
350main (int argc, char *argv[]) 364main (int argc, char *argv[]){
351{ 365 GNUNET_assert (0 == check_file_rw());
352 GNUNET_assert (0 == check_file_rw ()); 366 GNUNET_assert (0 == check_metadata_rw());
353 GNUNET_assert (0 == check_metadata_rw ()); 367 GNUNET_assert (0 == check_string_rw());
354 GNUNET_assert (0 == check_string_rw ()); 368 return 0;
355 return 0;
356} /* end of main */ 369} /* end of main */