-
Notifications
You must be signed in to change notification settings - Fork 1.7k
C#: Extensive use of stubs in testcases. #8279
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
Conversation
46296b2 to
f37d520
Compare
4734992 to
3d3db61
Compare
|
@hvitved : Before investing more time on this; Is this something we want? What do you think? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some initial comments
| @@ -1,5 +1,5 @@ | |||
| import csharp | |||
|
|
|||
| from Call call, Expr arg, string paramName | |||
| where arg = call.getArgumentForName(paramName) | |||
| where arg = call.getArgumentForName(paramName) and arg.fromSource() | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we treat everything in stubs as not fromSource already?
| @@ -2775,7 +2775,7 @@ Assert.cs: | |||
| #-----| true -> access to parameter b2 | |||
|
|
|||
| # 140| [assertion failure] access to parameter b2 | |||
| #-----| false -> [assertion failure] access to parameter b3 | |||
| #-----| true -> [assertion failure] access to parameter b3 | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is because the stubs are still based on .NET 5. When we upgraded to .NET 6, this line changed.
| @@ -6600,10 +6600,20 @@ Finally.cs: | |||
|
|
|||
| # 125| ... / ... | |||
| #-----| -> Double temp = ... | |||
| #-----| exception(DivideByZeroException) -> catch {...} | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's change System.Math.E on line 125 in Finally.cs to 2.7182818284590451. Or should we instead include constant values when generating stubs?
| @@ -94,7 +94,6 @@ abstractValue | |||
| | non-null | Assert.cs:9:31:9:32 | "" | | |||
| | non-null | Assert.cs:10:9:10:13 | access to type Debug | | |||
| | non-null | Assert.cs:11:9:11:15 | access to type Console | | |||
| | non-null | Assert.cs:11:27:11:27 | access to local variable s | | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be investigated
| | non-null | Guards.cs:168:14:168:19 | access to type String | | ||
| | non-null | Guards.cs:169:13:169:19 | access to type Console | | ||
| | non-null | Guards.cs:169:31:169:31 | access to parameter x | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be investigated
| | non-null | Splitting.cs:107:13:107:13 | access to parameter o | | ||
| | non-null | Splitting.cs:109:13:109:13 | access to parameter o | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be investigated
| | non-null | Splitting.cs:116:9:116:13 | access to type Debug | | ||
| | non-null | Splitting.cs:117:9:117:9 | access to parameter o | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be investigated
No description provided.