History log of /openbmc/sdbusplus/test/unpack_properties.cpp (Results 1 – 9 of 9)
Revision Date Author Comments
# 06f265f6 16-Aug-2024 Patrick Williams <patrick@stwcx.xyz>

clang-format: re-format for clang-18

clang-format-18 isn't compatible with the clang-format-17 output, so we
need to reformat the code with the latest version. The way clang-18
handles lambda forma

clang-format: re-format for clang-18

clang-format-18 isn't compatible with the clang-format-17 output, so we
need to reformat the code with the latest version. The way clang-18
handles lambda formatting also changed, so we have made changes to the
organization default style format to better handle lambda formatting.

See I5e08687e696dd240402a2780158664b7113def0e for updated style.
See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.

Change-Id: I4f63258febea27dae710c252033b9151e02be7e8
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# 6db88387 20-Oct-2023 Patrick Williams <patrick@stwcx.xyz>

clang-format: copy latest and re-format

clang-format-17 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest

clang-format: copy latest and re-format

clang-format-17 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest .clang-format from the docs repository and reformat the
repository.

Change-Id: I1d7d35c8035993df4c164bfb055d3be476d3ea84
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# d2149044 10-May-2023 Patrick Williams <patrick@stwcx.xyz>

clang-format: copy latest and re-format

clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest

clang-format: copy latest and re-format

clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest .clang-format from the docs repository and reformat the
repository.

Change-Id: I5daa012bf76924eb7a7d22ed31b6b77ad2f723df
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# cb2fbeb9 06-Jan-2023 Ed Tanous <edtanous@google.com>

Remove some extra semi-colons in tests

These snuck in here and cause clang warnings. Fix them.

Change-Id: I526cfee1ebc799eae48b92e790273f31462c655f
Signed-off-by: Ed Tanous <edtanous@google.com>


# 1a25a10d 29-Sep-2022 Patrick Williams <patrick@stwcx.xyz>

clang-format: update whitespace penalty

clang-format-15 seems to end up with a slightly different whitespace
break than clang-format-14 did. Tweak the PenaltyBreakAssignment
to favor not breaking a

clang-format: update whitespace penalty

clang-format-15 seems to end up with a slightly different whitespace
break than clang-format-14 did. Tweak the PenaltyBreakAssignment
to favor not breaking as often, which allows the two to be more
consistent.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I49826e2011bce317b6b82dc985ddd35fa6eef2cb

show more ...


# a970d836 08-Sep-2022 Patrick Williams <patrick@stwcx.xyz>

test: unpack_properties: add constructor hint

scan-build-14 with GCC-12 seems to be failing with the following
warning:
```
../../../test/unpack_properties.cpp:34:23: error: no matching member funct

test: unpack_properties: add constructor hint

scan-build-14 with GCC-12 seems to be failing with the following
warning:
```
../../../test/unpack_properties.cpp:34:23: error: no matching member function for call to 'emplace'
error.emplace(reason, property);
```

Add a constructor to provide a hint and make scan-build happier.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ie5fa169a9c86e8c221adb5407efb6bef5681c9e0

show more ...


# c8447d52 05-Jan-2022 Krzysztof Grobelny <krzysztof.grobelny@intel.com>

added support for optionals in unpackProperties

- Added support for optionals
- Added support for pointers
- Removed support for moving data from input container
- Removed support for container type

added support for optionals in unpackProperties

- Added support for optionals
- Added support for pointers
- Removed support for moving data from input container
- Removed support for container types other than std::vector

Tested:
- Unit tests are passing
- Examples which use unpackProperties are working correctly

Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>
Change-Id: I3dbd7333237a1373d784187951ad6abe217567d1

show more ...


# 6d83cf53 19-Oct-2021 Szymon Dompke <szymon.dompke@intel.com>

Add non-throwing version of unpackProperties

Some projects (e.g., bmcweb) don't use functions which throw exceptions.
This change introduces unpackPropertiesNoThrow() function, which returns
optiona

Add non-throwing version of unpackProperties

Some projects (e.g., bmcweb) don't use functions which throw exceptions.
This change introduces unpackPropertiesNoThrow() function, which returns
optional string. In case of mismatched type or missing property, it will
contain its name. In case of no errors, std::nullopt will be returned.

As a side change, message returned by UnpackPropertyError::what() now
also includes propertyName and reason.

Testing done:
- Added unit tests for unpackPropertiesNoThrow().
- unpackProperties() functionality remained the same.

Signed-off-by: Szymon Dompke <szymon.dompke@intel.com>
Change-Id: I61318bb906de7d5a252414c1d3ea25322874e23e
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# 09b88f26 02-Sep-2020 Krzysztof Grobelny <krzysztof.grobelny@intel.com>

Added utility functions getAllProperties and unpackProperties

Tested:
- Added example to verify that functions work correctly
- Added new unit tests that are passing
- All other tests are stil

Added utility functions getAllProperties and unpackProperties

Tested:
- Added example to verify that functions work correctly
- Added new unit tests that are passing
- All other tests are still passing after this change
- Added handling of new type (std::monostate) which can
be used as first type in variant to represent that none
of the other types was matched

Change-Id: Ic8e7c8d3116d64b94be37147ae8a80ebb5d3811d
Signed-off-by: Krzysztof Grobelny <krzysztof.grobelny@intel.com>

show more ...