Module Name:    src
Committed By:   plunky
Date:           Sat Apr 16 07:32:27 UTC 2011

Modified Files:
        src/tests/lib/libbluetooth: t_sdp_put.c

Log Message:
test that data element lists are not placed by sdp_put_attr(), as
an attribute/value pair should only contain a single data element


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libbluetooth/t_sdp_put.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/lib/libbluetooth/t_sdp_put.c
diff -u src/tests/lib/libbluetooth/t_sdp_put.c:1.2 src/tests/lib/libbluetooth/t_sdp_put.c:1.3
--- src/tests/lib/libbluetooth/t_sdp_put.c:1.2	Thu Apr  7 08:29:50 2011
+++ src/tests/lib/libbluetooth/t_sdp_put.c	Sat Apr 16 07:32:27 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_sdp_put.c,v 1.2 2011/04/07 08:29:50 plunky Exp $	*/
+/*	$NetBSD: t_sdp_put.c,v 1.3 2011/04/16 07:32:27 plunky Exp $	*/
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -81,10 +81,13 @@
 	uint8_t buf[256];
 	sdp_data_t test = { buf, buf + sizeof(buf) };
 	uint8_t data[] = {
+		0x00,			// nil
 		0x19, 0x33, 0x44,	// uuid16	0x3344
 	};
 	sdp_data_t value = { data, data + sizeof(data) };
 
+	ATF_REQUIRE_EQ(sdp_put_attr(&test, 0xabcd, &value), false);
+	value.next += 1; // skip "nil"
 	ATF_REQUIRE(sdp_put_attr(&test, 0x1337, &value));
 	test.end = test.next;
 	test.next = buf;

Reply via email to