NavMap
Loading...
Searching...
No Matches
test_layer_metadata_and_migration.cpp File Reference
#include <gtest/gtest.h>
#include <unistd.h>
#include <cmath>
#include <cstdint>
#include <filesystem>
#include <fstream>
#include <limits>
#include <string>
#include <vector>
#include "navmap_core/NavMap.hpp"
#include "navmap_core/Occupancy.hpp"
#include "navmap_ros/conversions.hpp"
#include "navmap_ros/navmap_io.hpp"
#include "navmap_ros_interfaces/msg/nav_map.hpp"
#include "nav_msgs/msg/occupancy_grid.hpp"
#include "navmap_ros_interfaces/msg/nav_map_v1.hpp"
#include "rclcpp/serialization.hpp"
#include "rclcpp/serialized_message.hpp"
Include dependency graph for test_layer_metadata_and_migration.cpp:

Classes

struct  Envelope

Typedefs

using NavCelId
 Index of a triangle (NavCel) within the global mesh.

Functions

Envelope envelope (const std::string &path)
void expect_same (const NavMap &a, const NavMap &b)
NavMap grid_map ()
void patch (const std::string &path, std::streamoff at, const void *bytes, std::size_t n)
 TEST (Compression, CorruptOrTruncatedFilesAreRejectedWithoutCrashing)
 TEST (Compression, EmptyMapRoundTrips)
 TEST (Compression, EveryLevelLoadsAndOutOfRangeLevelsAreClamped)
 TEST (Compression, ZlibByDefaultSmallerAndIdenticalOnLoad)
 TEST (FormatMigration, NewerOrBrokenFilesAreRejected)
 TEST (FormatMigration, ReadOnlyLocationStillLoadsAndKeepsTheFile)
 TEST (FormatMigration, Version1FilesLoadAndAreRewrittenAsVersion2)
 TEST (LayerMetadata, FileRoundTripIsVersion2)
 TEST (LayerMetadata, FullMapRoundTripKeepsInt16AndMetadata)
 TEST (LayerMetadata, OccupancyGridUnknownCellsAreDeclaredUnknown)
 TEST (LayerMetadata, SingleLayerMessagesCarryMetadataAndRetype)
 TEST (LayerUpdates, SparseWhenFewCellsChangedAndAppliedOnTheSameGeometry)
 TEST (LayerUpdates, UpdatesForAnotherGeometryOrMalformedAreRejected)
 TEST (Links, TravelInMessagesAndFilesAndInvalidOnesAreDropped)

Typedef Documentation

◆ NavCelId

using NavCelId

Index of a triangle (NavCel) within the global mesh.

Function Documentation

◆ envelope()

Envelope envelope ( const std::string & path)

◆ expect_same()

void expect_same ( const NavMap & a,
const NavMap & b )

◆ grid_map()

NavMap grid_map ( )

◆ patch()

void patch ( const std::string & path,
std::streamoff at,
const void * bytes,
std::size_t n )

◆ TEST() [1/14]

TEST ( Compression ,
CorruptOrTruncatedFilesAreRejectedWithoutCrashing  )

◆ TEST() [2/14]

TEST ( Compression ,
EmptyMapRoundTrips  )

◆ TEST() [3/14]

TEST ( Compression ,
EveryLevelLoadsAndOutOfRangeLevelsAreClamped  )

◆ TEST() [4/14]

TEST ( Compression ,
ZlibByDefaultSmallerAndIdenticalOnLoad  )

◆ TEST() [5/14]

TEST ( FormatMigration ,
NewerOrBrokenFilesAreRejected  )

◆ TEST() [6/14]

TEST ( FormatMigration ,
ReadOnlyLocationStillLoadsAndKeepsTheFile  )

◆ TEST() [7/14]

TEST ( FormatMigration ,
Version1FilesLoadAndAreRewrittenAsVersion2  )

◆ TEST() [8/14]

TEST ( LayerMetadata ,
FileRoundTripIsVersion2  )

◆ TEST() [9/14]

TEST ( LayerMetadata ,
FullMapRoundTripKeepsInt16AndMetadata  )

◆ TEST() [10/14]

TEST ( LayerMetadata ,
OccupancyGridUnknownCellsAreDeclaredUnknown  )

◆ TEST() [11/14]

TEST ( LayerMetadata ,
SingleLayerMessagesCarryMetadataAndRetype  )

◆ TEST() [12/14]

TEST ( LayerUpdates ,
SparseWhenFewCellsChangedAndAppliedOnTheSameGeometry  )

◆ TEST() [13/14]

TEST ( LayerUpdates ,
UpdatesForAnotherGeometryOrMalformedAreRejected  )

◆ TEST() [14/14]

TEST ( Links ,
TravelInMessagesAndFilesAndInvalidOnesAreDropped  )