Skip to content

Commit

Permalink
Tests are crashing due to NUnit bug: nunit/nunit3-vs-adapter#691
Browse files Browse the repository at this point in the history
Nunit bug is that InlineData in strings need to have balanced quotes.
Update test case. This shouldn't lose coverage since the quote comes after the intellisense cursor.
  • Loading branch information
Mike Stall committed Feb 17, 2022
1 parent fa1db3b commit eac18af
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ private class EmptyEnumStore : EnumStore
// DottedNameNodeSuggestionHandler
[InlineData("{a:{},b:{},c:{}}.|", "a", "b", "c")]
[InlineData("$\"Hello { First(Table({a:{},b:{},c:{}})).| } World\"", "a", "b", "c")]
[InlineData("$\"Hello { First(Table({a:{},b:{},c:{}})).|", "a", "b", "c")]
[InlineData("$\"Hello { {a:{},b:{},c:{}}.|", "a", "b", "c")]
[InlineData("$\"Hello { First(Table({a:{},b:{},c:{}})).| \"", "a", "b", "c")]
[InlineData("$\"Hello { {a:{},b:{},c:{}}.| \"", "a", "b", "c")]
[InlineData("$ |")]
[InlineData("$\"foo {|")]
[InlineData("{abc:{},ab:{},a:{}}.|ab", "ab", "a", "abc")]
Expand Down Expand Up @@ -151,6 +151,9 @@ private class EmptyEnumStore : EnumStore
[InlineData("$\"Hello {DisplayMode|} World!\"", "DisplayMode", "DisplayMode.Disabled", "DisplayMode.Edit", "DisplayMode.View")]
public void TestSuggest(string expression, params string[] expectedSuggestions)
{
// Note that the expression string needs to have balanced quotes or we hit a bug in NUnit running the tests:
// https://github.com/nunit/nunit3-vs-adapter/issues/691

FeatureFlags.StringInterpolation = true;
var actualSuggestions = SuggestStrings(expression, _defaultEnumStore);
Assert.Equal(expectedSuggestions, actualSuggestions);
Expand Down

0 comments on commit eac18af

Please sign in to comment.