tlv: Use the encoding/decoding functions for "double" from ndn-cxx
refs: #4615
Change-Id: I0bde7085876646f272ee6006f4d3cfbd513d4ffd
diff --git a/tests/tlv/test-lsdb-status.cpp b/tests/tlv/test-lsdb-status.cpp
index 12284e8..c058fb1 100644
--- a/tests/tlv/test-lsdb-status.cpp
+++ b/tests/tlv/test-lsdb-status.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2014-2017, The University of Memphis,
+ * Copyright (c) 2014-2019, The University of Memphis,
* Regents of the University of California,
* Arizona Board of Regents.
*
@@ -34,7 +34,7 @@
const uint8_t LsdbStatusData1[] =
{
// Header
- 0x8a, 0x7f,
+ 0x8a, 0x7b,
// AdjacencyLsa
0x83, 0x32,
// LsaInfo
@@ -44,15 +44,15 @@
0x84, 0x1d, 0x07, 0x0c, 0x08, 0x0a, 0x61, 0x64, 0x6a, 0x61, 0x63, 0x65, 0x6e, 0x63,
0x79, 0x31, 0x8d, 0x0a, 0x61, 0x64, 0x6a, 0x61, 0x63, 0x65, 0x6e, 0x63, 0x79, 0x31,
0x8c, 0x01, 0x80,
- // CoordianteLsa
- 0x85, 0x2b,
+ // CoordinateLsa
+ 0x85, 0x27,
// LsaInfo
0x80, 0x11, 0x81, 0x08, 0x07, 0x06, 0x08, 0x04, 0x74, 0x65, 0x73, 0x74, 0x82, 0x01,
0x80, 0x8b, 0x02, 0x27, 0x10,
// HyperbolicRadius
- 0x87, 0x0a, 0x86, 0x08, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0xfa, 0x3f,
+ 0x87, 0x08, 0x3f, 0xfa, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66,
// HyperbolicAngle
- 0x88, 0x0a, 0x86, 0x08, 0x7b, 0x14, 0xae, 0x47, 0xe1, 0x7a, 0xfc, 0x3f,
+ 0x88, 0x08, 0x3f, 0xfc, 0x7a, 0xe1, 0x47, 0xae, 0x14, 0x7b,
// NameLsa
0x89, 0x1c,
// LsaInfo
@@ -71,16 +71,16 @@
const uint8_t LsdbStatusData3[] =
{
// Header
- 0x8a, 0x7f,
+ 0x8a, 0x7b,
// CoordianteLsa
- 0x85, 0x2b,
+ 0x85, 0x27,
// LsaInfo
0x80, 0x11, 0x81, 0x08, 0x07, 0x06, 0x08, 0x04, 0x74, 0x65, 0x73, 0x74, 0x82, 0x01,
- 0x80, 0x8b, 0x02, 0x27, 0x10,
+ 0x80, 0x8B, 0x02, 0x27, 0x10,
// HyperbolicRadius
- 0x87, 0x0a, 0x86, 0x08, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0xfa, 0x3f,
+ 0x87, 0x08, 0x3F, 0xFA, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66,
// HyperbolicAngle
- 0x88, 0x0a, 0x86, 0x08, 0x7b, 0x14, 0xae, 0x47, 0xe1, 0x7a, 0xfc, 0x3f,
+ 0x88, 0x08, 0x3F, 0xFC, 0x7A, 0xE1, 0x47, 0xAE, 0x14, 0x7B,
// NameLsa
0x89, 0x1c,
// LsaInfo
@@ -89,14 +89,14 @@
// Name
0x07, 0x07, 0x08, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x31,
// AdjacencyLsa
- 0x83, 0x32,
- // LsaInfo
- 0x80, 0x11, 0x81, 0x08, 0x07, 0x06, 0x08, 0x04, 0x74, 0x65, 0x73, 0x74, 0x82, 0x01,
- 0x80, 0x8b, 0x02, 0x27, 0x10,
- // Adjacency
- 0x84, 0x1d, 0x07, 0x0c, 0x08, 0x0a, 0x61, 0x64, 0x6a, 0x61, 0x63, 0x65, 0x6e, 0x63,
- 0x79, 0x31, 0x8d, 0x0a, 0x61, 0x64, 0x6a, 0x61, 0x63, 0x65, 0x6e, 0x63, 0x79, 0x31,
- 0x8c, 0x01, 0x80
+ 0x83, 0x32,
+ // LsaInfo
+ 0x80, 0x11, 0x81, 0x08, 0x07, 0x06, 0x08, 0x04, 0x74, 0x65, 0x73, 0x74, 0x82, 0x01,
+ 0x80, 0x8B, 0x02, 0x27, 0x10,
+ // Adjacency
+ 0x84, 0x1d, 0x07, 0x0c, 0x08, 0x0a, 0x61, 0x64, 0x6a, 0x61, 0x63, 0x65, 0x6e, 0x63,
+ 0x79, 0x31, 0x8d, 0x0a, 0x61, 0x64, 0x6a, 0x61, 0x63, 0x65, 0x6e, 0x63, 0x79, 0x31,
+ 0x8c, 0x01, 0x80
};
BOOST_AUTO_TEST_CASE(LsdbStatusEncode1)
@@ -150,7 +150,6 @@
LsdbStatus lsdbStatus;
const ndn::Block& wire = lsdbStatus.wireEncode();
-
BOOST_REQUIRE_EQUAL_COLLECTIONS(LsdbStatusData2,
LsdbStatusData2 + sizeof(LsdbStatusData2),
wire.begin(), wire.end());