Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Struct & SStruct can override model fields in expectedFields #186

Merged
merged 1 commit into from
Jan 7, 2022

Conversation

maxatome
Copy link
Owner

@maxatome maxatome commented Jan 6, 2022

    td.Cmp(t, got, td.Struct(
      Person{
        Name:     "John Doe",
        Age:      23,
        Children: 4,
      },
      td.StructFields{
        "> Age":     td.Between(40, 45),
        ">Children": 0, // spaces after ">" are optional
      }),
    )

    td.Cmp(t, got, td.Struct(
      Person{
        Name:     "John Doe",
        Age:      23,
        Children: 4,
      },
      td.StructFields{
        "> Age":     td.Between(40, 45),
        ">Children": 0, // spaces after ">" are optional
      }),
    )

Signed-off-by: Maxime Soulé <btik-git@scoubidou.com>
@coveralls
Copy link

Coverage Status

Coverage increased (+0.0003%) to 99.854% when pulling 6aa17d4 on struct-override into 4aa5af6 on master.

@maxatome maxatome merged commit 3319790 into master Jan 7, 2022
@maxatome maxatome deleted the struct-override branch January 7, 2022 08:36
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.

None yet

2 participants