Skip to content

Improve test coverage#544

Draft
KrishaDeshkool wants to merge 24 commits into
eclipse-score:mainfrom
KrishaDeshkool:improve_test_coverage
Draft

Improve test coverage#544
KrishaDeshkool wants to merge 24 commits into
eclipse-score:mainfrom
KrishaDeshkool:improve_test_coverage

Conversation

@KrishaDeshkool

Copy link
Copy Markdown
Contributor

Depends on : #496

@KrishaDeshkool KrishaDeshkool force-pushed the improve_test_coverage branch 6 times, most recently from 0d122d3 to 817daa5 Compare June 15, 2026 09:53
KrishaDeshkool and others added 21 commits June 15, 2026 11:53
The new order allows us to set the bindings to nullptrs by default for
test only constructors. This will be useful for fields which will
require optionally inserting get / set bindings. We change all
constructors so that they're all consistent.
- Use a single test constructor which creates the get / set methods
  according to the provided bindings. This allows us to remove the
  test-only constructor overloads for each template arg combination.
- Always store the get / set method dispatches as unique_ptrs even if
  they're not enabled (when disabled, they'll simply be nullptrs). This
  allows us to have a single private constructor which always accepts
  unique_ptrs (which may be valid or nullptrs).
…nitions

Introduce field_tags.h with tag structs (WithGetter, WithSetter,
WithNotifier) and the contains_type / is_tag_enabled SFINAE utilities.
Re-export the tags through types.h and wire the BUILD dependency.
Change forward and friend declarations of ProxyField and SkeletonField
from fixed bool parameters to variadic typename... packs. Replaces the
eight explicit ProxyField friend specializations with a single template friend.
Replace the fixed bool EnableSet/EnableNotifier template parameters
with a variadic Tags... pack. WithGetter, WithSetter, WithNotifier
tag structs control which API is enabled/disabled via SFINAE.
Adapt all test interfaces, test fixtures, and integration helpers to
use the new WithGetter/WithSetter/WithNotifier tag syntax instead of
bare ProxyField<T> or SkeletonField<T, bool, bool>.
Add field_tags_test.cpp for is_tag_enabled and contains_type traits.
Extend proxy_field_test.cpp to verify that notifier methods are only
callable with WithNotifier, Get() with WithGetter, Set() with WithSetter.
…sent

Remove the ASSERT_PRD that required proxy_event_base_dispatch to be
non-null. When the field's tag pack does not include WithNotifier the
production ctor passes nullptr for the event dispatch, which is valid
because the notifier surface is SFINAE-removed.
SkeletonField became SkeletonField<T, Tags...> in the tag introduction
commit. NamedSkeletonFieldMock must carry the same Tags... so that
InjectFieldMock can dynamic_cast to the correct specialisation.
method_identifier.h defines a UniqueMethodIdentifier that is
not referenced by any production code.
the  binding dependant layer uses its own
UniqueMethodIdentifier.
removing a spillover from previous work.
Add a ServiceElementType parameter to ProxyEventBindingFactory::Create to avoid code duplication
split LookupLolaProxyElement into two free functions in bindings/lola and rework all the callers
refactor to reduce code duplication with generic helper methods
and also, SetupMethods hardcoded kUseGetIfAvailable/kUseSetIfAvailable to true and ignored
the parsed useGetIfAvailable/useSetIfAvailable deployment config.
The proxy method test helper now takes a MethodType per registered entry
instead of always kMethod, so field Get and Set methods can be
registered too. Existing method call sites pass MethodType::kMethod.
covers field Get/Set handling in Proxy::SetupMethods
Add unit tests for to_string(MethodType), covering kMethod/kGet/kSet/kUnknown
and the out-of-range "Invalid" fallback. to_string is used in production when
streaming the lola UniqueMethodIdentifier.
@KrishaDeshkool KrishaDeshkool force-pushed the improve_test_coverage branch from 817daa5 to 63df32c Compare June 15, 2026 09:53
@KrishaDeshkool KrishaDeshkool force-pushed the improve_test_coverage branch from 63df32c to 642d2d4 Compare June 15, 2026 13:12
@KrishaDeshkool KrishaDeshkool force-pushed the improve_test_coverage branch from a51f934 to b75f45d Compare June 17, 2026 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant