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 | |
parent | 120afa6058ba579887a9b417ec86cf06926d765e (diff) | |
download | gnunet-83a9103243b5fd0aa5924956ae0249a1273b062d.tar.gz gnunet-83a9103243b5fd0aa5924956ae0249a1273b062d.zip |
fixing testcases to match new api
-rw-r--r-- | src/util/test_disk.c | 10 | ||||
-rw-r--r-- | src/util/test_os_load.c | 4 |
2 files changed, 7 insertions, 7 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; |
diff --git a/src/util/test_os_load.c b/src/util/test_os_load.c index 4885ed3bb..ffd809edb 100644 --- a/src/util/test_os_load.c +++ b/src/util/test_os_load.c | |||
@@ -99,7 +99,7 @@ static int | |||
99 | testdisk () | 99 | testdisk () |
100 | { | 100 | { |
101 | int ret; | 101 | int ret; |
102 | struct GNUNET_IO_Handle *fh; | 102 | struct GNUNET_DISK_FileHandle *fh; |
103 | char buf[65536]; | 103 | char buf[65536]; |
104 | struct GNUNET_TIME_Absolute start; | 104 | struct GNUNET_TIME_Absolute start; |
105 | struct GNUNET_CONFIGURATION_Handle *cfg; | 105 | struct GNUNET_CONFIGURATION_Handle *cfg; |
@@ -145,7 +145,7 @@ testdisk () | |||
145 | if (ret < GNUNET_OS_load_disk_get (cfg)) | 145 | if (ret < GNUNET_OS_load_disk_get (cfg)) |
146 | break; | 146 | break; |
147 | } | 147 | } |
148 | GNUNET_break (GNUNET_OK == GNUNET_DISK_file_close (&fh)); | 148 | GNUNET_break (GNUNET_OK == GNUNET_DISK_file_close (fh)); |
149 | GNUNET_break (0 == UNLINK (".loadfile")); | 149 | GNUNET_break (0 == UNLINK (".loadfile")); |
150 | if (ret >= GNUNET_OS_load_disk_get (cfg)) | 150 | if (ret >= GNUNET_OS_load_disk_get (cfg)) |
151 | { | 151 | { |