-
-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Finally a good solution to verbatim string literals
closes #183
- Loading branch information
Showing
5 changed files
with
48 additions
and
20 deletions.
There are no files selected for viewing
4 changes: 1 addition & 3 deletions
4
Src/CSharpier.Tests/TestFiles/AttributeList/AttributeLists.cst
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
31 changes: 31 additions & 0 deletions
31
Src/CSharpier.Tests/TestFiles/StringLiteral/VerbatimStrings.cst
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,31 @@ | ||
[assembly: System.Copyright(@"(C)"" | ||
2009")] | ||
class ClassName | ||
{ | ||
private string stayOnLine1 = @"one | ||
jhaksdlfklasdfjlkasdjflaksdfklasldkjfljkasdljfkasljkdfakljsdfjlkaskfjlaskjldfksdjlf | ||
"; | ||
|
||
private string stayOnLine2 = @"one | ||
two | ||
three | ||
four"; | ||
|
||
private void MethodName() | ||
{ | ||
CallSomeLongMethod(@"one | ||
two | ||
three | ||
four | ||
jhaksdlfklasdfjlkasdjflaksdfklasldkjfljkasdljfkasljkdfakljsdfjlkaskfjlaskjldfksdjlf | ||
"); | ||
|
||
CallSomeLongMethod( | ||
@"one | ||
two | ||
three | ||
four", | ||
"two" | ||
); | ||
} | ||
} |
14 changes: 14 additions & 0 deletions
14
Src/CSharpier.Tests/TestFiles/StringLiteral/_StringLiteralTests.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,14 @@ | ||
using CSharpier.Tests.TestFileTests; | ||
using NUnit.Framework; | ||
|
||
namespace CSharpier.Tests.TestFiles | ||
{ | ||
public class StringLiteralTests : BaseTest | ||
{ | ||
[Test] | ||
public void VerbatimStrings() | ||
{ | ||
this.RunTest("StringLiteral", "VerbatimStrings"); | ||
} | ||
} | ||
} |
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