-
Notifications
You must be signed in to change notification settings - Fork 261
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
Fixes gutter when cache is enabled #2312
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
1065420
Fixes https://github.com/dafny-lang/ide-vscode/issues/187
MikaelMayer 2e93d58
Fixed caching errors as well.
MikaelMayer e518769
Update RELEASE_NOTES.md
MikaelMayer 89238d4
Simplified ReportAssertionBatchResult
MikaelMayer 6db3fc1
Merge branch 'master' into fix-caching-gutter
MikaelMayer 12e6bb2
Merge branch 'master' into fix-caching-gutter
keyboardDrummer 58c7f62
Merge branch 'master' into fix-caching-gutter
MikaelMayer c0f05cd
Merge branch 'master' into fix-caching-gutter
keyboardDrummer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
Source/DafnyLanguageServer.Test/GutterStatus/CachedLinearVerificationGutterStatusTester.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text.RegularExpressions; | ||
using System.Threading.Tasks; | ||
using Microsoft.Dafny.LanguageServer.IntegrationTest.Extensions; | ||
using Microsoft.Dafny.LanguageServer.IntegrationTest.Util; | ||
using Microsoft.Dafny.LanguageServer.Language; | ||
using Microsoft.Dafny.LanguageServer.Workspace; | ||
using Microsoft.Dafny.LanguageServer.Workspace.Notifications; | ||
using Microsoft.VisualStudio.TestTools.UnitTesting; | ||
using OmniSharp.Extensions.LanguageServer.Protocol.Models; | ||
using Range = OmniSharp.Extensions.LanguageServer.Protocol.Models.Range; | ||
|
||
namespace Microsoft.Dafny.LanguageServer.IntegrationTest.Diagnostics; | ||
|
||
[TestClass] | ||
public class CachedLinearVerificationGutterStatusTester : LinearVerificationGutterStatusTester { | ||
private const int MaxTestExecutionTimeMs = 10000; | ||
|
||
|
||
|
||
// To add a new test, just call VerifyTrace on a given program, | ||
// the test will fail and give the correct output that can be use for the test | ||
// Add '//Next<n>:' to edit a line multiple times | ||
|
||
[TestMethod, Timeout(MaxTestExecutionTimeMs)] | ||
public async Task EnsureCachingDoesNotMakeSquigglyLinesToRemain() { | ||
await SetUp(new Dictionary<string, string>() { | ||
{ $"{VerifierOptions.Section}:{nameof(VerifierOptions.VerifySnapshots)}", "1" } | ||
}); | ||
await VerifyTrace(@" | ||
. S S | I $ | :method test() { | ||
. S | | I $ | : assert true; | ||
. S S | I $ | : //Next: | ||
. S S | I $ | :}"); | ||
} | ||
|
||
[TestMethod, Timeout(MaxTestExecutionTimeMs)] | ||
public async Task EnsureCachingDoesNotHideErrors() { | ||
await SetUp(new Dictionary<string, string>() { | ||
{ $"{VerifierOptions.Section}:{nameof(VerifierOptions.VerifySnapshots)}", "1" } | ||
}); | ||
await VerifyTrace(@" | ||
. S [S][ ][I][S][S][ ]:method test() { | ||
. S [O][O][o][Q][O][O]: assert true; | ||
. S [=][=][-][~][=][=]: assert false; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Before the fix, the last [O] and [=] would have been replaced by [ ] because the result of individual cached splits were not reported the second time. |
||
. S [S][ ][I][S][S][ ]: //Next: | ||
. S [S][ ][I][S][S][ ]:}"); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Before the fix, this text would not terminate because it would never get back to the | icon