C#: Add some value tuple examples for cs/call-to-object-tostring and update test expected output.

This commit is contained in:
Michael Nebel
2025-02-24 13:42:30 +01:00
parent 08913c551d
commit 5eb305da93
2 changed files with 15 additions and 1 deletions

View File

@@ -35,6 +35,16 @@ public class DefaultToString
IPublic g = null;
Console.WriteLine(g); // GOOD
Console.WriteLine(new ValueTuple<int, int>(1, 2)); // GOOD [FALSE POSITIVE]
Console.WriteLine((1, 2)); // GOOD [FALSE POSITIVE]
var t1 = new ValueTuple<int, DefaultToString>(1, new DefaultToString());
Console.WriteLine(t1); // BAD
var t2 = new ValueTuple<A, D>(new A(), new D());
Console.WriteLine(t2); // GOOD [FALSE POSITIVE]
}
class A