WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Affero General Public License for more details.
-*/
+
+ You should have received a copy of the GNU Affero General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ SPDX-License-Identifier: AGPL3.0-or-later
+ */
/**
* @file util/test_bio.c
#include "platform.h"
#include "gnunet_util_lib.h"
#define TESTSTRING "testString"
-#define TESTNUMBER64 ((int64_t)100000L)
+#define TESTNUMBER64 ((int64_t) 100000L)
static int
test_normal_rw ()
return 0;
}
+
static int
test_nullstring_rw ()
{
return 0;
}
+
static int
test_emptystring_rw ()
{
return 0;
}
+
static int
test_bigstring_rw ()
{
return 0;
}
+
static int
test_bigmeta_rw ()
{
char *fileName = GNUNET_DISK_mktemp ("gnunet_bio");
struct GNUNET_CONTAINER_MetaData *metaDataR;
- memset (meta, 'b', sizeof (meta));
- meta[sizeof (meta) - 1] = '\0';
+ memset (meta, 'b', sizeof(meta));
+ meta[sizeof(meta) - 1] = '\0';
fileW = GNUNET_BIO_write_open (fileName);
GNUNET_assert (NULL != fileW);
- GNUNET_assert (GNUNET_OK == GNUNET_BIO_write_int32 (fileW, sizeof (meta)));
- GNUNET_assert (GNUNET_OK == GNUNET_BIO_write (fileW, meta, sizeof (meta)));
+ GNUNET_assert (GNUNET_OK == GNUNET_BIO_write_int32 (fileW, sizeof(meta)));
+ GNUNET_assert (GNUNET_OK == GNUNET_BIO_write (fileW, meta, sizeof(meta)));
GNUNET_assert (GNUNET_OK == GNUNET_BIO_write_close (fileW));
fileR = GNUNET_BIO_read_open (fileName);
return 0;
}
+
static int
test_directory_r ()
{
GNUNET_assert (NULL != fileR);
GNUNET_assert (GNUNET_SYSERR ==
GNUNET_BIO_read (fileR, "Read error", readResult,
- sizeof (readResult)));
+ sizeof(readResult)));
msg = NULL;
GNUNET_BIO_read_close (fileR, &msg);
GNUNET_free (msg);
return 0;
}
+
static int
test_nullfile_rw ()
{
struct GNUNET_BIO_WriteHandle *fileWNO;
struct GNUNET_BIO_ReadHandle *fileRNO;
- memset (fileNameNO, 'a', sizeof (fileNameNO));
- fileNameNO[sizeof (fileNameNO) - 1] = '\0';
+ memset (fileNameNO, 'a', sizeof(fileNameNO));
+ fileNameNO[sizeof(fileNameNO) - 1] = '\0';
GNUNET_log_skip (1, GNUNET_NO);
fileWNO = GNUNET_BIO_write_open (fileNameNO);
GNUNET_assert (NULL != fileR);
GNUNET_assert (GNUNET_SYSERR ==
GNUNET_BIO_read (fileR, "Read error", readResult,
- sizeof (readResult)));
+ sizeof(readResult)));
readResultString = NULL;
GNUNET_assert (GNUNET_SYSERR ==
GNUNET_BIO_read_string (fileR, "Read string error",
return 0;
}
+
static int
test_fakestring_rw ()
{
return 0;
}
+
static int
test_fakemeta_rw ()
{
return 0;
}
+
static int
test_fakebigmeta_rw ()
{
return 0;
}
+
static int
check_string_rw ()
{
return 0;
}
+
static int
check_metadata_rw ()
{
return 0;
}
+
static int
check_file_rw ()
{
return 0;
}
+
int
main (int argc, char *argv[])
{
return 0;
}
+
/* end of test_bio.c */