/*
* Copyright (c) Zmanda Inc. All Rights Reserved.
*
- * This library is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License version 2.1 as
- * published by the Free Software Foundation.
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
#include "testutils.h"
#include "simpleprng.h"
-static int test_encode(void);
-static int test_decode(void);
-static int test_roundtrip(void);
-static int test_roundtrip_rand(void);
+static gboolean test_encode(void);
+static gboolean test_decode(void);
+static gboolean test_roundtrip(void);
+static gboolean test_roundtrip_rand(void);
typedef struct {char *in; char *out;} enc_vec;
-static int
+static gboolean
test_encode(void)
{
static const enc_vec test_strs[] = {
{"\nhi\n", "%0ahi%0a"}
};
static const int num = sizeof(test_strs)/sizeof(enc_vec);
- int i, ret;
+ int i;
+ gboolean ret;
char *tmp;
ret = TRUE;
}
typedef struct {char *in; char *out; gboolean expect_err; } dec_vec;
-static int
+static gboolean
test_decode(void)
{
static const dec_vec test_strs[] = {
{"%00", "", TRUE}
};
static const int num = sizeof(test_strs)/sizeof(dec_vec);
- int i, ret;
+ int i;
+ gboolean ret;
char *tmp;
GError *err = NULL;
}
typedef char* round_vec;
-static int
+static gboolean
test_roundtrip(void)
{
static const round_vec test_strs[] = {
"h%"
};
static const int num = sizeof(test_strs)/sizeof(round_vec);
- int i, ret;
+ int i;
+ gboolean ret;
char *tmp_enc = NULL, *tmp_dec = NULL;
GError *err = NULL;
return ret;
}
-static int
+static gboolean
test_roundtrip_rand(void)
{
- int i, ret;
+ int i;
+ gboolean ret;
simpleprng_state_t state;
char *in, *tmp_enc = NULL, *tmp_dec = NULL;
size_t size;