2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-22 09:57:41 +00:00
kea/doc/examples
Andrei Pavel 11de31d8ba
[#3198] make data a key for option-data in code
- Add ability to set list element that only has keys in Translator::setItem.
- Explicitly set list elements in case they contain only keys which can
  be more common now that data is a key since it is likely one can have
  entries that only have code, space, and data.
- Handle no data as empty data when setting, and empty data as no data
  when getting. This avoids the need to add an empty "data" element to
  all options that lack it in all-options.json so that the unit tests
  pass. But this goes to show that data-less entries may be encountered
  in production as well, so more importantly this caters to that
  scenario.
- Adjust data in kea4/all-options.json to not contain singlequotes.
  There was only one occurrence of it. This is a limitation related
  to unit testing only. Opened issue 3216 about it.
- Add missing tests that are not strictly related to the data key, but
  they are related to option data:
  - TranslatorOptionDataListTestv6.getEmpty
  - TranslatorOptionDataListTestv4.get
  - TranslatorOptionDataListTestv6.setEmpty
  - TranslatorOptionDataListTestv4.set
- Add unit tests:
  - TranslatorOptionDataListTestv4.optionsSameCodeAndSpace
  - TranslatorOptionDataListTestv6.optionsSameCodeAndSpace
- Add snippet that tests setting of list element with keys only in
  TranslatorTest.setItem.
2024-01-26 12:48:18 +02:00
..
2021-03-23 13:32:54 +00:00
2023-12-14 08:01:42 +02:00