Skip to content

feat: Add StructSubject#61

Merged
copybara-service[bot] merged 1 commit intobazelbuild:masterfrom
rickeylev:struct.subject
Jul 10, 2023
Merged

feat: Add StructSubject#61
copybara-service[bot] merged 1 commit intobazelbuild:masterfrom
rickeylev:struct.subject

Conversation

@rickeylev
Copy link
Collaborator

StructSubject is a subject to wrap structs and return their values as other subjects. This makes it easier to test ad-hoc struct values, such as ones returned by helper functions, because a dedicated subject implementation doesn't need to be written. All that needs to be provided are the attribute names and factory functions to handle them.

Fixes #53

@rickeylev rickeylev force-pushed the struct.subject branch 8 times, most recently from 04e1b14 to 28739e5 Compare July 6, 2023 22:25
StructSubject is a subject to wrap structs and return their values as
other subjects. This makes it easier to test ad-hoc struct values, such
as ones returned by helper functions, because a dedicated subject
implementation doesn't need to be written. All that needs to be provided
are the attribute names and factory functions to handle them.

Fixes bazelbuild#53
@copybara-service copybara-service bot merged commit 1e41a0d into bazelbuild:master Jul 10, 2023
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.

Add StructSubject

1 participant