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

enhancement(remap): Add assert_eq! function #7866

Merged
merged 3 commits into from
Jun 16, 2021
Merged

enhancement(remap): Add assert_eq! function #7866

merged 3 commits into from
Jun 16, 2021

Conversation

jszwedko
Copy link
Member

This PR adds an assert_eq! function with the goal of making writing
unit tests easier.

The output may change with
#6261 to make it easier to see
the condition that failed.

Closes #7833

Signed-off-by: Jesse Szwedko jesse@szwedko.me

This PR adds an `assert_eq!` function with the goal of making writing
unit tests easier.

The output may change with
#6261 to make it easier to see
the condition that failed.

Closes #7833

Signed-off-by: Jesse Szwedko <jesse@szwedko.me>
Signed-off-by: Jesse Szwedko <jesse@szwedko.me>
Copy link
Contributor

@JeanMertz JeanMertz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sweet. This will definitely be useful in unit-testing.

@@ -10,6 +10,7 @@ criterion_group!(
// https://github.com/timberio/vector/pull/6408
config = Criterion::default().noise_threshold(0.05);
targets = assert,
assert_eq,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
assert_eq,
assert_eq,

Signed-off-by: Jesse Szwedko <jesse@szwedko.me>
@jszwedko jszwedko enabled auto-merge (squash) June 16, 2021 16:52
@jszwedko jszwedko merged commit 0a34989 into master Jun 16, 2021
@jszwedko jszwedko deleted the add-assert-eq branch June 16, 2021 17:55
@binarylogic
Copy link
Contributor

Just a small note, we forgot to add docs here which is being covered in #8265

@jszwedko
Copy link
Member Author

Just a small note, we forgot to add docs here which is being covered in #8265

Doh, yep. Thanks @lucperkins

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 assert and assert_eq functions to VRL to for use in unit tests
4 participants