diff options
author | Christian Grothoff <christian@grothoff.org> | 2009-07-07 20:41:19 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2009-07-07 20:41:19 +0000 |
commit | 83a9103243b5fd0aa5924956ae0249a1273b062d (patch) | |
tree | 573e6cd363a63b09257f3af0b314ec72331d62ee /src/util/test_disk.c | |
parent | 120afa6058ba579887a9b417ec86cf06926d765e (diff) | |
download | gnunet-83a9103243b5fd0aa5924956ae0249a1273b062d.tar.gz gnunet-83a9103243b5fd0aa5924956ae0249a1273b062d.zip |
fixing testcases to match new api
Diffstat (limited to 'src/util/test_disk.c')
-rw-r--r-- | src/util/test_disk.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/util/test_disk.c b/src/util/test_disk.c index f89b1de25..772ca2889 100644 --- a/src/util/test_disk.c +++ b/src/util/test_disk.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of GNUnet. | 2 | This file is part of GNUnet. |
3 | (C) 2001, 2002, 2003, 2005, 2006 Christian Grothoff (and other contributing authors) | 3 | (C) 2001, 2002, 2003, 2005, 2006, 2009 Christian Grothoff (and other contributing authors) |
4 | 4 | ||
5 | GNUnet is free software; you can redistribute it and/or modify | 5 | GNUnet is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published | 6 | it under the terms of the GNU General Public License as published |
@@ -85,7 +85,7 @@ testReadWrite () | |||
85 | static int | 85 | static int |
86 | testOpenClose () | 86 | testOpenClose () |
87 | { | 87 | { |
88 | struct GNUNET_IO_Handle *fh; | 88 | struct GNUNET_DISK_FileHandle *fh; |
89 | unsigned long long size; | 89 | unsigned long long size; |
90 | long avail; | 90 | long avail; |
91 | 91 | ||
@@ -94,7 +94,7 @@ testOpenClose () | |||
94 | | GNUNET_DISK_PERM_USER_WRITE); | 94 | | GNUNET_DISK_PERM_USER_WRITE); |
95 | GNUNET_assert (GNUNET_NO == GNUNET_DISK_handle_invalid (fh)); | 95 | GNUNET_assert (GNUNET_NO == GNUNET_DISK_handle_invalid (fh)); |
96 | GNUNET_break (5 == GNUNET_DISK_file_write (fh, "Hello", 5)); | 96 | GNUNET_break (5 == GNUNET_DISK_file_write (fh, "Hello", 5)); |
97 | GNUNET_DISK_file_close (&fh); | 97 | GNUNET_DISK_file_close (fh); |
98 | GNUNET_break (GNUNET_OK == | 98 | GNUNET_break (GNUNET_OK == |
99 | GNUNET_DISK_file_size (".testfile", &size, GNUNET_NO)); | 99 | GNUNET_DISK_file_size (".testfile", &size, GNUNET_NO)); |
100 | if (size != 5) | 100 | if (size != 5) |
@@ -113,11 +113,11 @@ testOpenClose () | |||
113 | (avail != -1)) | 113 | (avail != -1)) |
114 | if (16 != GNUNET_DISK_file_write (fh, "HelloWorld123456", 16)) | 114 | if (16 != GNUNET_DISK_file_write (fh, "HelloWorld123456", 16)) |
115 | { | 115 | { |
116 | GNUNET_DISK_file_close (&fh); | 116 | GNUNET_DISK_file_close (fh); |
117 | GNUNET_break (0 == UNLINK (".testfile")); | 117 | GNUNET_break (0 == UNLINK (".testfile")); |
118 | return 1; | 118 | return 1; |
119 | } | 119 | } |
120 | GNUNET_DISK_file_close (&fh); | 120 | GNUNET_DISK_file_close (fh); |
121 | GNUNET_break (0 == UNLINK (".testfile")); | 121 | GNUNET_break (0 == UNLINK (".testfile")); |
122 | 122 | ||
123 | return 0; | 123 | return 0; |