Fix design time line mapping Razor Host tests.

This commit is contained in:
N. Taylor Mullen 2016-01-25 17:38:55 -08:00
parent f9ad93c8a5
commit a47dd7ad63
3 changed files with 163 additions and 163 deletions

View File

@ -134,38 +134,38 @@ namespace Microsoft.AspNetCore.Mvc.Razor
{ {
var expectedLineMappings = new[] var expectedLineMappings = new[]
{ {
BuildLineMapping( BuildLineMapping(
documentAbsoluteIndex: 33, documentAbsoluteIndex: 33,
documentLineIndex: 2, documentLineIndex: 2,
documentCharacterIndex: 14, documentCharacterIndex: 14,
generatedAbsoluteIndex: 590, generatedAbsoluteIndex: 602,
generatedLineIndex: 16, generatedLineIndex: 16,
generatedCharacterIndex: 48, generatedCharacterIndex: 48,
contentLength: 83), contentLength: 91),
BuildLineMapping( BuildLineMapping(
documentAbsoluteIndex: 7, documentAbsoluteIndex: 7,
documentLineIndex: 0, documentLineIndex: 0,
documentCharacterIndex: 7, documentCharacterIndex: 7,
generatedAbsoluteIndex: 764, generatedAbsoluteIndex: 784,
generatedLineIndex: 18, generatedLineIndex: 18,
generatedCharacterIndex: 28, generatedCharacterIndex: 28,
contentLength: 8), contentLength: 8),
BuildLineMapping( BuildLineMapping(
documentAbsoluteIndex: 137, documentAbsoluteIndex: 145,
documentLineIndex: 4, documentLineIndex: 4,
documentCharacterIndex: 17, documentCharacterIndex: 17,
generatedAbsoluteIndex: 2180, generatedAbsoluteIndex: 2252,
generatedLineIndex: 47, generatedLineIndex: 47,
generatedCharacterIndex: 95, generatedCharacterIndex: 99,
contentLength: 3), contentLength: 3),
BuildLineMapping( BuildLineMapping(
documentAbsoluteIndex: 164, documentAbsoluteIndex: 172,
documentLineIndex: 5, documentLineIndex: 5,
documentCharacterIndex: 18, documentCharacterIndex: 18,
generatedAbsoluteIndex: 2501, generatedAbsoluteIndex: 2585,
generatedLineIndex: 53, generatedLineIndex: 53,
generatedCharacterIndex: 87, generatedCharacterIndex: 91,
contentLength: 5), contentLength: 5),
}; };
// Act and Assert // Act and Assert
@ -208,22 +208,22 @@ namespace Microsoft.AspNetCore.Mvc.Razor
host.NamespaceImports.Clear(); host.NamespaceImports.Clear();
var expectedLineMappings = new[] var expectedLineMappings = new[]
{ {
BuildLineMapping( BuildLineMapping(
documentAbsoluteIndex: 13, documentAbsoluteIndex: 13,
documentLineIndex: 0, documentLineIndex: 0,
documentCharacterIndex: 13, documentCharacterIndex: 13,
generatedAbsoluteIndex: 1269, generatedAbsoluteIndex: 1305,
generatedLineIndex: 32, generatedLineIndex: 32,
generatedCharacterIndex: 13, generatedCharacterIndex: 13,
contentLength: 4), contentLength: 4),
BuildLineMapping( BuildLineMapping(
documentAbsoluteIndex: 43, documentAbsoluteIndex: 43,
documentLineIndex: 2, documentLineIndex: 2,
documentCharacterIndex: 5, documentCharacterIndex: 5,
generatedAbsoluteIndex: 1353, generatedAbsoluteIndex: 1389,
generatedLineIndex: 37, generatedLineIndex: 37,
generatedCharacterIndex: 6, generatedCharacterIndex: 6,
contentLength: 21), contentLength: 21),
}; };
// Act and Assert // Act and Assert
@ -244,14 +244,14 @@ namespace Microsoft.AspNetCore.Mvc.Razor
host.NamespaceImports.Clear(); host.NamespaceImports.Clear();
var expectedLineMappings = new[] var expectedLineMappings = new[]
{ {
BuildLineMapping( BuildLineMapping(
documentAbsoluteIndex: 8, documentAbsoluteIndex: 8,
documentLineIndex: 0, documentLineIndex: 0,
documentCharacterIndex: 8, documentCharacterIndex: 8,
generatedAbsoluteIndex: 661, generatedAbsoluteIndex: 669,
generatedLineIndex: 21, generatedLineIndex: 21,
generatedCharacterIndex: 8, generatedCharacterIndex: 8,
contentLength: 26), contentLength: 26),
}; };
// Act and Assert // Act and Assert
@ -272,22 +272,22 @@ namespace Microsoft.AspNetCore.Mvc.Razor
host.NamespaceImports.Clear(); host.NamespaceImports.Clear();
var expectedLineMappings = new[] var expectedLineMappings = new[]
{ {
BuildLineMapping( BuildLineMapping(
documentAbsoluteIndex: 1, documentAbsoluteIndex: 1,
documentLineIndex: 0, documentLineIndex: 0,
documentCharacterIndex: 1, documentCharacterIndex: 1,
generatedAbsoluteIndex: 59, generatedAbsoluteIndex: 59,
generatedLineIndex: 3, generatedLineIndex: 3,
generatedCharacterIndex: 0, generatedCharacterIndex: 0,
contentLength: 17), contentLength: 17),
BuildLineMapping( BuildLineMapping(
documentAbsoluteIndex: 28, documentAbsoluteIndex: 28,
documentLineIndex: 1, documentLineIndex: 1,
documentCharacterIndex: 8, documentCharacterIndex: 8,
generatedAbsoluteIndex: 706, generatedAbsoluteIndex: 714,
generatedLineIndex: 26, generatedLineIndex: 26,
generatedCharacterIndex: 8, generatedCharacterIndex: 8,
contentLength: 20), contentLength: 20),
}; };
// Act and Assert // Act and Assert
@ -308,30 +308,30 @@ namespace Microsoft.AspNetCore.Mvc.Razor
host.NamespaceImports.Clear(); host.NamespaceImports.Clear();
var expectedLineMappings = new[] var expectedLineMappings = new[]
{ {
BuildLineMapping( BuildLineMapping(
documentAbsoluteIndex: 7, documentAbsoluteIndex: 7,
documentLineIndex: 0, documentLineIndex: 0,
documentCharacterIndex: 7, documentCharacterIndex: 7,
generatedAbsoluteIndex: 391, generatedAbsoluteIndex: 395,
generatedLineIndex: 11, generatedLineIndex: 11,
generatedCharacterIndex: 28, generatedCharacterIndex: 28,
contentLength: 7), contentLength: 7),
BuildLineMapping( BuildLineMapping(
documentAbsoluteIndex: 24, documentAbsoluteIndex: 24,
documentLineIndex: 1, documentLineIndex: 1,
documentCharacterIndex: 8, documentCharacterIndex: 8,
generatedAbsoluteIndex: 755, generatedAbsoluteIndex: 763,
generatedLineIndex: 25, generatedLineIndex: 25,
generatedCharacterIndex: 8, generatedCharacterIndex: 8,
contentLength: 20), contentLength: 20),
BuildLineMapping( BuildLineMapping(
documentAbsoluteIndex: 54, documentAbsoluteIndex: 54,
documentLineIndex: 2, documentLineIndex: 2,
documentCharacterIndex: 8, documentCharacterIndex: 8,
generatedAbsoluteIndex: 981, generatedAbsoluteIndex: 993,
generatedLineIndex: 33, generatedLineIndex: 33,
generatedCharacterIndex: 8, generatedCharacterIndex: 8,
contentLength: 23), contentLength: 23),
}; };
// Act and Assert // Act and Assert
@ -352,46 +352,46 @@ namespace Microsoft.AspNetCore.Mvc.Razor
host.NamespaceImports.Clear(); host.NamespaceImports.Clear();
var expectedLineMappings = new[] var expectedLineMappings = new[]
{ {
BuildLineMapping( BuildLineMapping(
documentAbsoluteIndex: 7, documentAbsoluteIndex: 7,
documentLineIndex: 0, documentLineIndex: 0,
documentCharacterIndex: 7, documentCharacterIndex: 7,
generatedAbsoluteIndex: 399, generatedAbsoluteIndex: 403,
generatedLineIndex: 11, generatedLineIndex: 11,
generatedCharacterIndex: 28, generatedCharacterIndex: 28,
contentLength: 7), contentLength: 7),
BuildLineMapping( BuildLineMapping(
documentAbsoluteIndex: 24, documentAbsoluteIndex: 24,
documentLineIndex: 1, documentLineIndex: 1,
documentCharacterIndex: 8, documentCharacterIndex: 8,
generatedAbsoluteIndex: 771, generatedAbsoluteIndex: 779,
generatedLineIndex: 25, generatedLineIndex: 25,
generatedCharacterIndex: 8, generatedCharacterIndex: 8,
contentLength: 20), contentLength: 20),
BuildLineMapping( BuildLineMapping(
documentAbsoluteIndex: 58, documentAbsoluteIndex: 58,
documentLineIndex: 2, documentLineIndex: 2,
documentCharacterIndex: 8, documentCharacterIndex: 8,
generatedAbsoluteIndex: 1001, generatedAbsoluteIndex: 1013,
generatedLineIndex: 33, generatedLineIndex: 33,
generatedCharacterIndex: 8, generatedCharacterIndex: 8,
contentLength: 23), contentLength: 23),
BuildLineMapping( BuildLineMapping(
documentAbsoluteIndex: 93, documentAbsoluteIndex: 93,
documentLineIndex: 3, documentLineIndex: 3,
documentCharacterIndex: 8, documentCharacterIndex: 8,
generatedAbsoluteIndex: 1234, generatedAbsoluteIndex: 1250,
generatedLineIndex: 41, generatedLineIndex: 41,
generatedCharacterIndex: 8, generatedCharacterIndex: 8,
contentLength: 21), contentLength: 21),
BuildLineMapping( BuildLineMapping(
documentAbsoluteIndex: 129, documentAbsoluteIndex: 129,
documentLineIndex: 4, documentLineIndex: 4,
documentCharacterIndex: 8, documentCharacterIndex: 8,
generatedAbsoluteIndex: 1465, generatedAbsoluteIndex: 1485,
generatedLineIndex: 49, generatedLineIndex: 49,
generatedCharacterIndex: 8, generatedCharacterIndex: 8,
contentLength: 24), contentLength: 24),
}; };
// Act and Assert // Act and Assert
@ -412,14 +412,14 @@ namespace Microsoft.AspNetCore.Mvc.Razor
host.NamespaceImports.Clear(); host.NamespaceImports.Clear();
var expectedLineMappings = new[] var expectedLineMappings = new[]
{ {
BuildLineMapping( BuildLineMapping(
documentAbsoluteIndex: 7, documentAbsoluteIndex: 7,
documentLineIndex: 0, documentLineIndex: 0,
documentCharacterIndex: 7, documentCharacterIndex: 7,
generatedAbsoluteIndex: 394, generatedAbsoluteIndex: 398,
generatedLineIndex: 11, generatedLineIndex: 11,
generatedCharacterIndex: 28, generatedCharacterIndex: 28,
contentLength: 30), contentLength: 30),
}; };
// Act and Assert // Act and Assert

View File

@ -23,7 +23,7 @@ var __modelHelper = default(DateTime);
#pragma warning restore 219 #pragma warning restore 219
} }
#line hidden #line hidden
private global::Microsoft.AspNetCore.Mvc.Razor.InputTestTagHelper __Microsoft_AspNet_Mvc_Razor_InputTestTagHelper = null; private global::Microsoft.AspNetCore.Mvc.Razor.InputTestTagHelper __Microsoft_AspNetCore_Mvc_Razor_InputTestTagHelper = null;
#line hidden #line hidden
public ASPV_testfiles_input_modelexpressiontaghelper_cshtml() public ASPV_testfiles_input_modelexpressiontaghelper_cshtml()
{ {
@ -43,15 +43,15 @@ var __modelHelper = default(DateTime);
#pragma warning disable 1998 #pragma warning disable 1998
public override async Task ExecuteAsync() public override async Task ExecuteAsync()
{ {
__Microsoft_AspNet_Mvc_Razor_InputTestTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.Razor.InputTestTagHelper>(); __Microsoft_AspNetCore_Mvc_Razor_InputTestTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.Razor.InputTestTagHelper>();
#line 5 "testfiles/input/modelexpressiontaghelper.cshtml" #line 5 "testfiles/input/modelexpressiontaghelper.cshtml"
__Microsoft_AspNet_Mvc_Razor_InputTestTagHelper.For = CreateModelExpression(__model => __model.Now); __Microsoft_AspNetCore_Mvc_Razor_InputTestTagHelper.For = CreateModelExpression(__model => __model.Now);
#line default #line default
#line hidden #line hidden
__Microsoft_AspNet_Mvc_Razor_InputTestTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.Razor.InputTestTagHelper>(); __Microsoft_AspNetCore_Mvc_Razor_InputTestTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.Razor.InputTestTagHelper>();
#line 6 "testfiles/input/modelexpressiontaghelper.cshtml" #line 6 "testfiles/input/modelexpressiontaghelper.cshtml"
__Microsoft_AspNet_Mvc_Razor_InputTestTagHelper.For = CreateModelExpression(__model => Model); __Microsoft_AspNetCore_Mvc_Razor_InputTestTagHelper.For = CreateModelExpression(__model => Model);
#line default #line default
#line hidden #line hidden

View File

@ -1,4 +1,4 @@
#pragma checksum "TestFiles/Input/ModelExpressionTagHelper.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "0ff475dc725132bad90d86e9458bacc73dce3df3" #pragma checksum "TestFiles/Input/ModelExpressionTagHelper.cshtml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "bb128a8b2ca348e77a9b5481e541b5a8bf82de0b"
namespace Asp namespace Asp
{ {
using System; using System;
@ -17,7 +17,7 @@ namespace Asp
private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext __tagHelperExecutionContext = null; private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperExecutionContext __tagHelperExecutionContext = null;
private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner __tagHelperRunner = null; private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner __tagHelperRunner = null;
private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager __tagHelperScopeManager = new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager(); private global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager __tagHelperScopeManager = new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperScopeManager();
private global::Microsoft.AspNetCore.Mvc.Razor.InputTestTagHelper __Microsoft_AspNet_Mvc_Razor_InputTestTagHelper = null; private global::Microsoft.AspNetCore.Mvc.Razor.InputTestTagHelper __Microsoft_AspNetCore_Mvc_Razor_InputTestTagHelper = null;
#line hidden #line hidden
public ASPV_TestFiles_Input_ModelExpressionTagHelper_cshtml() public ASPV_TestFiles_Input_ModelExpressionTagHelper_cshtml()
{ {
@ -38,41 +38,41 @@ namespace Asp
public override async Task ExecuteAsync() public override async Task ExecuteAsync()
{ {
__tagHelperRunner = __tagHelperRunner ?? new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner(); __tagHelperRunner = __tagHelperRunner ?? new global::Microsoft.AspNetCore.Razor.Runtime.TagHelpers.TagHelperRunner();
BeginContext(118, 2, true); BeginContext(126, 2, true);
WriteLiteral("\r\n"); WriteLiteral("\r\n");
EndContext(); EndContext();
__tagHelperExecutionContext = __tagHelperScopeManager.Begin("input-test", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "test", async() => { __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input-test", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "test", async() => {
} }
, StartTagHelperWritingScope, EndTagHelperWritingScope); , StartTagHelperWritingScope, EndTagHelperWritingScope);
__Microsoft_AspNet_Mvc_Razor_InputTestTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.Razor.InputTestTagHelper>(); __Microsoft_AspNetCore_Mvc_Razor_InputTestTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.Razor.InputTestTagHelper>();
__tagHelperExecutionContext.Add(__Microsoft_AspNet_Mvc_Razor_InputTestTagHelper); __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_Razor_InputTestTagHelper);
#line 5 "TestFiles/Input/ModelExpressionTagHelper.cshtml" #line 5 "TestFiles/Input/ModelExpressionTagHelper.cshtml"
__Microsoft_AspNet_Mvc_Razor_InputTestTagHelper.For = CreateModelExpression(__model => __model.Now); __Microsoft_AspNetCore_Mvc_Razor_InputTestTagHelper.For = CreateModelExpression(__model => __model.Now);
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("for", __Microsoft_AspNet_Mvc_Razor_InputTestTagHelper.For); __tagHelperExecutionContext.AddTagHelperAttribute("for", __Microsoft_AspNetCore_Mvc_Razor_InputTestTagHelper.For);
__tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
BeginContext(120, 24, false); BeginContext(128, 24, false);
Write(__tagHelperExecutionContext.Output); Write(__tagHelperExecutionContext.Output);
EndContext(); EndContext();
__tagHelperExecutionContext = __tagHelperScopeManager.End(); __tagHelperExecutionContext = __tagHelperScopeManager.End();
BeginContext(144, 2, true); BeginContext(152, 2, true);
WriteLiteral("\r\n"); WriteLiteral("\r\n");
EndContext(); EndContext();
__tagHelperExecutionContext = __tagHelperScopeManager.Begin("input-test", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "test", async() => { __tagHelperExecutionContext = __tagHelperScopeManager.Begin("input-test", global::Microsoft.AspNetCore.Razor.TagHelpers.TagMode.SelfClosing, "test", async() => {
} }
, StartTagHelperWritingScope, EndTagHelperWritingScope); , StartTagHelperWritingScope, EndTagHelperWritingScope);
__Microsoft_AspNet_Mvc_Razor_InputTestTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.Razor.InputTestTagHelper>(); __Microsoft_AspNetCore_Mvc_Razor_InputTestTagHelper = CreateTagHelper<global::Microsoft.AspNetCore.Mvc.Razor.InputTestTagHelper>();
__tagHelperExecutionContext.Add(__Microsoft_AspNet_Mvc_Razor_InputTestTagHelper); __tagHelperExecutionContext.Add(__Microsoft_AspNetCore_Mvc_Razor_InputTestTagHelper);
#line 6 "TestFiles/Input/ModelExpressionTagHelper.cshtml" #line 6 "TestFiles/Input/ModelExpressionTagHelper.cshtml"
__Microsoft_AspNet_Mvc_Razor_InputTestTagHelper.For = CreateModelExpression(__model => Model); __Microsoft_AspNetCore_Mvc_Razor_InputTestTagHelper.For = CreateModelExpression(__model => Model);
#line default #line default
#line hidden #line hidden
__tagHelperExecutionContext.AddTagHelperAttribute("for", __Microsoft_AspNet_Mvc_Razor_InputTestTagHelper.For); __tagHelperExecutionContext.AddTagHelperAttribute("for", __Microsoft_AspNetCore_Mvc_Razor_InputTestTagHelper.For);
__tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext); __tagHelperExecutionContext.Output = await __tagHelperRunner.RunAsync(__tagHelperExecutionContext);
BeginContext(146, 27, false); BeginContext(154, 27, false);
Write(__tagHelperExecutionContext.Output); Write(__tagHelperExecutionContext.Output);
EndContext(); EndContext();
__tagHelperExecutionContext = __tagHelperScopeManager.End(); __tagHelperExecutionContext = __tagHelperScopeManager.End();