Esempio n. 1
0
 protected async Task TestMissingInRegularAndScriptAsync(
     string initialMarkup,
     TestParameters parameters = default(TestParameters))
 {
     await TestMissingAsync(initialMarkup, parameters.WithParseOptions(null));
     await TestMissingAsync(initialMarkup, parameters.WithParseOptions(GetScriptOptions()));
 }
 internal async Task TestInRegularAndScript1Async(
     string initialMarkup,
     string expectedMarkup,
     int index = 0,
     CodeActionPriority?priority = null,
     TestParameters parameters   = default(TestParameters))
 {
     await TestAsync(initialMarkup, expectedMarkup, index, priority, parameters.WithParseOptions(null));
     await TestAsync(initialMarkup, expectedMarkup, index, priority, parameters.WithParseOptions(GetScriptOptions()));
 }
 protected async Task TestAddDocumentInRegularAndScriptAsync(
     string initialMarkup, string expectedMarkup,
     ImmutableArray <string> expectedContainers,
     string expectedDocumentName,
     int index = 0,
     TestParameters parameters = default(TestParameters))
 {
     await TestAddDocument(
         initialMarkup, expectedMarkup,
         expectedContainers, expectedDocumentName,
         index, parameters.WithParseOptions(null));
     await TestAddDocument(
         initialMarkup, expectedMarkup,
         expectedContainers, expectedDocumentName,
         index, parameters.WithParseOptions(GetScriptOptions()));
 }
Esempio n. 4
0
 protected async Task TestAddDocumentInRegularAndScriptAsync(
     string initialMarkup, string expectedMarkup,
     IList <string> expectedContainers,
     string expectedDocumentName,
     int index                 = 0,
     bool ignoreTrivia         = true,
     TestParameters parameters = default(TestParameters))
 {
     await TestAddDocument(
         initialMarkup, expectedMarkup,
         expectedContainers, expectedDocumentName,
         index, ignoreTrivia,
         parameters.WithParseOptions(null));
     await TestAddDocument(
         initialMarkup, expectedMarkup,
         expectedContainers, expectedDocumentName,
         index, ignoreTrivia,
         parameters.WithParseOptions(GetScriptOptions()));
 }
 private TestParameters WithScriptOptions(TestParameters parameters)
 => parameters.WithParseOptions(parameters.parseOptions?.WithKind(SourceCodeKind.Script) ?? GetScriptOptions());
 private TestParameters WithRegularOptions(TestParameters parameters)
 => parameters.WithParseOptions(parameters.parseOptions?.WithKind(SourceCodeKind.Regular));