[Git][debian-gis-team/protozero][upstream] New upstream version 1.8.2
Bas Couwenberg (@sebastic)
gitlab at salsa.debian.org
Wed Jul 1 06:04:43 BST 2026
Bas Couwenberg pushed to branch upstream at Debian GIS Project / protozero
Commits:
2d925795 by Bas Couwenberg at 2026-07-01T06:59:00+02:00
New upstream version 1.8.2
- - - - -
24 changed files:
- .github/workflows/ci.yml
- .github/workflows/clang-tidy.yml
- + .gitignore
- CHANGELOG.md
- CMakeLists.txt
- + CODEOWNERS
- CONTRIBUTING.md
- README.md
- − appveyor.yml
- doc/Doxyfile.in
- include/protozero/basic_pbf_writer.hpp
- include/protozero/version.hpp
- test/CMakeLists.txt
- test/t/bool/writer_test_cases.cpp
- test/t/bytes/writer_test_cases.cpp
- test/t/double/writer_test_cases.cpp
- test/t/enum/writer_test_cases.cpp
- test/t/fixed32/writer_test_cases.cpp
- test/t/int32/writer_test_cases.cpp
- test/t/message/writer_test_cases.cpp
- test/t/nested/writer_test_cases.cpp
- test/t/repeated/writer_test_cases.cpp
- test/t/repeated_packed_fixed32/writer_test_cases.cpp
- test/t/string/writer_test_cases.cpp
Changes:
=====================================
.github/workflows/ci.yml
=====================================
@@ -2,6 +2,9 @@ name: CI
on: [ push, pull_request ]
+permissions:
+ contents: read
+
jobs:
linux:
runs-on: ubuntu-latest
@@ -15,11 +18,12 @@ jobs:
- "ubuntu:24.04" # gcc 14.2.0, clang 18.1.3, cmake 3.28.3
- "debian:bullseye" # gcc 10.2.1, clang 11.0.1, cmake 3.18.4
- "debian:bookworm" # gcc 12.2.0, clang 15.0.6, cmake 3.25.1
+ - "debian:trixie"
- "debian:testing"
- "debian:experimental"
- - "fedora:39"
- - "fedora:40"
- - "fedora:41"
+ - "fedora:42"
+ - "fedora:43"
+ - "fedora:44"
build_type: [Debug]
cpp_compiler: [g++]
cpp_version: [14]
@@ -53,6 +57,9 @@ jobs:
cpp_compiler: clang++
cpp_version: 17
data_view: std::string_view
+ - image: "debian:trixie"
+ cpp_compiler: clang++
+ CXXFLAGS: -Wno-c++20-extensions
- image: "debian:testing"
c_compiler: clang
cpp_compiler: clang++
@@ -100,7 +107,7 @@ jobs:
make \
protobuf-lite-devel \
protobuf-lite
- - uses: actions/checkout at v4
+ - uses: actions/checkout at v7
- uses: ./.github/actions/cmake
- uses: ./.github/actions/build
- uses: ./.github/actions/ctest
@@ -113,7 +120,7 @@ jobs:
CXX: clang++-18
BUILD_TYPE: Debug
steps:
- - uses: actions/checkout at v4
+ - uses: actions/checkout at v7
- uses: ./.github/actions/install-ubuntu
- uses: ./.github/actions/cmake
- uses: ./.github/actions/build
@@ -128,6 +135,7 @@ jobs:
os:
- macos-14
- macos-15
+ - macos-26
build_type: [Debug]
include:
- os: macos-15
@@ -138,7 +146,7 @@ jobs:
BUILD_TYPE: ${{ matrix.build_type }}
steps:
- run: brew install doxygen graphviz protobuf
- - uses: actions/checkout at v4
+ - uses: actions/checkout at v7
- uses: ./.github/actions/cmake
- uses: ./.github/actions/build
- uses: ./.github/actions/ctest
@@ -158,7 +166,7 @@ jobs:
protobuf:x64-windows \
protobuf-c:x64-windows
shell: bash
- - uses: actions/checkout at v4
+ - uses: actions/checkout at v7
- uses: ./.github/actions/cmake-windows
- uses: ./.github/actions/build-windows
- uses: ./.github/actions/ctest-windows
=====================================
.github/workflows/clang-tidy.yml
=====================================
@@ -2,16 +2,19 @@ name: clang-tidy
on: [ push, pull_request ]
+permissions:
+ contents: read
+
jobs:
clang-tidy:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
- image: ["debian:bookworm", "debian:testing", "debian:experimental"]
+ image: ["debian:trixie", "debian:testing", "debian:experimental"]
include:
- - image: "debian:bookworm"
- clang: 15
+ - image: "debian:trixie"
+ clang: 19
- image: "debian:testing"
clang: 19
- image: "debian:experimental"
@@ -38,14 +41,14 @@ jobs:
make \
protobuf-compiler
shell: bash
- - uses: actions/checkout at v4
+ - uses: actions/checkout at v7
- uses: ./.github/actions/cmake
- name: Run clang-tidy
run: make clang-tidy | tee protozero-${{ github.sha }}-clang-tidy-${{ matrix.clang }}.log
shell: bash
working-directory: build
- name: Upload clang-tidy log
- uses: actions/upload-artifact at v4
+ uses: actions/upload-artifact at v7
if: always()
with:
name: protozero-${{ github.sha }}-clang-tidy-${{ matrix.clang }}-log
=====================================
.gitignore
=====================================
@@ -0,0 +1 @@
+/build
=====================================
CHANGELOG.md
=====================================
@@ -13,6 +13,11 @@ This project adheres to [Semantic Versioning](https://semver.org/).
### Fixed
+## [1.8.2] - 2026-06-30
+
+### Fixed
+
+- `add_bool` now appends data through `buffer_customization<TBuffer>::push_back`.
## [1.8.1] - 2025-07-15
@@ -425,7 +430,9 @@ This project adheres to [Semantic Versioning](https://semver.org/).
- Make pbf reader and writer code endianess-aware.
-[unreleased]: https://github.com/osmcode/libosmium/compare/v1.8.0...HEAD
+[unreleased]: https://github.com/osmcode/libosmium/compare/v1.8.2...HEAD
+[1.8.2]: https://github.com/osmcode/libosmium/compare/v1.8.1...v1.8.2
+[1.8.1]: https://github.com/osmcode/libosmium/compare/v1.8.0...v1.8.1
[1.8.0]: https://github.com/osmcode/libosmium/compare/v1.7.1...v1.8.0
[1.7.1]: https://github.com/osmcode/libosmium/compare/v1.7.0...v1.7.1
[1.7.0]: https://github.com/osmcode/libosmium/compare/v1.6.8...v1.7.0
=====================================
CMakeLists.txt
=====================================
@@ -10,7 +10,7 @@ cmake_minimum_required(VERSION 3.10.0 FATAL_ERROR)
#-----------------------------------------------------------------------------
-project(protozero VERSION 1.8.1 LANGUAGES CXX C)
+project(protozero VERSION 1.8.2 LANGUAGES CXX C)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
@@ -74,7 +74,7 @@ endif()
#
#-----------------------------------------------------------------------------
message(STATUS "Looking for clang-tidy")
-find_program(CLANG_TIDY NAMES clang-tidy-20 clang-tidy-19 clang-tidy-18 clang-tidy-17 clang-tidy-16 clang-tidy-15)
+find_program(CLANG_TIDY NAMES clang-tidy clang-tidy-20 clang-tidy-19 clang-tidy-18 clang-tidy-17 clang-tidy-16 clang-tidy-15)
if(CLANG_TIDY AND PROTOBUF_FOUND)
message(STATUS "Looking for clang-tidy - found ${CLANG_TIDY}")
@@ -128,12 +128,21 @@ endif()
#
#-----------------------------------------------------------------------------
message(STATUS "Looking for iwyu")
-find_program(IWYU_TOOL NAMES iwyu_tool)
+find_program(IWYU_TOOL NAMES iwyu_tool iwyu_tool.py)
if(IWYU_TOOL)
message(STATUS "Looking for iwyu - found")
+ set(IWYU_EXTRA_ARGS)
+ if(APPLE)
+ # When using iwyu from Homebrew, we must force it to use the Xcode sysroot,
+ # or iwyu would error on missing <TargetConditionals.h> includes.
+ execute_process(COMMAND xcrun --show-sdk-path
+ OUTPUT_VARIABLE IWYU_SDK_PATH
+ OUTPUT_STRIP_TRAILING_WHITESPACE)
+ list(APPEND IWYU_EXTRA_ARGS -isysroot ${IWYU_SDK_PATH} -Wno-c2y-extensions)
+ endif()
add_custom_target(iwyu
- ${IWYU_TOOL} -p ${CMAKE_BINARY_DIR}
+ ${IWYU_TOOL} -p ${CMAKE_BINARY_DIR} -- ${IWYU_EXTRA_ARGS}
)
else()
message(STATUS "Looking for iwyu - not found")
=====================================
CODEOWNERS
=====================================
@@ -0,0 +1 @@
+* @mapbox/maps-api
=====================================
CONTRIBUTING.md
=====================================
@@ -4,7 +4,7 @@
To release a new protozero version:
- - Make sure all tests are passing locally, on Github and on Appveyor
+ - Make sure all tests are passing locally and on Github Actions
- Make sure "make doc" builds
- Update version number in
- include/protozero/version.hpp (two places)
=====================================
README.md
=====================================
@@ -12,7 +12,6 @@ this approach offers no value: just use the C++ API that can be generated with
the Google Protobufs `protoc` program.
[](https://github.com/mapbox/protozero/actions/workflows/ci.yml)
-[](https://ci.appveyor.com/project/Mapbox/protozero)
[](https://repology.org/metapackage/protozero)
## Depends
@@ -128,6 +127,14 @@ after the CMake step, call
make cppcheck
+## Include What You Use
+
+For checking `#include` hygiene with [include-what-you-use](https://include-what-you-use.org/)
+you can, after the CMake step, call
+
+ make iwyu
+
+
## Installation
After the CMake step, call `make install` to install the include files in
=====================================
appveyor.yml deleted
=====================================
@@ -1,71 +0,0 @@
-#-----------------------------------------------------------------------------
-#
-# Configuration for continuous integration service at appveyor.com
-#
-#-----------------------------------------------------------------------------
-
-platform: x64
-
-image: Visual Studio 2017
-
-clone_depth: 1
-
-#-----------------------------------------------------------------------------
-
-environment:
- matrix:
- - config: Debug
- autocrlf: true
- - config: RelWithDebInfo
- autocrlf: true
- - config: Debug
- autocrlf: false
- - config: RelWithDebInfo
- autocrlf: false
- - config: Debug
- autocrlf: false
- platform: x86
- - config: MSYS2
- autocrlf: true
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
-
-#-----------------------------------------------------------------------------
-
-init:
- - git config --global core.autocrlf %autocrlf%
- - git config --get core.autocrlf
-
-# The option --ask=20 is a workaround for a problem with the MSYS2 update
-# process. Without it the following error is printed and the appveyor script
-# halts: "msys2-runtime and catgets are in conflict. Remove catgets?"
-# See also: https://github.com/Alexpux/MSYS2-packages/issues/1141
-install:
- - if "%config%"=="MSYS2" (
- set "PATH=C:\msys64\mingw64\bin;C:\msys64\usr\bin;%PATH%" &&
- pacman --noconfirm --sync --refresh --refresh --sysupgrade --sysupgrade --ask=20 &&
- pacman -Rc --noconfirm mingw-w64-x86_64-gcc-libs &&
- pacman -S --needed --noconfirm mingw-w64-x86_64-gcc mingw-w64-x86_64-cmake mingw-w64-x86_64-doxygen mingw-w64-x86_64-protobuf
- )
-
-build_script:
- - cd c:\projects\protozero
- - mkdir build
- - cd build
- - if "%platform%"=="x64" (
- set vcvarsall_arg=amd64
- ) else (
- set vcvarsall_arg=x86
- )
- - if "%config%"=="MSYS2" (
- cmake .. -LA -G "MSYS Makefiles" &&
- make VERBOSE=1
- ) else (
- "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall" %vcvarsall_arg% &&
- cmake .. -LA -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=%config% &&
- nmake VERBOSE=1
- )
-
-test_script:
- - ctest --output-on-failure
-
-#-----------------------------------------------------------------------------
=====================================
doc/Doxyfile.in
=====================================
@@ -1,4 +1,4 @@
-# Doxyfile 1.9.4
+# Doxyfile 1.9.8
# This file describes the settings to be used by the documentation system
# doxygen (www.doxygen.org) for a project.
@@ -19,7 +19,8 @@
# configuration file:
# doxygen -x [configFile]
# Use doxygen to compare the used configuration file with the template
-# configuration file without replacing the environment variables:
+# configuration file without replacing the environment variables or CMake type
+# replacement variables:
# doxygen -x_noenv [configFile]
#---------------------------------------------------------------------------
@@ -85,7 +86,7 @@ CREATE_SUBDIRS = NO
# level increment doubles the number of directories, resulting in 4096
# directories at level 8 which is the default and also the maximum value. The
# sub-directories are organized in 2 levels, the first level always has a fixed
-# numer of 16 directories.
+# number of 16 directories.
# Minimum value: 0, maximum value: 8, default value: 8.
# This tag requires that the tag CREATE_SUBDIRS is set to YES.
@@ -352,6 +353,17 @@ MARKDOWN_SUPPORT = YES
TOC_INCLUDE_HEADINGS = 5
+# The MARKDOWN_ID_STYLE tag can be used to specify the algorithm used to
+# generate identifiers for the Markdown headings. Note: Every identifier is
+# unique.
+# Possible values are: DOXYGEN use a fixed 'autotoc_md' string followed by a
+# sequence number starting at 0 and GITHUB use the lower case version of title
+# with any whitespace replaced by '-' and punctuation characters removed.
+# The default value is: DOXYGEN.
+# This tag requires that the tag MARKDOWN_SUPPORT is set to YES.
+
+MARKDOWN_ID_STYLE = DOXYGEN
+
# When enabled doxygen tries to link words that correspond to documented
# classes, or namespaces to their corresponding documentation. Such a link can
# be prevented in individual cases by putting a % sign in front of the word or
@@ -476,6 +488,14 @@ LOOKUP_CACHE_SIZE = 0
NUM_PROC_THREADS = 1
+# If the TIMESTAMP tag is set different from NO then each generated page will
+# contain the date or date and time when the page was generated. Setting this to
+# NO can help when comparing the output of multiple runs.
+# Possible values are: YES, NO, DATETIME and DATE.
+# The default value is: NO.
+
+TIMESTAMP = YES
+
#---------------------------------------------------------------------------
# Build related configuration options
#---------------------------------------------------------------------------
@@ -557,7 +577,8 @@ HIDE_UNDOC_MEMBERS = NO
# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all
# undocumented classes that are normally visible in the class hierarchy. If set
# to NO, these classes will be included in the various overviews. This option
-# has no effect if EXTRACT_ALL is enabled.
+# will also hide undocumented C++ concepts if enabled. This option has no effect
+# if EXTRACT_ALL is enabled.
# The default value is: NO.
HIDE_UNDOC_CLASSES = NO
@@ -595,7 +616,8 @@ INTERNAL_DOCS = NO
# Windows (including Cygwin) and MacOS, users should typically set this option
# to NO, whereas on Linux or other Unix flavors it should typically be set to
# YES.
-# The default value is: system dependent.
+# Possible values are: SYSTEM, NO and YES.
+# The default value is: SYSTEM.
CASE_SENSE_NAMES = YES
@@ -847,11 +869,26 @@ WARN_IF_INCOMPLETE_DOC = YES
WARN_NO_PARAMDOC = NO
+# If WARN_IF_UNDOC_ENUM_VAL option is set to YES, doxygen will warn about
+# undocumented enumeration values. If set to NO, doxygen will accept
+# undocumented enumeration values. If EXTRACT_ALL is set to YES then this flag
+# will automatically be disabled.
+# The default value is: NO.
+
+WARN_IF_UNDOC_ENUM_VAL = NO
+
# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when
# a warning is encountered. If the WARN_AS_ERROR tag is set to FAIL_ON_WARNINGS
# then doxygen will continue running as if WARN_AS_ERROR tag is set to NO, but
# at the end of the doxygen process doxygen will return with a non-zero status.
-# Possible values are: NO, YES and FAIL_ON_WARNINGS.
+# If the WARN_AS_ERROR tag is set to FAIL_ON_WARNINGS_PRINT then doxygen behaves
+# like FAIL_ON_WARNINGS but in case no WARN_LOGFILE is defined doxygen will not
+# write the warning messages in between other messages but write them at the end
+# of a run, in case a WARN_LOGFILE is defined the warning messages will be
+# besides being in the defined file also be shown at the end of a run, unless
+# the WARN_LOGFILE is defined as - i.e. standard output (stdout) in that case
+# the behavior will remain as with the setting FAIL_ON_WARNINGS.
+# Possible values are: NO, YES, FAIL_ON_WARNINGS and FAIL_ON_WARNINGS_PRINT.
# The default value is: NO.
WARN_AS_ERROR = NO
@@ -906,10 +943,21 @@ INPUT = @PROJECT_SOURCE_DIR@/README.md \
# libiconv (or the iconv built into libc) for the transcoding. See the libiconv
# documentation (see:
# https://www.gnu.org/software/libiconv/) for the list of possible encodings.
+# See also: INPUT_FILE_ENCODING
# The default value is: UTF-8.
INPUT_ENCODING = UTF-8
+# This tag can be used to specify the character encoding of the source files
+# that doxygen parses The INPUT_FILE_ENCODING tag can be used to specify
+# character encoding on a per file pattern basis. Doxygen will compare the file
+# name with each pattern and apply the encoding instead of the default
+# INPUT_ENCODING) if there is a match. The character encodings are a list of the
+# form: pattern=encoding (like *.php=ISO-8859-1). See cfg_input_encoding
+# "INPUT_ENCODING" for further information on supported encodings.
+
+INPUT_FILE_ENCODING =
+
# If the value of the INPUT tag contains directories, you can use the
# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and
# *.h) to filter out the source-files in the directories.
@@ -921,12 +969,12 @@ INPUT_ENCODING = UTF-8
# Note the list of default checked file patterns might differ from the list of
# default file extension mappings.
#
-# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp,
-# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h,
-# *.hh, *.hxx, *.hpp, *.h++, *.l, *.cs, *.d, *.php, *.php4, *.php5, *.phtml,
-# *.inc, *.m, *.markdown, *.md, *.mm, *.dox (to be provided as doxygen C
-# comment), *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, *.f18, *.f, *.for, *.vhd,
-# *.vhdl, *.ucf, *.qsf and *.ice.
+# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cxxm,
+# *.cpp, *.cppm, *.c++, *.c++m, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl,
+# *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp, *.h++, *.ixx, *.l, *.cs, *.d, *.php,
+# *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown, *.md, *.mm, *.dox (to be
+# provided as doxygen C comment), *.py, *.pyw, *.f90, *.f95, *.f03, *.f08,
+# *.f18, *.f, *.for, *.vhd, *.vhdl, *.ucf, *.qsf and *.ice.
FILE_PATTERNS =
@@ -966,9 +1014,6 @@ EXCLUDE_PATTERNS =
# output. The symbol name can be a fully qualified name, a word, or if the
# wildcard * is used, a substring. Examples: ANamespace, AClass,
# ANamespace::AClass, ANamespace::*Test
-#
-# Note that the wildcards are matched against the file with absolute path, so to
-# exclude all test directories use the pattern */test/*
EXCLUDE_SYMBOLS = protozero::detail \
protozero_assert \
@@ -1016,6 +1061,11 @@ IMAGE_PATH =
# code is scanned, but not when the output code is generated. If lines are added
# or removed, the anchors will not be placed correctly.
#
+# Note that doxygen will use the data processed and written to standard output
+# for further processing, therefore nothing else, like debug statements or used
+# commands (so in case of a Windows batch file always use @echo OFF), should be
+# written to standard output.
+#
# Note that for custom extensions or not directly supported extensions you also
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
# properly processed by doxygen.
@@ -1057,6 +1107,15 @@ FILTER_SOURCE_PATTERNS =
USE_MDFILE_AS_MAINPAGE = @PROJECT_SOURCE_DIR@/README.md
+# The Fortran standard specifies that for fixed formatted Fortran code all
+# characters from position 72 are to be considered as comment. A common
+# extension is to allow longer lines before the automatic comment starts. The
+# setting FORTRAN_COMMENT_AFTER will also make it possible that longer lines can
+# be processed before the automatic comment starts.
+# Minimum value: 7, maximum value: 10000, default value: 72.
+
+FORTRAN_COMMENT_AFTER = 72
+
#---------------------------------------------------------------------------
# Configuration options related to source browsing
#---------------------------------------------------------------------------
@@ -1194,10 +1253,11 @@ CLANG_DATABASE_PATH =
ALPHABETICAL_INDEX = YES
-# In case all classes in a project start with a common prefix, all classes will
-# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag
-# can be used to specify a prefix (or a list of prefixes) that should be ignored
-# while generating the index headers.
+# The IGNORE_PREFIX tag can be used to specify a prefix (or a list of prefixes)
+# that should be ignored while generating the index headers. The IGNORE_PREFIX
+# tag works for classes, function and member names. The entity will be placed in
+# the alphabetical list under the first letter of the entity name that remains
+# after removing the prefix.
# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
IGNORE_PREFIX =
@@ -1276,7 +1336,12 @@ HTML_STYLESHEET =
# Doxygen will copy the style sheet files to the output directory.
# Note: The order of the extra style sheet files is of importance (e.g. the last
# style sheet in the list overrules the setting of the previous ones in the
-# list). For an example see the documentation.
+# list).
+# Note: Since the styling of scrollbars can currently not be overruled in
+# Webkit/Chromium, the styling will be left out of the default doxygen.css if
+# one or more extra stylesheets have been specified. So if scrollbar
+# customization is desired it has to be added explicitly. For an example see the
+# documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_EXTRA_STYLESHEET =
@@ -1291,6 +1356,19 @@ HTML_EXTRA_STYLESHEET =
HTML_EXTRA_FILES =
+# The HTML_COLORSTYLE tag can be used to specify if the generated HTML output
+# should be rendered with a dark or light theme.
+# Possible values are: LIGHT always generate light mode output, DARK always
+# generate dark mode output, AUTO_LIGHT automatically set the mode according to
+# the user preference, use light mode if no preference is set (the default),
+# AUTO_DARK automatically set the mode according to the user preference, use
+# dark mode if no preference is set and TOGGLE allow to user to switch between
+# light and dark mode via a button.
+# The default value is: AUTO_LIGHT.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE = AUTO_LIGHT
+
# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
# will adjust the colors in the style sheet and background images according to
# this color. Hue is specified as an angle on a color-wheel, see
@@ -1321,15 +1399,6 @@ HTML_COLORSTYLE_SAT = 100
HTML_COLORSTYLE_GAMMA = 80
-# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
-# page will contain the date and time when the page was generated. Setting this
-# to YES can help to show when doxygen was last run and thus if the
-# documentation is up to date.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_TIMESTAMP = YES
-
# If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML
# documentation will contain a main index with vertical navigation menus that
# are dynamically created via JavaScript. If disabled, the navigation index will
@@ -1349,6 +1418,13 @@ HTML_DYNAMIC_MENUS = YES
HTML_DYNAMIC_SECTIONS = NO
+# If the HTML_CODE_FOLDING tag is set to YES then classes and functions can be
+# dynamically folded and expanded in the generated HTML source code.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_CODE_FOLDING = YES
+
# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries
# shown in the various tree structured indices initially; the user can expand
# and collapse entries dynamically later on. Doxygen will expand the tree to
@@ -1479,6 +1555,16 @@ BINARY_TOC = NO
TOC_EXPAND = NO
+# The SITEMAP_URL tag is used to specify the full URL of the place where the
+# generated documentation will be placed on the server by the user during the
+# deployment of the documentation. The generated sitemap is called sitemap.xml
+# and placed on the directory specified by HTML_OUTPUT. In case no SITEMAP_URL
+# is specified no sitemap is generated. For information about the sitemap
+# protocol see https://www.sitemaps.org
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+SITEMAP_URL =
+
# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that
# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help
@@ -1654,17 +1740,6 @@ HTML_FORMULA_FORMAT = png
FORMULA_FONTSIZE = 10
-# Use the FORMULA_TRANSPARENT tag to determine whether or not the images
-# generated for formulas are transparent PNGs. Transparent PNGs are not
-# supported properly for IE 6.0, but are supported on all modern browsers.
-#
-# Note that when changing this option you need to delete any form_*.png files in
-# the HTML output directory before the changes have effect.
-# The default value is: YES.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-FORMULA_TRANSPARENT = YES
-
# The FORMULA_MACROFILE can contain LaTeX \newcommand and \renewcommand commands
# to create new LaTeX commands to be used in formulas as building blocks. See
# the section "Including formulas" for details.
@@ -1978,9 +2053,16 @@ PDF_HYPERLINKS = YES
USE_PDFLATEX = YES
-# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \batchmode
-# command to the generated LaTeX files. This will instruct LaTeX to keep running
-# if errors occur, instead of asking the user for help.
+# The LATEX_BATCHMODE tag signals the behavior of LaTeX in case of an error.
+# Possible values are: NO same as ERROR_STOP, YES same as BATCH, BATCH In batch
+# mode nothing is printed on the terminal, errors are scrolled as if <return> is
+# hit at every error; missing files that TeX tries to input or request from
+# keyboard input (\read on a not open input stream) cause the job to abort,
+# NON_STOP In nonstop mode the diagnostic message will appear on the terminal,
+# but there is no possibility of user interaction just like in batch mode,
+# SCROLL In scroll mode, TeX will stop only for missing files to input or if
+# keyboard input is necessary and ERROR_STOP In errorstop mode, TeX will stop at
+# each error, asking for user intervention.
# The default value is: NO.
# This tag requires that the tag GENERATE_LATEX is set to YES.
@@ -2001,14 +2083,6 @@ LATEX_HIDE_INDICES = NO
LATEX_BIB_STYLE = plain
-# If the LATEX_TIMESTAMP tag is set to YES then the footer of each generated
-# page will contain the date and time when the page was generated. Setting this
-# to NO can help when comparing the output of multiple runs.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_TIMESTAMP = NO
-
# The LATEX_EMOJI_DIRECTORY tag is used to specify the (relative or absolute)
# path from which the emoji images will be read. If a relative path is entered,
# it will be relative to the LATEX_OUTPUT directory. If left blank the
@@ -2174,13 +2248,39 @@ DOCBOOK_OUTPUT = docbook
#---------------------------------------------------------------------------
# If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an
-# AutoGen Definitions (see http://autogen.sourceforge.net/) file that captures
+# AutoGen Definitions (see https://autogen.sourceforge.net/) file that captures
# the structure of the code including all documentation. Note that this feature
# is still experimental and incomplete at the moment.
# The default value is: NO.
GENERATE_AUTOGEN_DEF = NO
+#---------------------------------------------------------------------------
+# Configuration options related to Sqlite3 output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_SQLITE3 tag is set to YES doxygen will generate a Sqlite3
+# database with symbols found by doxygen stored in tables.
+# The default value is: NO.
+
+GENERATE_SQLITE3 = NO
+
+# The SQLITE3_OUTPUT tag is used to specify where the Sqlite3 database will be
+# put. If a relative path is entered the value of OUTPUT_DIRECTORY will be put
+# in front of it.
+# The default directory is: sqlite3.
+# This tag requires that the tag GENERATE_SQLITE3 is set to YES.
+
+SQLITE3_OUTPUT = sqlite3
+
+# The SQLITE3_OVERWRITE_DB tag is set to YES, the existing doxygen_sqlite3.db
+# database file will be recreated with each doxygen run. If set to NO, doxygen
+# will warn if an a database file is already found and not modify it.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_SQLITE3 is set to YES.
+
+SQLITE3_RECREATE_DB = YES
+
#---------------------------------------------------------------------------
# Configuration options related to the Perl module output
#---------------------------------------------------------------------------
@@ -2323,15 +2423,15 @@ TAGFILES =
GENERATE_TAGFILE =
-# If the ALLEXTERNALS tag is set to YES, all external class will be listed in
-# the class index. If set to NO, only the inherited external classes will be
-# listed.
+# If the ALLEXTERNALS tag is set to YES, all external classes and namespaces
+# will be listed in the class and namespace index. If set to NO, only the
+# inherited external classes will be listed.
# The default value is: NO.
ALLEXTERNALS = NO
# If the EXTERNAL_GROUPS tag is set to YES, all external groups will be listed
-# in the modules index. If set to NO, only the current project's groups will be
+# in the topic index. If set to NO, only the current project's groups will be
# listed.
# The default value is: YES.
@@ -2345,16 +2445,9 @@ EXTERNAL_GROUPS = YES
EXTERNAL_PAGES = YES
#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
+# Configuration options related to diagram generator tools
#---------------------------------------------------------------------------
-# You can include diagrams made with dia in doxygen documentation. Doxygen will
-# then run dia to produce the diagram and insert it in the documentation. The
-# DIA_PATH tag allows you to specify the directory where the dia binary resides.
-# If left empty dia is assumed to be found in the default search path.
-
-DIA_PATH =
-
# If set to YES the inheritance and collaboration graphs will hide inheritance
# and usage relations if the target is undocumented or is not a class.
# The default value is: YES.
@@ -2363,7 +2456,7 @@ HIDE_UNDOC_RELATIONS = YES
# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
# available from the path. This tool is part of Graphviz (see:
-# http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent
+# https://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent
# Bell Labs. The other options in this section have no effect if this option is
# set to NO
# The default value is: YES.
@@ -2380,37 +2473,51 @@ HAVE_DOT = YES
DOT_NUM_THREADS = 0
-# When you want a differently looking font in the dot files that doxygen
-# generates you can specify the font name using DOT_FONTNAME. You need to make
-# sure dot is able to find the font, which can be done by putting it in a
-# standard location or by setting the DOTFONTPATH environment variable or by
-# setting DOT_FONTPATH to the directory containing the font.
-# The default value is: Helvetica.
+# DOT_COMMON_ATTR is common attributes for nodes, edges and labels of
+# subgraphs. When you want a differently looking font in the dot files that
+# doxygen generates you can specify fontname, fontcolor and fontsize attributes.
+# For details please see <a href=https://graphviz.org/doc/info/attrs.html>Node,
+# Edge and Graph Attributes specification</a> You need to make sure dot is able
+# to find the font, which can be done by putting it in a standard location or by
+# setting the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the
+# directory containing the font. Default graphviz fontsize is 14.
+# The default value is: fontname=Helvetica,fontsize=10.
# This tag requires that the tag HAVE_DOT is set to YES.
-DOT_FONTNAME = Helvetica
+DOT_COMMON_ATTR = "fontname=Helvetica,fontsize=10"
-# The DOT_FONTSIZE tag can be used to set the size (in points) of the font of
-# dot graphs.
-# Minimum value: 4, maximum value: 24, default value: 10.
+# DOT_EDGE_ATTR is concatenated with DOT_COMMON_ATTR. For elegant style you can
+# add 'arrowhead=open, arrowtail=open, arrowsize=0.5'. <a
+# href=https://graphviz.org/doc/info/arrows.html>Complete documentation about
+# arrows shapes.</a>
+# The default value is: labelfontname=Helvetica,labelfontsize=10.
# This tag requires that the tag HAVE_DOT is set to YES.
-DOT_FONTSIZE = 10
+DOT_EDGE_ATTR = "labelfontname=Helvetica,labelfontsize=10"
-# By default doxygen will tell dot to use the default font as specified with
-# DOT_FONTNAME. If you specify a different font using DOT_FONTNAME you can set
-# the path where dot can find it using this tag.
+# DOT_NODE_ATTR is concatenated with DOT_COMMON_ATTR. For view without boxes
+# around nodes set 'shape=plain' or 'shape=plaintext' <a
+# href=https://www.graphviz.org/doc/info/shapes.html>Shapes specification</a>
+# The default value is: shape=box,height=0.2,width=0.4.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_NODE_ATTR = "shape=box,height=0.2,width=0.4"
+
+# You can set the path where dot can find font specified with fontname in
+# DOT_COMMON_ATTR and others dot attributes.
# This tag requires that the tag HAVE_DOT is set to YES.
DOT_FONTPATH =
-# If the CLASS_GRAPH tag is set to YES (or GRAPH) then doxygen will generate a
-# graph for each documented class showing the direct and indirect inheritance
-# relations. In case HAVE_DOT is set as well dot will be used to draw the graph,
-# otherwise the built-in generator will be used. If the CLASS_GRAPH tag is set
-# to TEXT the direct and indirect inheritance relations will be shown as texts /
-# links.
-# Possible values are: NO, YES, TEXT and GRAPH.
+# If the CLASS_GRAPH tag is set to YES or GRAPH or BUILTIN then doxygen will
+# generate a graph for each documented class showing the direct and indirect
+# inheritance relations. In case the CLASS_GRAPH tag is set to YES or GRAPH and
+# HAVE_DOT is enabled as well, then dot will be used to draw the graph. In case
+# the CLASS_GRAPH tag is set to YES and HAVE_DOT is disabled or if the
+# CLASS_GRAPH tag is set to BUILTIN, then the built-in generator will be used.
+# If the CLASS_GRAPH tag is set to TEXT the direct and indirect inheritance
+# relations will be shown as texts / links.
+# Possible values are: NO, YES, TEXT, GRAPH and BUILTIN.
# The default value is: YES.
CLASS_GRAPH = YES
@@ -2418,15 +2525,21 @@ CLASS_GRAPH = YES
# If the COLLABORATION_GRAPH tag is set to YES then doxygen will generate a
# graph for each documented class showing the direct and indirect implementation
# dependencies (inheritance, containment, and class references variables) of the
-# class with other documented classes.
+# class with other documented classes. Explicit enabling a collaboration graph,
+# when COLLABORATION_GRAPH is set to NO, can be accomplished by means of the
+# command \collaborationgraph. Disabling a collaboration graph can be
+# accomplished by means of the command \hidecollaborationgraph.
# The default value is: YES.
# This tag requires that the tag HAVE_DOT is set to YES.
COLLABORATION_GRAPH = YES
# If the GROUP_GRAPHS tag is set to YES then doxygen will generate a graph for
-# groups, showing the direct groups dependencies. See also the chapter Grouping
-# in the manual.
+# groups, showing the direct groups dependencies. Explicit enabling a group
+# dependency graph, when GROUP_GRAPHS is set to NO, can be accomplished by means
+# of the command \groupgraph. Disabling a directory graph can be accomplished by
+# means of the command \hidegroupgraph. See also the chapter Grouping in the
+# manual.
# The default value is: YES.
# This tag requires that the tag HAVE_DOT is set to YES.
@@ -2486,7 +2599,9 @@ TEMPLATE_RELATIONS = NO
# If the INCLUDE_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are set to
# YES then doxygen will generate a graph for each documented file showing the
# direct and indirect include dependencies of the file with other documented
-# files.
+# files. Explicit enabling an include graph, when INCLUDE_GRAPH is is set to NO,
+# can be accomplished by means of the command \includegraph. Disabling an
+# include graph can be accomplished by means of the command \hideincludegraph.
# The default value is: YES.
# This tag requires that the tag HAVE_DOT is set to YES.
@@ -2495,7 +2610,10 @@ INCLUDE_GRAPH = YES
# If the INCLUDED_BY_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are
# set to YES then doxygen will generate a graph for each documented file showing
# the direct and indirect include dependencies of the file with other documented
-# files.
+# files. Explicit enabling an included by graph, when INCLUDED_BY_GRAPH is set
+# to NO, can be accomplished by means of the command \includedbygraph. Disabling
+# an included by graph can be accomplished by means of the command
+# \hideincludedbygraph.
# The default value is: YES.
# This tag requires that the tag HAVE_DOT is set to YES.
@@ -2535,7 +2653,10 @@ GRAPHICAL_HIERARCHY = YES
# If the DIRECTORY_GRAPH tag is set to YES then doxygen will show the
# dependencies a directory has on other directories in a graphical way. The
# dependency relations are determined by the #include relations between the
-# files in the directories.
+# files in the directories. Explicit enabling a directory graph, when
+# DIRECTORY_GRAPH is set to NO, can be accomplished by means of the command
+# \directorygraph. Disabling a directory graph can be accomplished by means of
+# the command \hidedirectorygraph.
# The default value is: YES.
# This tag requires that the tag HAVE_DOT is set to YES.
@@ -2551,7 +2672,7 @@ DIR_GRAPH_MAX_DEPTH = 1
# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
# generated by dot. For an explanation of the image formats see the section
# output formats in the documentation of the dot tool (Graphviz (see:
-# http://www.graphviz.org/)).
+# https://www.graphviz.org/)).
# Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order
# to make the SVG files visible in IE 9+ (other browsers do not have this
# requirement).
@@ -2589,11 +2710,12 @@ DOT_PATH =
DOTFILE_DIRS =
-# The MSCFILE_DIRS tag can be used to specify one or more directories that
-# contain msc files that are included in the documentation (see the \mscfile
-# command).
+# You can include diagrams made with dia in doxygen documentation. Doxygen will
+# then run dia to produce the diagram and insert it in the documentation. The
+# DIA_PATH tag allows you to specify the directory where the dia binary resides.
+# If left empty dia is assumed to be found in the default search path.
-MSCFILE_DIRS =
+DIA_PATH =
# The DIAFILE_DIRS tag can be used to specify one or more directories that
# contain dia files that are included in the documentation (see the \diafile
@@ -2643,18 +2765,6 @@ DOT_GRAPH_MAX_NODES = 50
MAX_DOT_GRAPH_DEPTH = 0
-# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
-# background. This is disabled by default, because dot on Windows does not seem
-# to support this out of the box.
-#
-# Warning: Depending on the platform used, enabling this option may lead to
-# badly anti-aliased labels on the edges of a graph (i.e. they become hard to
-# read).
-# The default value is: NO.
-# This tag requires that the tag HAVE_DOT is set to YES.
-
-DOT_TRANSPARENT = NO
-
# Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate multiple output
# files in one run (i.e. multiple -o and -T options on the command line). This
# makes dot run faster, but since only newer versions of dot (>1.8.10) support
@@ -2682,3 +2792,19 @@ GENERATE_LEGEND = YES
# The default value is: YES.
DOT_CLEANUP = YES
+
+# You can define message sequence charts within doxygen comments using the \msc
+# command. If the MSCGEN_TOOL tag is left empty (the default), then doxygen will
+# use a built-in version of mscgen tool to produce the charts. Alternatively,
+# the MSCGEN_TOOL tag can also specify the name an external tool. For instance,
+# specifying prog as the value, doxygen will call the tool as prog -T
+# <outfile_format> -o <outputfile> <inputfile>. The external tool should support
+# output file formats "png", "eps", "svg", and "ismap".
+
+MSCGEN_TOOL =
+
+# The MSCFILE_DIRS tag can be used to specify one or more directories that
+# contain msc files that are included in the documentation (see the \mscfile
+# command).
+
+MSCFILE_DIRS =
=====================================
include/protozero/basic_pbf_writer.hpp
=====================================
@@ -391,7 +391,7 @@ public:
add_field(tag, pbf_wire_type::varint);
protozero_assert(m_pos == 0 && "you can't add fields to a parent basic_pbf_writer if there is an existing basic_pbf_writer for a submessage");
protozero_assert(m_data);
- m_data->push_back(static_cast<char>(value));
+ buffer_customization<TBuffer>::push_back(m_data, static_cast<char>(value));
}
/**
=====================================
include/protozero/version.hpp
=====================================
@@ -23,12 +23,12 @@ documentation.
#define PROTOZERO_VERSION_MINOR 8
/// The patch number
-#define PROTOZERO_VERSION_PATCH 1
+#define PROTOZERO_VERSION_PATCH 2
/// The complete version number
#define PROTOZERO_VERSION_CODE (PROTOZERO_VERSION_MAJOR * 10000 + PROTOZERO_VERSION_MINOR * 100 + PROTOZERO_VERSION_PATCH)
/// Version number as string
-#define PROTOZERO_VERSION_STRING "1.8.1"
+#define PROTOZERO_VERSION_STRING "1.8.2"
#endif // PROTOZERO_VERSION_HPP
=====================================
test/CMakeLists.txt
=====================================
@@ -96,6 +96,11 @@ if(PROTOBUF_FOUND)
endif()
endforeach()
+ if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+ # Google Protobuf library adds non-standard _Nonnull to Abseil macros
+ set_source_files_properties(${PROTO_SRCS} PROPERTIES COMPILE_FLAGS "-Wno-nullability-extension")
+ endif()
+
add_executable(writer_tests writer_tests.cpp ${SOURCES} ${PROTO_SRCS} ${PROTO_HDRS})
target_compile_features(writer_tests PUBLIC cxx_std_14)
=====================================
test/t/bool/writer_test_cases.cpp
=====================================
@@ -16,7 +16,7 @@ TEMPLATE_TEST_CASE("write bool field and check with libprotobuf", "",
SECTION("false") {
pw.add_bool(1, false);
- msg.ParseFromArray(buffer.data(), buffer.size());
+ REQUIRE(msg.ParseFromArray(buffer.data(), buffer.size()));
REQUIRE_FALSE(msg.b());
}
@@ -24,7 +24,7 @@ TEMPLATE_TEST_CASE("write bool field and check with libprotobuf", "",
SECTION("true") {
pw.add_bool(1, true);
- msg.ParseFromArray(buffer.data(), buffer.size());
+ REQUIRE(msg.ParseFromArray(buffer.data(), buffer.size()));
REQUIRE(msg.b());
}
=====================================
test/t/bytes/writer_test_cases.cpp
=====================================
@@ -14,7 +14,7 @@ TEMPLATE_TEST_CASE("write bytes field and check with libprotobuf", "",
SECTION("empty") {
pw.add_string(1, "");
- msg.ParseFromArray(buffer.data(), buffer.size());
+ REQUIRE(msg.ParseFromArray(buffer.data(), buffer.size()));
REQUIRE(msg.s().empty());
}
@@ -22,7 +22,7 @@ TEMPLATE_TEST_CASE("write bytes field and check with libprotobuf", "",
SECTION("one") {
pw.add_string(1, "x");
- msg.ParseFromArray(buffer.data(), buffer.size());
+ REQUIRE(msg.ParseFromArray(buffer.data(), buffer.size()));
REQUIRE(msg.s() == "x");
}
@@ -30,7 +30,7 @@ TEMPLATE_TEST_CASE("write bytes field and check with libprotobuf", "",
SECTION("string") {
pw.add_string(1, "foobar");
- msg.ParseFromArray(buffer.data(), buffer.size());
+ REQUIRE(msg.ParseFromArray(buffer.data(), buffer.size()));
REQUIRE(msg.s() == "foobar");
}
@@ -43,7 +43,7 @@ TEMPLATE_TEST_CASE("write bytes field and check with libprotobuf", "",
pw.add_string(1, data);
- msg.ParseFromArray(buffer.data(), buffer.size());
+ REQUIRE(msg.ParseFromArray(buffer.data(), buffer.size()));
REQUIRE(msg.s().size() == 3);
REQUIRE(msg.s()[1] == static_cast<char>(2));
=====================================
test/t/double/writer_test_cases.cpp
=====================================
@@ -14,7 +14,7 @@ TEMPLATE_TEST_CASE("write double field and check with libprotobuf", "",
SECTION("zero") {
pw.add_double(1, 0.0);
- msg.ParseFromArray(buffer.data(), buffer.size());
+ REQUIRE(msg.ParseFromArray(buffer.data(), buffer.size()));
REQUIRE(msg.x() == Approx(0.0));
}
@@ -22,7 +22,7 @@ TEMPLATE_TEST_CASE("write double field and check with libprotobuf", "",
SECTION("positive") {
pw.add_double(1, 4.893);
- msg.ParseFromArray(buffer.data(), buffer.size());
+ REQUIRE(msg.ParseFromArray(buffer.data(), buffer.size()));
REQUIRE(msg.x() == Approx(4.893));
}
@@ -30,7 +30,7 @@ TEMPLATE_TEST_CASE("write double field and check with libprotobuf", "",
SECTION("negative") {
pw.add_double(1, -9232.33);
- msg.ParseFromArray(buffer.data(), buffer.size());
+ REQUIRE(msg.ParseFromArray(buffer.data(), buffer.size()));
REQUIRE(msg.x() == Approx(-9232.33));
}
=====================================
test/t/enum/writer_test_cases.cpp
=====================================
@@ -14,7 +14,7 @@ TEMPLATE_TEST_CASE("write enum field and check with libprotobuf", "",
SECTION("zero") {
pw.add_enum(1, 0L);
- msg.ParseFromArray(buffer.data(), buffer.size());
+ REQUIRE(msg.ParseFromArray(buffer.data(), buffer.size()));
REQUIRE(msg.color() == TestEnum::Color::BLACK);
}
@@ -22,7 +22,7 @@ TEMPLATE_TEST_CASE("write enum field and check with libprotobuf", "",
SECTION("positive") {
pw.add_enum(1, 3L);
- msg.ParseFromArray(buffer.data(), buffer.size());
+ REQUIRE(msg.ParseFromArray(buffer.data(), buffer.size()));
REQUIRE(msg.color() == TestEnum::Color::BLUE);
}
@@ -30,7 +30,7 @@ TEMPLATE_TEST_CASE("write enum field and check with libprotobuf", "",
SECTION("negative") {
pw.add_enum(1, -1L);
- msg.ParseFromArray(buffer.data(), buffer.size());
+ REQUIRE(msg.ParseFromArray(buffer.data(), buffer.size()));
REQUIRE(msg.color() == TestEnum::Color::NEG);
}
@@ -38,7 +38,7 @@ TEMPLATE_TEST_CASE("write enum field and check with libprotobuf", "",
SECTION("max") {
pw.add_enum(1, std::numeric_limits<int32_t>::max() - 1);
- msg.ParseFromArray(buffer.data(), buffer.size());
+ REQUIRE(msg.ParseFromArray(buffer.data(), buffer.size()));
REQUIRE(msg.color() == TestEnum::Color::MAX);
}
@@ -46,7 +46,7 @@ TEMPLATE_TEST_CASE("write enum field and check with libprotobuf", "",
SECTION("min") {
pw.add_enum(1, std::numeric_limits<int32_t>::min() + 1);
- msg.ParseFromArray(buffer.data(), buffer.size());
+ REQUIRE(msg.ParseFromArray(buffer.data(), buffer.size()));
REQUIRE(msg.color() == TestEnum::Color::MIN);
}
=====================================
test/t/fixed32/writer_test_cases.cpp
=====================================
@@ -14,7 +14,7 @@ TEMPLATE_TEST_CASE("write fixed32 field and check with libprotobuf", "",
SECTION("zero") {
pw.add_fixed32(1, 0);
- msg.ParseFromArray(buffer.data(), buffer.size());
+ REQUIRE(msg.ParseFromArray(buffer.data(), buffer.size()));
REQUIRE(msg.i() == 0);
}
@@ -22,7 +22,7 @@ TEMPLATE_TEST_CASE("write fixed32 field and check with libprotobuf", "",
SECTION("max") {
pw.add_fixed32(1, std::numeric_limits<uint32_t>::max());
- msg.ParseFromArray(buffer.data(), buffer.size());
+ REQUIRE(msg.ParseFromArray(buffer.data(), buffer.size()));
REQUIRE(msg.i() == std::numeric_limits<uint32_t>::max());
}
@@ -30,7 +30,7 @@ TEMPLATE_TEST_CASE("write fixed32 field and check with libprotobuf", "",
SECTION("min") {
pw.add_fixed32(1, std::numeric_limits<uint32_t>::min());
- msg.ParseFromArray(buffer.data(), buffer.size());
+ REQUIRE(msg.ParseFromArray(buffer.data(), buffer.size()));
REQUIRE(msg.i() == std::numeric_limits<uint32_t>::min());
}
=====================================
test/t/int32/writer_test_cases.cpp
=====================================
@@ -14,7 +14,7 @@ TEMPLATE_TEST_CASE("write int32 field and check with libprotobuf", "",
SECTION("zero") {
pw.add_int32(1, 0L);
- msg.ParseFromArray(buffer.data(), buffer.size());
+ REQUIRE(msg.ParseFromArray(buffer.data(), buffer.size()));
REQUIRE(msg.i() == 0L);
}
@@ -22,7 +22,7 @@ TEMPLATE_TEST_CASE("write int32 field and check with libprotobuf", "",
SECTION("positive") {
pw.add_int32(1, 1L);
- msg.ParseFromArray(buffer.data(), buffer.size());
+ REQUIRE(msg.ParseFromArray(buffer.data(), buffer.size()));
REQUIRE(msg.i() == 1L);
}
@@ -30,7 +30,7 @@ TEMPLATE_TEST_CASE("write int32 field and check with libprotobuf", "",
SECTION("negative") {
pw.add_int32(1, -1L);
- msg.ParseFromArray(buffer.data(), buffer.size());
+ REQUIRE(msg.ParseFromArray(buffer.data(), buffer.size()));
REQUIRE(msg.i() == -1L);
}
@@ -38,7 +38,7 @@ TEMPLATE_TEST_CASE("write int32 field and check with libprotobuf", "",
SECTION("max") {
pw.add_int32(1, std::numeric_limits<int32_t>::max());
- msg.ParseFromArray(buffer.data(), buffer.size());
+ REQUIRE(msg.ParseFromArray(buffer.data(), buffer.size()));
REQUIRE(msg.i() == std::numeric_limits<int32_t>::max());
}
@@ -46,7 +46,7 @@ TEMPLATE_TEST_CASE("write int32 field and check with libprotobuf", "",
SECTION("min") {
pw.add_int32(1, std::numeric_limits<int32_t>::min());
- msg.ParseFromArray(buffer.data(), buffer.size());
+ REQUIRE(msg.ParseFromArray(buffer.data(), buffer.size()));
REQUIRE(msg.i() == std::numeric_limits<int32_t>::min());
}
=====================================
test/t/message/writer_test_cases.cpp
=====================================
@@ -23,7 +23,7 @@ TEMPLATE_TEST_CASE("write message field and check with libprotobuf", "",
}
TestMessage::Test msg;
- msg.ParseFromArray(buffer.data(), buffer.size());
+ REQUIRE(msg.ParseFromArray(buffer.data(), buffer.size()));
REQUIRE(msg.submessage().s() == "foobar");
}
=====================================
test/t/nested/writer_test_cases.cpp
=====================================
@@ -36,7 +36,7 @@ TEMPLATE_TEST_CASE("write nested message fields and check with libprotobuf", "",
pw.add_int32(2, 77);
TestNested::Test msg;
- msg.ParseFromArray(buffer.data(), buffer.size());
+ REQUIRE(msg.ParseFromArray(buffer.data(), buffer.size()));
REQUIRE(msg.i() == 77);
REQUIRE(msg.sub().i() == 88);
=====================================
test/t/repeated/writer_test_cases.cpp
=====================================
@@ -14,7 +14,7 @@ TEMPLATE_TEST_CASE("write repeated fields and check with libprotobuf", "",
SECTION("one") {
pw.add_int32(1, 0L);
- msg.ParseFromArray(buffer.data(), buffer.size());
+ REQUIRE(msg.ParseFromArray(buffer.data(), buffer.size()));
REQUIRE(msg.i().size() == 1);
REQUIRE(msg.i(0) == 0L);
@@ -27,7 +27,7 @@ TEMPLATE_TEST_CASE("write repeated fields and check with libprotobuf", "",
pw.add_int32(1, std::numeric_limits<int32_t>::max());
pw.add_int32(1, std::numeric_limits<int32_t>::min());
- msg.ParseFromArray(buffer.data(), buffer.size());
+ REQUIRE(msg.ParseFromArray(buffer.data(), buffer.size()));
REQUIRE(msg.i().size() == 5);
REQUIRE(msg.i(0) == 0L);
=====================================
test/t/repeated_packed_fixed32/writer_test_cases.cpp
=====================================
@@ -23,7 +23,7 @@ TEMPLATE_TEST_CASE("write repeated packed fixed32 field and check with libprotob
const std::array<uint32_t, 1> data = {{ 17UL }};
pw.add_packed_fixed32(1, std::begin(data), std::end(data));
- msg.ParseFromArray(buffer.data(), buffer.size());
+ REQUIRE(msg.ParseFromArray(buffer.data(), buffer.size()));
REQUIRE(msg.i().size() == 1);
REQUIRE(msg.i(0) == 17UL);
@@ -33,7 +33,7 @@ TEMPLATE_TEST_CASE("write repeated packed fixed32 field and check with libprotob
const std::array<uint32_t, 4> data = {{ 17UL, 0UL, 1UL, std::numeric_limits<uint32_t>::max() }};
pw.add_packed_fixed32(1, std::begin(data), std::end(data));
- msg.ParseFromArray(buffer.data(), buffer.size());
+ REQUIRE(msg.ParseFromArray(buffer.data(), buffer.size()));
REQUIRE(msg.i().size() == 4);
REQUIRE(msg.i(0) == 17UL);
@@ -67,7 +67,7 @@ TEMPLATE_TEST_CASE("write from different types of iterators and check with libpr
pw.template add_packed_fixed<uint32_t>(1, it, eod);
}
- msg.ParseFromArray(buffer.data(), buffer.size());
+ REQUIRE(msg.ParseFromArray(buffer.data(), buffer.size()));
REQUIRE(msg.i().size() == 5);
REQUIRE(msg.i(0) == 1);
=====================================
test/t/string/writer_test_cases.cpp
=====================================
@@ -14,7 +14,7 @@ TEMPLATE_TEST_CASE("write string field and check with libprotobuf", "",
SECTION("empty") {
pw.add_string(1, "");
- msg.ParseFromArray(buffer.data(), buffer.size());
+ REQUIRE(msg.ParseFromArray(buffer.data(), buffer.size()));
REQUIRE(msg.s().empty());
}
@@ -22,7 +22,7 @@ TEMPLATE_TEST_CASE("write string field and check with libprotobuf", "",
SECTION("one") {
pw.add_string(1, "x");
- msg.ParseFromArray(buffer.data(), buffer.size());
+ REQUIRE(msg.ParseFromArray(buffer.data(), buffer.size()));
REQUIRE(msg.s() == "x");
}
@@ -30,7 +30,7 @@ TEMPLATE_TEST_CASE("write string field and check with libprotobuf", "",
SECTION("string") {
pw.add_string(1, "foobar");
- msg.ParseFromArray(buffer.data(), buffer.size());
+ REQUIRE(msg.ParseFromArray(buffer.data(), buffer.size()));
REQUIRE(msg.s() == "foobar");
}
View it on GitLab: https://salsa.debian.org/debian-gis-team/protozero/-/commit/2d925795450749d884aefd353aea9106ecc513db
--
View it on GitLab: https://salsa.debian.org/debian-gis-team/protozero/-/commit/2d925795450749d884aefd353aea9106ecc513db
You're receiving this email because of your account on salsa.debian.org. Manage all notifications: https://salsa.debian.org/-/profile/notifications | Help: https://salsa.debian.org/help
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20260701/7cc980e9/attachment-0001.htm>
More information about the Pkg-grass-devel
mailing list