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

SE: Add IInvocationOperationExtensions.Target tests #9513

Merged
merged 7 commits into from
Jul 12, 2024

Conversation

mary-georgiou-sonarsource
Copy link
Contributor

No description provided.

Copy link
Contributor

@Tim-Pohlmann Tim-Pohlmann left a comment

Choose a reason for hiding this comment

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

Review 1

@@ -97,7 +97,7 @@ public override void ExecutionCompleted()
protected override ProgramState PreProcessSimple(SymbolicContext context)
{
if (context.Operation.Instance.AsInvocation() is { } invocation
&& invocation.Instance is { } instance
&& invocation.Target(context.State) is { } instance
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added a test with a fake extension method 😢

Copy link
Contributor

@Tim-Pohlmann Tim-Pohlmann left a comment

Choose a reason for hiding this comment

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

Looks good over all, still missing a test, I think.

@@ -720,6 +721,7 @@ public void Invocation_CollectionMethods_SetCollectionConstraint()
Verify("clear", ObjectConstraint.NotNull, CollectionConstraint.Empty);
Verify("add", ObjectConstraint.NotNull, CollectionConstraint.NotEmpty);
Verify("remove", ObjectConstraint.NotNull);
Verify("addExtension", ObjectConstraint.NotNull, CollectionConstraint.NotEmpty);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this was not adding notempty before that change in the collectionTracker that I missed adding a UT for.

Copy link

sonarcloud bot commented Jul 12, 2024

Copy link

sonarcloud bot commented Jul 12, 2024

Copy link
Contributor

@Tim-Pohlmann Tim-Pohlmann left a comment

Choose a reason for hiding this comment

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

LGTM!

@mary-georgiou-sonarsource mary-georgiou-sonarsource merged commit 333ad30 into master Jul 12, 2024
31 checks passed
@mary-georgiou-sonarsource mary-georgiou-sonarsource deleted the mary/extensions branch July 12, 2024 11:37
@mary-georgiou-sonarsource mary-georgiou-sonarsource changed the title SE: Add IInvocationOperationExtensions.GetInstance tests SE: Add IInvocationOperationExtensions..Target tests Jul 12, 2024
@mary-georgiou-sonarsource mary-georgiou-sonarsource changed the title SE: Add IInvocationOperationExtensions..Target tests SE: Add IInvocationOperationExtensions.Target tests Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Sprint: Hardening Fix FPs/FNs/improvements Type: Cleanup Improve and cleanup code base
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants