aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2018-11-22 19:30:14 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2018-11-22 22:34:59 +0100
commitd88eee8fcf23e20ae76b3dd346b36af693849ccd (patch)
tree31407c1ef67b8e6a7f96189fc29906d70500346e /test
parente8aa2eadf309fbc0c0e1418c6bee482e505fa09b (diff)
downloadble-toys-d88eee8fcf23e20ae76b3dd346b36af693849ccd.tar.gz
ble-toys-d88eee8fcf23e20ae76b3dd346b36af693849ccd.tar.bz2
ble-toys-d88eee8fcf23e20ae76b3dd346b36af693849ccd.tar.xz
ble-toys-d88eee8fcf23e20ae76b3dd346b36af693849ccd.zip
o Working enabling of notifications.
Diffstat (limited to 'test')
-rw-r--r--test/ByteBufferTest.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/ByteBufferTest.cpp b/test/ByteBufferTest.cpp
index ca7a999..f8190c5 100644
--- a/test/ByteBufferTest.cpp
+++ b/test/ByteBufferTest.cpp
@@ -27,7 +27,7 @@ public:
}
~Bytes() {
- delete secret;
+ delete[] secret;
}
uint8_t* bytes;
@@ -85,13 +85,13 @@ BOOST_AUTO_TEST_CASE(view) {
ByteBuffer buffer(b.bytes, b.capacity);
BOOST_CHECK_EQUAL(buffer.read8(), 0);
- ByteBuffer view1 = buffer.view();
+ ByteBuffer view1 = buffer.viewRest();
checkBuffer(view1, 999, 0);
BOOST_CHECK_EQUAL(view1.read8(), 1);
BOOST_CHECK_EQUAL(view1.read8(), 2);
- ByteBuffer view2 = view1.view();
+ ByteBuffer view2 = view1.viewRest();
checkBuffer(view2, 997, 0);
BOOST_CHECK_EQUAL(view1.read8(), 3);