From 32f6f4df009efeefca4f2ac720efffcc3b5bacfd Mon Sep 17 00:00:00 2001
From: "N. Taylor Mullen"
Date: Thu, 8 May 2014 15:51:06 -0700
Subject: [PATCH] Modify tests to account for new generated output.
Added pragma warning disable 1998 to surrounded generated execute method.
#28
---
.../Generator/CSharpRazorCodeGeneratorTest.cs | 120 +++++++++---------
.../CodeTree/CSharpCodeBuilderTests.cs | 2 +
.../CS/Output/Await.DesignTime.cs | 2 +
.../CodeGenerator/CS/Output/Await.cs | 2 +
.../CodeGenerator/CS/Output/Blocks.cs | 2 +
.../CodeGenerator/CS/Output/CodeBlock.cs | 2 +
.../CodeGenerator/CS/Output/CodeBlockAtEOF.cs | 2 +
.../CodeGenerator/CS/Output/CodeTree.cs | 2 +
.../CS/Output/ConditionalAttributes.cs | 2 +
.../CodeGenerator/CS/Output/DesignTime.cs | 2 +
.../CodeGenerator/CS/Output/EmptyCodeBlock.cs | 2 +
.../CS/Output/EmptyExplicitExpression.cs | 2 +
.../CS/Output/EmptyImplicitExpression.cs | 2 +
.../EmptyImplicitExpressionInCode.Tabs.cs | 2 +
.../Output/EmptyImplicitExpressionInCode.cs | 2 +
.../CS/Output/ExplicitExpression.cs | 2 +
.../CS/Output/ExplicitExpressionAtEOF.cs | 2 +
.../CS/Output/ExpressionsInCode.cs | 2 +
.../Output/FunctionsBlock.DesignTime.Tabs.cs | 2 +
.../CS/Output/FunctionsBlock.DesignTime.cs | 2 +
.../CodeGenerator/CS/Output/FunctionsBlock.cs | 2 +
.../FunctionsBlockMinimal.DesignTime.Tabs.cs | 2 +
.../CS/Output/FunctionsBlock_Tabs.cs | 2 +
.../CS/Output/Helpers.Instance.cs | 2 +
.../CodeGenerator/CS/Output/Helpers.cs | 2 +
.../CS/Output/HelpersMissingCloseParen.cs | 2 +
.../CS/Output/HelpersMissingOpenBrace.cs | 2 +
.../CS/Output/HelpersMissingOpenParen.cs | 2 +
.../CS/Output/HiddenSpansInCode.cs | 2 +
.../CS/Output/HtmlCommentWithQuote_Double.cs | 2 +
.../CS/Output/HtmlCommentWithQuote_Single.cs | 2 +
.../CS/Output/ImplicitExpression.cs | 2 +
.../CS/Output/ImplicitExpressionAtEOF.cs | 2 +
.../CS/Output/Imports.DesignTime.cs | 2 +
.../CodeGenerator/CS/Output/Imports.cs | 2 +
.../CS/Output/Inherits.Designtime.cs | 2 +
.../CS/Output/Inherits.Runtime.cs | 2 +
.../CodeGenerator/CS/Output/InlineBlocks.cs | 2 +
.../CS/Output/LayoutDirective.cs | 2 +
.../CS/Output/MarkupInCodeBlock.cs | 2 +
.../CS/Output/NestedCodeBlocks.cs | 2 +
.../CodeGenerator/CS/Output/NestedHelpers.cs | 2 +
.../CodeGenerator/CS/Output/NoLinePragmas.cs | 2 +
.../CS/Output/OpenedIf.DesignTime.Tabs.cs | 2 +
.../CS/Output/OpenedIf.DesignTime.cs | 2 +
.../CodeGenerator/CS/Output/ParserError.cs | 2 +
.../CS/Output/RazorComments.DesignTime.cs | 2 +
.../CodeGenerator/CS/Output/RazorComments.cs | 2 +
.../CodeGenerator/CS/Output/ResolveUrl.cs | 2 +
.../CodeGenerator/CS/Output/Sections.cs | 2 +
.../SimpleUnspacedIf.DesignTime.Tabs.cs | 2 +
.../CodeGenerator/CS/Output/Templates.cs | 2 +
.../Output/UnfinishedExpressionInCode.Tabs.cs | 2 +
.../CS/Output/UnfinishedExpressionInCode.cs | 2 +
.../TestFiles/DesignTime/Simple.txt | 2 +
55 files changed, 168 insertions(+), 60 deletions(-)
diff --git a/test/Microsoft.AspNet.Razor.Test/Generator/CSharpRazorCodeGeneratorTest.cs b/test/Microsoft.AspNet.Razor.Test/Generator/CSharpRazorCodeGeneratorTest.cs
index 056c25c82e..935b8a6f82 100644
--- a/test/Microsoft.AspNet.Razor.Test/Generator/CSharpRazorCodeGeneratorTest.cs
+++ b/test/Microsoft.AspNet.Razor.Test/Generator/CSharpRazorCodeGeneratorTest.cs
@@ -101,20 +101,20 @@ namespace Microsoft.AspNet.Razor.Test.Generator
expectedDesignTimePragmas: new List()
{
BuildLineMapping(12, 0, 12, 173, 9, 0, 76),
- BuildLineMapping(192, 9, 39, 608, 30, 15, 11),
- BuildLineMapping(247, 10, 38, 692, 35, 14, 11),
- BuildLineMapping(304, 11, 39, 774, 40, 12, 14),
- BuildLineMapping(371, 12, 46, 861, 46, 13, 1),
- BuildLineMapping(376, 12, 51, 940, 52, 18, 11),
- BuildLineMapping(391, 12, 66, 1028, 57, 18, 1),
- BuildLineMapping(448, 13, 49, 1108, 63, 19, 5),
- BuildLineMapping(578, 18, 42, 1187, 68, 15, 15),
- BuildLineMapping(640, 19, 41, 1278, 73, 17, 22),
- BuildLineMapping(711, 20, 42, 1371, 78, 12, 39),
- BuildLineMapping(806, 21, 49, 1483, 84, 13, 1),
- BuildLineMapping(811, 21, 54, 1562, 90, 18, 27),
- BuildLineMapping(842, 21, 85, 1670, 95, 22, 1),
- BuildLineMapping(902, 22, 52, 1750, 101, 19, 19)
+ BuildLineMapping(192, 9, 39, 646, 31, 15, 11),
+ BuildLineMapping(247, 10, 38, 730, 36, 14, 11),
+ BuildLineMapping(304, 11, 39, 812, 41, 12, 14),
+ BuildLineMapping(371, 12, 46, 899, 47, 13, 1),
+ BuildLineMapping(376, 12, 51, 978, 53, 18, 11),
+ BuildLineMapping(391, 12, 66, 1066, 58, 18, 1),
+ BuildLineMapping(448, 13, 49, 1146, 64, 19, 5),
+ BuildLineMapping(578, 18, 42, 1225, 69, 15, 15),
+ BuildLineMapping(640, 19, 41, 1316, 74, 17, 22),
+ BuildLineMapping(711, 20, 42, 1409, 79, 12, 39),
+ BuildLineMapping(806, 21, 49, 1521, 85, 13, 1),
+ BuildLineMapping(811, 21, 54, 1600, 91, 18, 27),
+ BuildLineMapping(842, 21, 85, 1708, 96, 22, 1),
+ BuildLineMapping(902, 22, 52, 1788, 102, 19, 19)
});
}
@@ -127,8 +127,8 @@ namespace Microsoft.AspNet.Razor.Test.Generator
tabTest: TabTest.Tabs,
expectedDesignTimePragmas: new List()
{
- BuildLineMapping(1, 0, 1, 494, 21, 0, 15),
- BuildLineMapping(27, 2, 12, 585, 29, 6, 3)
+ BuildLineMapping(1, 0, 1, 532, 22, 0, 15),
+ BuildLineMapping(27, 2, 12, 623, 30, 6, 3)
});
}
@@ -138,13 +138,13 @@ namespace Microsoft.AspNet.Razor.Test.Generator
RunTest("RazorComments", "RazorComments.DesignTime", designTimeMode: true, tabTest: TabTest.NoTabs,
expectedDesignTimePragmas: new List()
{
- BuildLineMapping(81, 3, 487, 21, 2, 6),
- BuildLineMapping(122, 4, 39, 598, 28, 38, 22),
- BuildLineMapping(173, 5, 49, 735, 35, 48, 58),
- BuildLineMapping(238, 11, 861, 44, 2, 24),
- BuildLineMapping(310, 12, 998, 50, 45, 3),
- BuildLineMapping(323, 14, 2, 1074, 55, 6, 1),
- BuildLineMapping(328, 14, 1117, 57, 7, 1)
+ BuildLineMapping(81, 3, 525, 22, 2, 6),
+ BuildLineMapping(122, 4, 39, 636, 29, 38, 22),
+ BuildLineMapping(173, 5, 49, 773, 36, 48, 58),
+ BuildLineMapping(238, 11, 899, 45, 2, 24),
+ BuildLineMapping(310, 12, 1036, 51, 45, 3),
+ BuildLineMapping(323, 14, 2, 1112, 56, 6, 1),
+ BuildLineMapping(328, 14, 1155, 58, 7, 1)
});
}
@@ -169,8 +169,8 @@ namespace Microsoft.AspNet.Razor.Test.Generator
BuildLineMapping(1, 0, 1, 51, 3, 0, 15),
BuildLineMapping(19, 1, 1, 132, 9, 0, 32),
BuildLineMapping(54, 2, 1, 230, 15, 0, 12),
- BuildLineMapping(99, 4, 734, 38, 29, 21),
- BuildLineMapping(161, 5, 850, 43, 35, 20)
+ BuildLineMapping(99, 4, 772, 39, 29, 21),
+ BuildLineMapping(161, 5, 888, 44, 35, 20)
});
}
@@ -185,7 +185,7 @@ namespace Microsoft.AspNet.Razor.Test.Generator
{
BuildLineMapping(12, 0, 12, 191, 9, 0, 4),
BuildLineMapping(33, 4, 12, 259, 15, 0, 104),
- BuildLineMapping(167, 11, 750, 36, 25, 11)
+ BuildLineMapping(167, 11, 788, 37, 25, 11)
});
}
@@ -200,7 +200,7 @@ namespace Microsoft.AspNet.Razor.Test.Generator
{
BuildLineMapping(12, 0, 12, 191, 9, 0, 4),
BuildLineMapping(33, 4, 12, 259, 15, 0, 104),
- BuildLineMapping(167, 11, 25, 738, 36, 13, 11)
+ BuildLineMapping(167, 11, 25, 776, 37, 13, 11)
});
}
@@ -222,8 +222,8 @@ namespace Microsoft.AspNet.Razor.Test.Generator
{
RunTest("HiddenSpansInCode", designTimeMode: true, tabTest: TabTest.NoTabs, expectedDesignTimePragmas: new List
{
- BuildLineMapping(2, 0, 499, 21, 2, 6),
- BuildLineMapping(9, 1, 581, 28, 5, 5)
+ BuildLineMapping(2, 0, 537, 22, 2, 6),
+ BuildLineMapping(9, 1, 619, 29, 5, 5)
});
}
@@ -232,7 +232,7 @@ namespace Microsoft.AspNet.Razor.Test.Generator
{
RunTest("ParserError", designTimeMode: true, expectedDesignTimePragmas: new List()
{
- BuildLineMapping(2, 0, 481, 21, 2, 31)
+ BuildLineMapping(2, 0, 519, 22, 2, 31)
});
}
@@ -248,7 +248,7 @@ namespace Microsoft.AspNet.Razor.Test.Generator
RunTest("Inherits", baselineName: "Inherits.Designtime", designTimeMode: true, tabTest: TabTest.NoTabs, expectedDesignTimePragmas: new List()
{
BuildLineMapping(20, 2, 321, 12, 10, 25),
- BuildLineMapping(1, 0, 1, 624, 26, 6, 5)
+ BuildLineMapping(1, 0, 1, 662, 27, 6, 5)
});
}
@@ -257,9 +257,9 @@ namespace Microsoft.AspNet.Razor.Test.Generator
{
RunTest("UnfinishedExpressionInCode", tabTest: TabTest.NoTabs, designTimeMode: true, expectedDesignTimePragmas: new List()
{
- BuildLineMapping(2, 0, 526, 21, 2, 2),
- BuildLineMapping(5, 1, 1, 612, 27, 6, 9),
- BuildLineMapping(14, 1, 710, 32, 10, 2)
+ BuildLineMapping(2, 0, 564, 22, 2, 2),
+ BuildLineMapping(5, 1, 1, 650, 28, 6, 9),
+ BuildLineMapping(14, 1, 748, 33, 10, 2)
});
}
@@ -271,9 +271,9 @@ namespace Microsoft.AspNet.Razor.Test.Generator
tabTest: TabTest.Tabs,
designTimeMode: true, expectedDesignTimePragmas: new List()
{
- BuildLineMapping(2, 0, 526, 21, 2, 2),
- BuildLineMapping(5, 1, 1, 612, 27, 6, 9),
- BuildLineMapping(14, 1, 10, 704, 32, 4, 2)
+ BuildLineMapping(2, 0, 564, 22, 2, 2),
+ BuildLineMapping(5, 1, 1, 650, 28, 6, 9),
+ BuildLineMapping(14, 1, 10, 742, 33, 4, 2)
});
}
@@ -289,14 +289,14 @@ namespace Microsoft.AspNet.Razor.Test.Generator
BuildLineMapping(229, 16, 352, 16, 15, 26),
BuildLineMapping(265, 18, 461, 24, 18, 9),
BuildLineMapping(274, 20, 556, 33, 0, 1),
- BuildLineMapping(20, 1, 13, 926, 51, 12, 36),
- BuildLineMapping(74, 2, 1048, 58, 22, 1),
- BuildLineMapping(79, 2, 1139, 63, 27, 15),
- BuildLineMapping(113, 7, 2, 1224, 70, 6, 12),
- BuildLineMapping(129, 8, 1, 1305, 75, 6, 4),
- BuildLineMapping(142, 8, 1405, 77, 14, 3),
- BuildLineMapping(153, 8, 1502, 84, 25, 1),
- BuildLineMapping(204, 13, 5, 1687, 94, 6, 3)
+ BuildLineMapping(20, 1, 13, 964, 52, 12, 36),
+ BuildLineMapping(74, 2, 1086, 59, 22, 1),
+ BuildLineMapping(79, 2, 1177, 64, 27, 15),
+ BuildLineMapping(113, 7, 2, 1262, 71, 6, 12),
+ BuildLineMapping(129, 8, 1, 1343, 76, 6, 4),
+ BuildLineMapping(142, 8, 1443, 78, 14, 3),
+ BuildLineMapping(153, 8, 1540, 85, 25, 1),
+ BuildLineMapping(204, 13, 5, 1725, 95, 6, 3)
});
}
@@ -306,7 +306,7 @@ namespace Microsoft.AspNet.Razor.Test.Generator
{
RunTest("ImplicitExpressionAtEOF", designTimeMode: true, expectedDesignTimePragmas: new List()
{
- BuildLineMapping(19, 2, 1, 521, 21, 6, 0)
+ BuildLineMapping(19, 2, 1, 559, 22, 6, 0)
});
}
@@ -315,7 +315,7 @@ namespace Microsoft.AspNet.Razor.Test.Generator
{
RunTest("ExplicitExpressionAtEOF", designTimeMode: true, expectedDesignTimePragmas: new List()
{
- BuildLineMapping(20, 2, 2, 521, 21, 6, 0)
+ BuildLineMapping(20, 2, 2, 559, 22, 6, 0)
});
}
@@ -324,7 +324,7 @@ namespace Microsoft.AspNet.Razor.Test.Generator
{
RunTest("CodeBlockAtEOF", designTimeMode: true, expectedDesignTimePragmas: new List()
{
- BuildLineMapping(2, 0, 490, 21, 2, 0)
+ BuildLineMapping(2, 0, 528, 22, 2, 0)
});
}
@@ -333,7 +333,7 @@ namespace Microsoft.AspNet.Razor.Test.Generator
{
RunTest("EmptyImplicitExpression", designTimeMode: true, expectedDesignTimePragmas: new List()
{
- BuildLineMapping(19, 2, 1, 521, 21, 6, 0)
+ BuildLineMapping(19, 2, 1, 559, 22, 6, 0)
});
}
@@ -342,9 +342,9 @@ namespace Microsoft.AspNet.Razor.Test.Generator
{
RunTest("EmptyImplicitExpressionInCode", tabTest: TabTest.NoTabs, designTimeMode: true, expectedDesignTimePragmas: new List()
{
- BuildLineMapping(2, 0, 535, 21, 2, 6),
- BuildLineMapping(9, 1, 5, 630, 28, 6, 0),
- BuildLineMapping(9, 1, 717, 33, 5, 2)
+ BuildLineMapping(2, 0, 573, 22, 2, 6),
+ BuildLineMapping(9, 1, 5, 668, 29, 6, 0),
+ BuildLineMapping(9, 1, 755, 34, 5, 2)
});
}
@@ -356,9 +356,9 @@ namespace Microsoft.AspNet.Razor.Test.Generator
tabTest: TabTest.Tabs,
designTimeMode: true, expectedDesignTimePragmas: new List()
{
- BuildLineMapping(2, 0, 535, 21, 2, 6),
- BuildLineMapping(9, 1, 5, 630, 28, 6, 0),
- BuildLineMapping(9, 1, 5, 714, 33, 2, 2)
+ BuildLineMapping(2, 0, 573, 22, 2, 6),
+ BuildLineMapping(9, 1, 5, 668, 29, 6, 0),
+ BuildLineMapping(9, 1, 5, 752, 34, 2, 2)
});
}
@@ -367,7 +367,7 @@ namespace Microsoft.AspNet.Razor.Test.Generator
{
RunTest("EmptyExplicitExpression", designTimeMode: true, expectedDesignTimePragmas: new List()
{
- BuildLineMapping(20, 2, 2, 521, 21, 6, 0)
+ BuildLineMapping(20, 2, 2, 559, 22, 6, 0)
});
}
@@ -376,7 +376,7 @@ namespace Microsoft.AspNet.Razor.Test.Generator
{
RunTest("EmptyCodeBlock", designTimeMode: true, expectedDesignTimePragmas: new List()
{
- BuildLineMapping(20, 2, 490, 21, 2, 0)
+ BuildLineMapping(20, 2, 528, 22, 2, 0)
});
}
@@ -441,10 +441,10 @@ namespace Microsoft.AspNet.Razor.Test.Generator
},
expectedDesignTimePragmas: new List()
{
- BuildLineMapping(17, 2, 1, 470, 21, 0, 14),
- BuildLineMapping(38, 3, 7, 544 + tabOffsetForMapping, 27, tabOffsetForMapping, 2),
+ BuildLineMapping(17, 2, 1, 508, 22, 0, 14),
+ BuildLineMapping(38, 3, 7, 582 + tabOffsetForMapping, 28, tabOffsetForMapping, 2),
// Multiply the tab offset absolute index by 2 to account for the first mapping
- BuildLineMapping(47, 4, 7, 606 + tabOffsetForMapping * 2, 33, tabOffsetForMapping, 0)
+ BuildLineMapping(47, 4, 7, 644 + tabOffsetForMapping * 2, 34, tabOffsetForMapping, 0)
});
}
diff --git a/test/Microsoft.AspNet.Razor.Test/Generator/CodeTree/CSharpCodeBuilderTests.cs b/test/Microsoft.AspNet.Razor.Test/Generator/CodeTree/CSharpCodeBuilderTests.cs
index cf64962023..19b6c4d619 100644
--- a/test/Microsoft.AspNet.Razor.Test/Generator/CodeTree/CSharpCodeBuilderTests.cs
+++ b/test/Microsoft.AspNet.Razor.Test/Generator/CodeTree/CSharpCodeBuilderTests.cs
@@ -49,9 +49,11 @@ using FakeNamespace2.SubNamespace
{
}
+ #pragma warning disable 1998
public override async Task ExecuteAsync()
{
}
+ #pragma warning restore 1998
}
}", result.Code.TrimEnd());
}
diff --git a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/Await.DesignTime.cs b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/Await.DesignTime.cs
index b39b79285f..e8404ce772 100644
--- a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/Await.DesignTime.cs
+++ b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/Await.DesignTime.cs
@@ -25,6 +25,7 @@ namespace TestOutput
{
}
+ #pragma warning disable 1998
public override async Task ExecuteAsync()
{
#line 10 "Await.cshtml"
@@ -104,5 +105,6 @@ namespace TestOutput
#line default
#line hidden
}
+ #pragma warning restore 1998
}
}
diff --git a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/Await.cs b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/Await.cs
index f1b07a694a..163e06b399 100644
--- a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/Await.cs
+++ b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/Await.cs
@@ -19,6 +19,7 @@ namespace TestOutput
{
}
+ #pragma warning disable 1998
public override async Task ExecuteAsync()
{
WriteLiteral("\r\n\r\n Basic Asynchronous Expression Test
\r\n Basic Asynch" +
@@ -125,5 +126,6 @@ namespace TestOutput
WriteLiteral("
\r\n");
}
+ #pragma warning restore 1998
}
}
diff --git a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/Blocks.cs b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/Blocks.cs
index cf3bbb562f..efecf50c05 100644
--- a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/Blocks.cs
+++ b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/Blocks.cs
@@ -10,6 +10,7 @@ namespace TestOutput
{
}
+ #pragma warning disable 1998
public override async Task ExecuteAsync()
{
#line 1 "Blocks.cshtml"
@@ -158,5 +159,6 @@ namespace TestOutput
#line hidden
}
+ #pragma warning restore 1998
}
}
diff --git a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/CodeBlock.cs b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/CodeBlock.cs
index 25eac402da..726396852a 100644
--- a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/CodeBlock.cs
+++ b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/CodeBlock.cs
@@ -10,6 +10,7 @@ namespace TestOutput
{
}
+ #pragma warning disable 1998
public override async Task ExecuteAsync()
{
#line 1 "CodeBlock.cshtml"
@@ -22,5 +23,6 @@ namespace TestOutput
#line hidden
}
+ #pragma warning restore 1998
}
}
diff --git a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/CodeBlockAtEOF.cs b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/CodeBlockAtEOF.cs
index 8cbe26828d..dfc6e23bdf 100644
--- a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/CodeBlockAtEOF.cs
+++ b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/CodeBlockAtEOF.cs
@@ -16,6 +16,7 @@ namespace TestOutput
{
}
+ #pragma warning disable 1998
public override async Task ExecuteAsync()
{
#line 1 "CodeBlockAtEOF.cshtml"
@@ -25,5 +26,6 @@ namespace TestOutput
#line hidden
}
+ #pragma warning restore 1998
}
}
diff --git a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/CodeTree.cs b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/CodeTree.cs
index 6aac8e07b2..250119c119 100644
--- a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/CodeTree.cs
+++ b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/CodeTree.cs
@@ -16,8 +16,10 @@ namespace TestOutput
{
}
+ #pragma warning disable 1998
public override async Task ExecuteAsync()
{
}
+ #pragma warning restore 1998
}
}
diff --git a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/ConditionalAttributes.cs b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/ConditionalAttributes.cs
index 1afebc8dcc..c3f687ceb8 100644
--- a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/ConditionalAttributes.cs
+++ b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/ConditionalAttributes.cs
@@ -10,6 +10,7 @@ namespace TestOutput
{
}
+ #pragma warning disable 1998
public override async Task ExecuteAsync()
{
#line 1 "ConditionalAttributes.cshtml"
@@ -118,5 +119,6 @@ namespace TestOutput
#line hidden
}
+ #pragma warning restore 1998
}
}
diff --git a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/DesignTime.cs b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/DesignTime.cs
index c3b3d1bcaa..fade2392b3 100644
--- a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/DesignTime.cs
+++ b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/DesignTime.cs
@@ -46,6 +46,7 @@ Foo() {
{
}
+ #pragma warning disable 1998
public override async Task ExecuteAsync()
{
#line 2 "DesignTime.cshtml"
@@ -99,5 +100,6 @@ __o = bar;
}
));
}
+ #pragma warning restore 1998
}
}
diff --git a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/EmptyCodeBlock.cs b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/EmptyCodeBlock.cs
index 6f15e3ba6d..eb0800cdd6 100644
--- a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/EmptyCodeBlock.cs
+++ b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/EmptyCodeBlock.cs
@@ -16,6 +16,7 @@ namespace TestOutput
{
}
+ #pragma warning disable 1998
public override async Task ExecuteAsync()
{
#line 3 "EmptyCodeBlock.cshtml"
@@ -25,5 +26,6 @@ namespace TestOutput
#line hidden
}
+ #pragma warning restore 1998
}
}
diff --git a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/EmptyExplicitExpression.cs b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/EmptyExplicitExpression.cs
index c151d2d028..fbbc8eb332 100644
--- a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/EmptyExplicitExpression.cs
+++ b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/EmptyExplicitExpression.cs
@@ -16,6 +16,7 @@ namespace TestOutput
{
}
+ #pragma warning disable 1998
public override async Task ExecuteAsync()
{
#line 3 "EmptyExplicitExpression.cshtml"
@@ -24,5 +25,6 @@ __o = ;
#line default
#line hidden
}
+ #pragma warning restore 1998
}
}
diff --git a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/EmptyImplicitExpression.cs b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/EmptyImplicitExpression.cs
index efbefe04c0..494a30144d 100644
--- a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/EmptyImplicitExpression.cs
+++ b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/EmptyImplicitExpression.cs
@@ -16,6 +16,7 @@ namespace TestOutput
{
}
+ #pragma warning disable 1998
public override async Task ExecuteAsync()
{
#line 3 "EmptyImplicitExpression.cshtml"
@@ -24,5 +25,6 @@ __o = ;
#line default
#line hidden
}
+ #pragma warning restore 1998
}
}
diff --git a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/EmptyImplicitExpressionInCode.Tabs.cs b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/EmptyImplicitExpressionInCode.Tabs.cs
index c1ea1c6331..7d0abf3422 100644
--- a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/EmptyImplicitExpressionInCode.Tabs.cs
+++ b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/EmptyImplicitExpressionInCode.Tabs.cs
@@ -16,6 +16,7 @@ namespace TestOutput
{
}
+ #pragma warning disable 1998
public override async Task ExecuteAsync()
{
#line 1 "EmptyImplicitExpressionInCode.cshtml"
@@ -37,5 +38,6 @@ __o = ;
#line hidden
}
+ #pragma warning restore 1998
}
}
diff --git a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/EmptyImplicitExpressionInCode.cs b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/EmptyImplicitExpressionInCode.cs
index 1d91350b55..b155a95fb7 100644
--- a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/EmptyImplicitExpressionInCode.cs
+++ b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/EmptyImplicitExpressionInCode.cs
@@ -16,6 +16,7 @@ namespace TestOutput
{
}
+ #pragma warning disable 1998
public override async Task ExecuteAsync()
{
#line 1 "EmptyImplicitExpressionInCode.cshtml"
@@ -37,5 +38,6 @@ __o = ;
#line hidden
}
+ #pragma warning restore 1998
}
}
diff --git a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/ExplicitExpression.cs b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/ExplicitExpression.cs
index c75e713e68..e9e2aef118 100644
--- a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/ExplicitExpression.cs
+++ b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/ExplicitExpression.cs
@@ -10,6 +10,7 @@ namespace TestOutput
{
}
+ #pragma warning disable 1998
public override async Task ExecuteAsync()
{
WriteLiteral("1 + 1 = ");
@@ -22,5 +23,6 @@ namespace TestOutput
);
}
+ #pragma warning restore 1998
}
}
diff --git a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/ExplicitExpressionAtEOF.cs b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/ExplicitExpressionAtEOF.cs
index c5fb536a00..5d622dc91c 100644
--- a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/ExplicitExpressionAtEOF.cs
+++ b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/ExplicitExpressionAtEOF.cs
@@ -16,6 +16,7 @@ namespace TestOutput
{
}
+ #pragma warning disable 1998
public override async Task ExecuteAsync()
{
#line 3 "ExplicitExpressionAtEOF.cshtml"
@@ -24,5 +25,6 @@ __o = ;
#line default
#line hidden
}
+ #pragma warning restore 1998
}
}
diff --git a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/ExpressionsInCode.cs b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/ExpressionsInCode.cs
index 9af1271183..ff44ada871 100644
--- a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/ExpressionsInCode.cs
+++ b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/ExpressionsInCode.cs
@@ -10,6 +10,7 @@ namespace TestOutput
{
}
+ #pragma warning disable 1998
public override async Task ExecuteAsync()
{
#line 1 "ExpressionsInCode.cshtml"
@@ -75,5 +76,6 @@ namespace TestOutput
WriteLiteral("
");
}
+ #pragma warning restore 1998
}
}
diff --git a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/FunctionsBlock.DesignTime.Tabs.cs b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/FunctionsBlock.DesignTime.Tabs.cs
index 0fd8dbe939..dbdeaa69d8 100644
--- a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/FunctionsBlock.DesignTime.Tabs.cs
+++ b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/FunctionsBlock.DesignTime.Tabs.cs
@@ -31,6 +31,7 @@ namespace TestOutput
{
}
+ #pragma warning disable 1998
public override async Task ExecuteAsync()
{
#line 12 "FunctionsBlock.cshtml"
@@ -39,5 +40,6 @@ namespace TestOutput
#line default
#line hidden
}
+ #pragma warning restore 1998
}
}
diff --git a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/FunctionsBlock.DesignTime.cs b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/FunctionsBlock.DesignTime.cs
index b46cafd19c..1418718f62 100644
--- a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/FunctionsBlock.DesignTime.cs
+++ b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/FunctionsBlock.DesignTime.cs
@@ -31,6 +31,7 @@ namespace TestOutput
{
}
+ #pragma warning disable 1998
public override async Task ExecuteAsync()
{
#line 12 "FunctionsBlock.cshtml"
@@ -39,5 +40,6 @@ namespace TestOutput
#line default
#line hidden
}
+ #pragma warning restore 1998
}
}
diff --git a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/FunctionsBlock.cs b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/FunctionsBlock.cs
index 857998399e..5928cc500f 100644
--- a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/FunctionsBlock.cs
+++ b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/FunctionsBlock.cs
@@ -25,6 +25,7 @@ namespace TestOutput
{
}
+ #pragma warning disable 1998
public override async Task ExecuteAsync()
{
WriteLiteral("\r\n");
@@ -38,5 +39,6 @@ namespace TestOutput
);
}
+ #pragma warning restore 1998
}
}
diff --git a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/FunctionsBlockMinimal.DesignTime.Tabs.cs b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/FunctionsBlockMinimal.DesignTime.Tabs.cs
index 8b0a68fc9f..b35b565bed 100644
--- a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/FunctionsBlockMinimal.DesignTime.Tabs.cs
+++ b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/FunctionsBlockMinimal.DesignTime.Tabs.cs
@@ -24,8 +24,10 @@ string foo(string input) {
{
}
+ #pragma warning disable 1998
public override async Task ExecuteAsync()
{
}
+ #pragma warning restore 1998
}
}
diff --git a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/FunctionsBlock_Tabs.cs b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/FunctionsBlock_Tabs.cs
index 556351b4ef..bf2227c778 100644
--- a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/FunctionsBlock_Tabs.cs
+++ b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/FunctionsBlock_Tabs.cs
@@ -25,6 +25,7 @@ namespace TestOutput
{
}
+ #pragma warning disable 1998
public override async Task ExecuteAsync()
{
WriteLiteral("\r\n");
@@ -38,5 +39,6 @@ namespace TestOutput
);
}
+ #pragma warning restore 1998
}
}
diff --git a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/Helpers.Instance.cs b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/Helpers.Instance.cs
index db7ce3aef6..dee64a8a3e 100644
--- a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/Helpers.Instance.cs
+++ b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/Helpers.Instance.cs
@@ -84,6 +84,7 @@ Italic(string s) {
{
}
+ #pragma warning disable 1998
public override async Task ExecuteAsync()
{
WriteLiteral("\r\n");
@@ -97,5 +98,6 @@ Italic(string s) {
);
}
+ #pragma warning restore 1998
}
}
diff --git a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/Helpers.cs b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/Helpers.cs
index d7635424c6..616647d9fc 100644
--- a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/Helpers.cs
+++ b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/Helpers.cs
@@ -84,6 +84,7 @@ Italic(string s) {
{
}
+ #pragma warning disable 1998
public override async Task ExecuteAsync()
{
WriteLiteral("\r\n");
@@ -97,5 +98,6 @@ Italic(string s) {
);
}
+ #pragma warning restore 1998
}
}
diff --git a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/HelpersMissingCloseParen.cs b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/HelpersMissingCloseParen.cs
index a7a8bcd7fd..82549c21e8 100644
--- a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/HelpersMissingCloseParen.cs
+++ b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/HelpersMissingCloseParen.cs
@@ -55,9 +55,11 @@ Italic(string s
{
}
+ #pragma warning disable 1998
public override async Task ExecuteAsync()
{
WriteLiteral("\r\n");
}
+ #pragma warning restore 1998
}
}
diff --git a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/HelpersMissingOpenBrace.cs b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/HelpersMissingOpenBrace.cs
index 965e5eadac..00cc25553d 100644
--- a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/HelpersMissingOpenBrace.cs
+++ b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/HelpersMissingOpenBrace.cs
@@ -54,6 +54,7 @@ Italic(string s)
{
}
+ #pragma warning disable 1998
public override async Task ExecuteAsync()
{
WriteLiteral("\r\n");
@@ -66,5 +67,6 @@ Italic(string s)
);
}
+ #pragma warning restore 1998
}
}
diff --git a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/HelpersMissingOpenParen.cs b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/HelpersMissingOpenParen.cs
index faadb539e4..e61cd1a1a7 100644
--- a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/HelpersMissingOpenParen.cs
+++ b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/HelpersMissingOpenParen.cs
@@ -54,6 +54,7 @@ Italic
{
}
+ #pragma warning disable 1998
public override async Task ExecuteAsync()
{
WriteLiteral("\r\n");
@@ -66,5 +67,6 @@ Italic
);
}
+ #pragma warning restore 1998
}
}
diff --git a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/HiddenSpansInCode.cs b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/HiddenSpansInCode.cs
index 5cf6b4210a..801afd6a3d 100644
--- a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/HiddenSpansInCode.cs
+++ b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/HiddenSpansInCode.cs
@@ -16,6 +16,7 @@ namespace TestOutput
{
}
+ #pragma warning disable 1998
public override async Task ExecuteAsync()
{
#line 1 "HiddenSpansInCode.cshtml"
@@ -32,5 +33,6 @@ namespace TestOutput
#line hidden
}
+ #pragma warning restore 1998
}
}
diff --git a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/HtmlCommentWithQuote_Double.cs b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/HtmlCommentWithQuote_Double.cs
index a25f8f19e7..e3675fb0bf 100644
--- a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/HtmlCommentWithQuote_Double.cs
+++ b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/HtmlCommentWithQuote_Double.cs
@@ -10,11 +10,13 @@ namespace TestOutput
{
}
+ #pragma warning disable 1998
public override async Task ExecuteAsync()
{
WriteLiteral("\r\n
(Href("~/images/submit.png"), 22), false));
WriteLiteral(" />");
}
+ #pragma warning restore 1998
}
}
diff --git a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/HtmlCommentWithQuote_Single.cs b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/HtmlCommentWithQuote_Single.cs
index a85408c760..a7614d64cb 100644
--- a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/HtmlCommentWithQuote_Single.cs
+++ b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/HtmlCommentWithQuote_Single.cs
@@ -10,11 +10,13 @@ namespace TestOutput
{
}
+ #pragma warning disable 1998
public override async Task ExecuteAsync()
{
WriteLiteral("\r\n
(Href("~/images/submit.png"), 22), false));
WriteLiteral(" />");
}
+ #pragma warning restore 1998
}
}
diff --git a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/ImplicitExpression.cs b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/ImplicitExpression.cs
index 9348080e31..aabe11373a 100644
--- a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/ImplicitExpression.cs
+++ b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/ImplicitExpression.cs
@@ -10,6 +10,7 @@ namespace TestOutput
{
}
+ #pragma warning disable 1998
public override async Task ExecuteAsync()
{
#line 1 "ImplicitExpression.cshtml"
@@ -35,5 +36,6 @@ namespace TestOutput
#line hidden
}
+ #pragma warning restore 1998
}
}
diff --git a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/ImplicitExpressionAtEOF.cs b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/ImplicitExpressionAtEOF.cs
index 35b4237e2f..6d16d13c43 100644
--- a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/ImplicitExpressionAtEOF.cs
+++ b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/ImplicitExpressionAtEOF.cs
@@ -16,6 +16,7 @@ namespace TestOutput
{
}
+ #pragma warning disable 1998
public override async Task ExecuteAsync()
{
#line 3 "ImplicitExpressionAtEOF.cshtml"
@@ -24,5 +25,6 @@ __o = ;
#line default
#line hidden
}
+ #pragma warning restore 1998
}
}
diff --git a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/Imports.DesignTime.cs b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/Imports.DesignTime.cs
index 52373f6211..1f7d95f9a1 100644
--- a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/Imports.DesignTime.cs
+++ b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/Imports.DesignTime.cs
@@ -33,6 +33,7 @@ using System
{
}
+ #pragma warning disable 1998
public override async Task ExecuteAsync()
{
#line 5 "Imports.cshtml"
@@ -46,5 +47,6 @@ using System
#line default
#line hidden
}
+ #pragma warning restore 1998
}
}
diff --git a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/Imports.cs b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/Imports.cs
index 3a2fbcca77..f993a078d3 100644
--- a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/Imports.cs
+++ b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/Imports.cs
@@ -27,6 +27,7 @@ using System
{
}
+ #pragma warning disable 1998
public override async Task ExecuteAsync()
{
WriteLiteral("\r\nPath\'s full type name is ");
@@ -49,5 +50,6 @@ using System
WriteLiteral("
");
}
+ #pragma warning restore 1998
}
}
diff --git a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/Inherits.Designtime.cs b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/Inherits.Designtime.cs
index 566ade7745..55781e57a9 100644
--- a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/Inherits.Designtime.cs
+++ b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/Inherits.Designtime.cs
@@ -21,6 +21,7 @@ namespace TestOutput
{
}
+ #pragma warning disable 1998
public override async Task ExecuteAsync()
{
#line 1 "Inherits.cshtml"
@@ -29,5 +30,6 @@ __o = foo();
#line default
#line hidden
}
+ #pragma warning restore 1998
}
}
diff --git a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/Inherits.Runtime.cs b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/Inherits.Runtime.cs
index aba6f17210..d53c7d08dd 100644
--- a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/Inherits.Runtime.cs
+++ b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/Inherits.Runtime.cs
@@ -10,6 +10,7 @@ namespace TestOutput
{
}
+ #pragma warning disable 1998
public override async Task ExecuteAsync()
{
Write(
@@ -22,5 +23,6 @@ namespace TestOutput
WriteLiteral("\r\n\r\n");
}
+ #pragma warning restore 1998
}
}
diff --git a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/InlineBlocks.cs b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/InlineBlocks.cs
index 3ec093fa5c..84937b3058 100644
--- a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/InlineBlocks.cs
+++ b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/InlineBlocks.cs
@@ -69,8 +69,10 @@ Link(string link) {
{
}
+ #pragma warning disable 1998
public override async Task ExecuteAsync()
{
}
+ #pragma warning restore 1998
}
}
diff --git a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/LayoutDirective.cs b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/LayoutDirective.cs
index 935e4d8bad..ead0dc5a90 100644
--- a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/LayoutDirective.cs
+++ b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/LayoutDirective.cs
@@ -10,9 +10,11 @@ namespace TestOutput
{
}
+ #pragma warning disable 1998
public override async Task ExecuteAsync()
{
Layout = "~/Foo/Bar/Baz";
}
+ #pragma warning restore 1998
}
}
diff --git a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/MarkupInCodeBlock.cs b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/MarkupInCodeBlock.cs
index 28ffb62b01..ec740bec18 100644
--- a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/MarkupInCodeBlock.cs
+++ b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/MarkupInCodeBlock.cs
@@ -10,6 +10,7 @@ namespace TestOutput
{
}
+ #pragma warning disable 1998
public override async Task ExecuteAsync()
{
#line 1 "MarkupInCodeBlock.cshtml"
@@ -37,5 +38,6 @@ namespace TestOutput
WriteLiteral("\r\n");
}
+ #pragma warning restore 1998
}
}
diff --git a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/NestedCodeBlocks.cs b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/NestedCodeBlocks.cs
index d80a7363f3..b20986dade 100644
--- a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/NestedCodeBlocks.cs
+++ b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/NestedCodeBlocks.cs
@@ -10,6 +10,7 @@ namespace TestOutput
{
}
+ #pragma warning disable 1998
public override async Task ExecuteAsync()
{
#line 1 "NestedCodeBlocks.cshtml"
@@ -34,5 +35,6 @@ namespace TestOutput
#line hidden
}
+ #pragma warning restore 1998
}
}
diff --git a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/NestedHelpers.cs b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/NestedHelpers.cs
index 70df4fe296..6151e3750e 100644
--- a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/NestedHelpers.cs
+++ b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/NestedHelpers.cs
@@ -92,6 +92,7 @@ Bold(string s) {
{
}
+ #pragma warning disable 1998
public override async Task ExecuteAsync()
{
WriteLiteral("\r\n");
@@ -104,5 +105,6 @@ Bold(string s) {
);
}
+ #pragma warning restore 1998
}
}
diff --git a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/NoLinePragmas.cs b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/NoLinePragmas.cs
index 236c71d30a..adf7c772be 100644
--- a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/NoLinePragmas.cs
+++ b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/NoLinePragmas.cs
@@ -10,6 +10,7 @@ namespace TestOutput
{
}
+ #pragma warning disable 1998
public override async Task ExecuteAsync()
{
#line 1 ""
@@ -165,5 +166,6 @@ namespace TestOutput
#line hidden
}
+ #pragma warning restore 1998
}
}
diff --git a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/OpenedIf.DesignTime.Tabs.cs b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/OpenedIf.DesignTime.Tabs.cs
index 7c67490c3e..805f6011d1 100644
--- a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/OpenedIf.DesignTime.Tabs.cs
+++ b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/OpenedIf.DesignTime.Tabs.cs
@@ -16,6 +16,7 @@ namespace TestOutput
{
}
+ #pragma warning disable 1998
public override async Task ExecuteAsync()
{
#line 3 "OpenedIf.cshtml"
@@ -37,5 +38,6 @@ if (true) {
#line hidden
}
+ #pragma warning restore 1998
}
}
diff --git a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/OpenedIf.DesignTime.cs b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/OpenedIf.DesignTime.cs
index 2fb8a18926..fdd7959c3a 100644
--- a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/OpenedIf.DesignTime.cs
+++ b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/OpenedIf.DesignTime.cs
@@ -16,6 +16,7 @@ namespace TestOutput
{
}
+ #pragma warning disable 1998
public override async Task ExecuteAsync()
{
#line 3 "OpenedIf.cshtml"
@@ -37,5 +38,6 @@ if (true) {
#line hidden
}
+ #pragma warning restore 1998
}
}
diff --git a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/ParserError.cs b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/ParserError.cs
index a4cf7e5d4f..371110c1fa 100644
--- a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/ParserError.cs
+++ b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/ParserError.cs
@@ -16,6 +16,7 @@ namespace TestOutput
{
}
+ #pragma warning disable 1998
public override async Task ExecuteAsync()
{
#line 1 "ParserError.cshtml"
@@ -29,5 +30,6 @@ int j =20;
#line hidden
}
+ #pragma warning restore 1998
}
}
diff --git a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/RazorComments.DesignTime.cs b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/RazorComments.DesignTime.cs
index 5aede73eec..adc1f0d1ea 100644
--- a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/RazorComments.DesignTime.cs
+++ b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/RazorComments.DesignTime.cs
@@ -16,6 +16,7 @@ namespace TestOutput
{
}
+ #pragma warning disable 1998
public override async Task ExecuteAsync()
{
#line 4 "RazorComments.cshtml"
@@ -64,5 +65,6 @@ __o = a
#line default
#line hidden
}
+ #pragma warning restore 1998
}
}
diff --git a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/RazorComments.cs b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/RazorComments.cs
index ba28856507..1f4e7aac0d 100644
--- a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/RazorComments.cs
+++ b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/RazorComments.cs
@@ -10,6 +10,7 @@ namespace TestOutput
{
}
+ #pragma warning disable 1998
public override async Task ExecuteAsync()
{
WriteLiteral("\r\nThis should be shown
\r\n\r\n");
@@ -68,5 +69,6 @@ namespace TestOutput
WriteLiteral("\r\n");
}
+ #pragma warning restore 1998
}
}
diff --git a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/ResolveUrl.cs b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/ResolveUrl.cs
index a4eba779af..1ae7a538bd 100644
--- a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/ResolveUrl.cs
+++ b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/ResolveUrl.cs
@@ -10,6 +10,7 @@ namespace TestOutput
{
}
+ #pragma warning disable 1998
public override async Task ExecuteAsync()
{
WriteLiteral(" ");
}
+ #pragma warning restore 1998
}
}
diff --git a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/UnfinishedExpressionInCode.Tabs.cs b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/UnfinishedExpressionInCode.Tabs.cs
index 2583a8a657..5c894203d7 100644
--- a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/UnfinishedExpressionInCode.Tabs.cs
+++ b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/UnfinishedExpressionInCode.Tabs.cs
@@ -16,6 +16,7 @@ namespace TestOutput
{
}
+ #pragma warning disable 1998
public override async Task ExecuteAsync()
{
#line 1 "UnfinishedExpressionInCode.cshtml"
@@ -36,5 +37,6 @@ __o = DateTime.;
#line hidden
}
+ #pragma warning restore 1998
}
}
diff --git a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/UnfinishedExpressionInCode.cs b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/UnfinishedExpressionInCode.cs
index 05133ccd22..813dd7d91e 100644
--- a/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/UnfinishedExpressionInCode.cs
+++ b/test/Microsoft.AspNet.Razor.Test/TestFiles/CodeGenerator/CS/Output/UnfinishedExpressionInCode.cs
@@ -16,6 +16,7 @@ namespace TestOutput
{
}
+ #pragma warning disable 1998
public override async Task ExecuteAsync()
{
#line 1 "UnfinishedExpressionInCode.cshtml"
@@ -36,5 +37,6 @@ __o = DateTime.;
#line hidden
}
+ #pragma warning restore 1998
}
}
diff --git a/test/Microsoft.AspNet.Razor.Test/TestFiles/DesignTime/Simple.txt b/test/Microsoft.AspNet.Razor.Test/TestFiles/DesignTime/Simple.txt
index 2c9c54124d..74c8e7e7bd 100644
--- a/test/Microsoft.AspNet.Razor.Test/TestFiles/DesignTime/Simple.txt
+++ b/test/Microsoft.AspNet.Razor.Test/TestFiles/DesignTime/Simple.txt
@@ -15,6 +15,7 @@
{
}
+ #pragma warning disable 1998
public override async Task ExecuteAsync()
{
#line 1 "C:\This\Path\Is\Just\For\Line\Pragmas.cshtml"
@@ -47,5 +48,6 @@
#line hidden
}
+ #pragma warning restore 1998
}
}