Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into avalondock
- Loading branch information
Showing
11 changed files
with
249 additions
and
8 deletions.
There are no files selected for viewing
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
57 changes: 57 additions & 0 deletions
57
ICSharpCode.Decompiler.Tests/TestCases/Correctness/StringConcat.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,57 @@ | ||
using System; | ||
|
||
namespace ICSharpCode.Decompiler.Tests.TestCases.Correctness | ||
{ | ||
class StringConcat | ||
{ | ||
private class C | ||
{ | ||
readonly int i; | ||
|
||
public C(int i) | ||
{ | ||
Console.WriteLine(" new C(" + i + ")"); | ||
this.i = i; | ||
} | ||
|
||
public override string ToString() | ||
{ | ||
Console.WriteLine(" C(" + i + ").ToString()"); | ||
return i.ToString(); | ||
} | ||
} | ||
|
||
static string Space() | ||
{ | ||
Console.WriteLine(" Space()"); | ||
return " "; | ||
} | ||
|
||
static void Main() | ||
{ | ||
Console.WriteLine("string + C:"); | ||
Console.WriteLine(Space() + new C(1)); | ||
|
||
Console.WriteLine("C + string:"); | ||
Console.WriteLine(new C(2) + Space()); | ||
|
||
Console.WriteLine("C + string + C:"); | ||
Console.WriteLine(new C(3) + Space() + new C(4)); | ||
|
||
Console.WriteLine("string + C + C:"); | ||
Console.WriteLine(Space() + new C(5) + new C(6)); | ||
|
||
Console.WriteLine("string.Concat(C, string, C):"); | ||
Console.WriteLine(string.Concat(new C(10), Space(), new C(11))); | ||
|
||
Console.WriteLine("string.Concat(string.Concat(C, string), C):"); | ||
Console.WriteLine(string.Concat(string.Concat(new C(15), Space()), new C(16))); | ||
|
||
Console.WriteLine("string.Concat(C, string.Concat(string, C)):"); | ||
Console.WriteLine(string.Concat(new C(20), string.Concat(Space(), new C(21)))); | ||
|
||
Console.WriteLine("string.Concat(C, string) + C:"); | ||
Console.WriteLine(string.Concat(new C(30), Space()) + new C(31)); | ||
} | ||
} | ||
} |
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
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
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
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