aboutsummaryrefslogtreecommitdiff
path: root/testcode/unitanchor.c
diff options
context:
space:
mode:
Diffstat (limited to 'testcode/unitanchor.c')
-rw-r--r--testcode/unitanchor.c33
1 files changed, 17 insertions, 16 deletions
diff --git a/testcode/unitanchor.c b/testcode/unitanchor.c
index de4106a8081f..8047eb2bf988 100644
--- a/testcode/unitanchor.c
+++ b/testcode/unitanchor.c
@@ -21,16 +21,16 @@
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
- * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+ * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/**
@@ -39,11 +39,12 @@
*/
#include "config.h"
-#include <ldns/rr.h>
#include "util/log.h"
#include "util/data/dname.h"
#include "testcode/unitmain.h"
#include "validator/val_anchor.h"
+#include "ldns/sbuffer.h"
+#include "ldns/rrdef.h"
/** test empty set */
static void
@@ -63,7 +64,7 @@ test_anchor_empty(struct val_anchors* a)
/** test set of one anchor */
static void
-test_anchor_one(ldns_buffer* buff, struct val_anchors* a)
+test_anchor_one(sldns_buffer* buff, struct val_anchors* a)
{
struct trust_anchor* ta;
uint16_t c = LDNS_RR_CLASS_IN;
@@ -91,7 +92,7 @@ test_anchor_one(ldns_buffer* buff, struct val_anchors* a)
/** test with several anchors */
static void
-test_anchors(ldns_buffer* buff, struct val_anchors* a)
+test_anchors(sldns_buffer* buff, struct val_anchors* a)
{
struct trust_anchor* ta;
uint16_t c = LDNS_RR_CLASS_IN;
@@ -123,14 +124,14 @@ test_anchors(ldns_buffer* buff, struct val_anchors* a)
void anchors_test(void)
{
- ldns_buffer* buff = ldns_buffer_new(65800);
+ sldns_buffer* buff = sldns_buffer_new(65800);
struct val_anchors* a;
unit_show_feature("trust anchor store");
unit_assert(a = anchors_create());
- ldns_buffer_flip(buff);
+ sldns_buffer_flip(buff);
test_anchor_empty(a);
test_anchor_one(buff, a);
test_anchors(buff, a);
anchors_delete(a);
- ldns_buffer_free(buff);
+ sldns_buffer_free(buff);
}