#1961 migrate CharSequenceToContainRegexExpectationsSpec to kotlin-test
https://github.com/robstoll/atrium/issues/1961
I confirm that I have read the Contributor Agreements v1.0, agree to be bound on them and confirm that my contribution is compliant.
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 90.99%. Comparing base (0b5b524) to head (be07bd2).
:warning: Report is 7 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #2057 +/- ##
=========================================
Coverage 90.99% 90.99%
Complexity 125 125
=========================================
Files 467 467
Lines 5087 5087
Branches 241 241
=========================================
Hits 4629 4629
Misses 410 410
Partials 48 48
| Flag | Coverage Δ | |
|---|---|---|
| current | 90.62% <ø> (ø) |
|
| current_windows | 89.79% <ø> (ø) |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
Hi @robstoll
I'm trying to use the infix function value in the form:
this toContain value a
inside CharSequenceToContainValuesExpectationsTest, but I keep getting an error:
Unresolved reference: a
From my investigation, value is defined as an infix function on CheckerStep or EntryPointStep types, but toContain by itself seems to return a type that doesn't have value as an available extension. Using
this toContain o value a
works fine though.
Is this an expected limitation? Is the presence of o mandatory here because of the return type of toContain? Or am I missing something about how these infix extensions are resolved?
I’d appreciate your guidance on this, since it’s blocking me in implementing the tests naturally.
Thanks a lot!
@matcha4smiley infix function require exactly one argument. You cannot have an infix function without argument (thus we sometimes require to pass the filler o as in toContain o instead of just .toContain.) Neither is it possible to pass multiple arguments in which case we usually use helper methods such as values(x,y) which creates a Values and then we pass again just one argument. I hope this helps, otherwise point me to the code line where you are stuck and I take a closer look
@matcha4smiley infix function require exactly one argument. You cannot have an infix function without argument (thus we sometimes require to pass the filler
oas intoContain oinstead of just.toContain.) Neither is it possible to pass multiple arguments in which case we usually use helper methods such asvalues(x,y)which creates a Values and then we pass again just one argument. I hope this helps, otherwise point me to the code line where you are stuck and I take a closer look
Hi @robstoll,
Thanks for your explanation! I think I understand the concept now.
However, I'm still stuck at this particular line in my test: https://github.com/robstoll/atrium/pull/2057/files#diff-fc2f5ab4c9cb04e46159e18d9855a6130be234b01670a8b290ec01af9937d20aR41
@matcha4smiley thanks for the update, we would need to rebase the whole thing so that we get 2 commits in the end. I also see that we need to adjust a few things. Before I go into detail, do you still have time, otherwise I can also take over from here (although I might neither have time at the moment)
@robstoll Thanks! Since I’ve already come this far and I have some time now, I’d prefer to finish it up myself.
I’ll handle the rebase and the remaining adjustments.
@robstoll Thanks for the review! I've fixed the mentioned parts. Please have a look when you get a chance.
As info, I had to adjust a few things in main due to KotlinJS bugs. Please rebase your branch before you continue
@matcha4smiley do you still intend to work on this?
@matcha4smiley do you still intend to work on this?
@robstoll I apologize for the delay. Unfortunately, I’m unable to allocate time to this at the moment, so I would appreciate it if you could unassign me for now.
@TomerPacific do you fancy to take over?
@robstoll - I think I will pass on this one.