Convert to span and avoid deprecated ndn-cxx functions
Change-Id: I260639ef4c13e6a492b29d3b976cca0ae29876cb
diff --git a/tests/test-util.cpp b/tests/test-util.cpp
index e37957a..8020fe4 100644
--- a/tests/test-util.cpp
+++ b/tests/test-util.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/*
- * Copyright (c) 2014-2020, The University of Memphis
+ * Copyright (c) 2014-2022, The University of Memphis
*
* This file is part of PSync.
* See AUTHORS.md for complete list of PSync authors and contributors.
@@ -56,14 +56,14 @@
const uint8_t uncompressed[] = {'t', 'e', 's', 't'};
for (const auto& s : supported) {
- BOOST_CHECK_NO_THROW(compress(s, uncompressed, sizeof(uncompressed)));
- auto compressed = compress(s, uncompressed, sizeof(uncompressed));
- BOOST_CHECK_NO_THROW(decompress(s, compressed->data(), compressed->size()));
+ BOOST_CHECK_NO_THROW(compress(s, uncompressed));
+ auto compressed = compress(s, uncompressed);
+ BOOST_CHECK_NO_THROW(decompress(s, *compressed));
}
for (const auto& s : notSupported) {
- BOOST_CHECK_THROW(compress(s, uncompressed, sizeof(uncompressed)), CompressionError);
- BOOST_CHECK_THROW(decompress(s, uncompressed, sizeof(uncompressed)), CompressionError);
+ BOOST_CHECK_THROW(compress(s, uncompressed), CompressionError);
+ BOOST_CHECK_THROW(decompress(s, uncompressed), CompressionError);
}
}