Skip to content

Commit

Permalink
Update parameter names in record-struct tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jcouv committed Mar 30, 2021
1 parent d7e0cfd commit 17b9b60
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -759,8 +759,8 @@ int I.M(string s)
"System.Int32 S.M(System.String s)",
"System.String S.ToString()",
"System.Boolean S.PrintMembers(System.Text.StringBuilder builder)",
"System.Boolean S.op_Inequality(S r1, S r2)",
"System.Boolean S.op_Equality(S r1, S r2)",
"System.Boolean S.op_Inequality(S left, S right)",
"System.Boolean S.op_Equality(S left, S right)",
"System.Int32 S.GetHashCode()",
"System.Boolean S.Equals(System.Object obj)",
"System.Boolean S.Equals(S other)",
Expand Down Expand Up @@ -1764,8 +1764,8 @@ public void set_X() { }
"System.Int32 C.set_Y(System.Int32 value)",
"System.String C.ToString()",
"System.Boolean C.PrintMembers(System.Text.StringBuilder builder)",
"System.Boolean C.op_Inequality(C r1, C r2)",
"System.Boolean C.op_Equality(C r1, C r2)",
"System.Boolean C.op_Inequality(C left, C right)",
"System.Boolean C.op_Equality(C left, C right)",
"System.Int32 C.GetHashCode()",
"System.Boolean C.Equals(System.Object obj)",
"System.Boolean C.Equals(C other)",
Expand Down Expand Up @@ -4263,7 +4263,7 @@ True True False False

var comp = (CSharpCompilation)verifier.Compilation;
MethodSymbol op = comp.GetMembers("A." + WellKnownMemberNames.EqualityOperatorName).OfType<SynthesizedRecordEqualityOperator>().Single();
Assert.Equal("System.Boolean A.op_Equality(A r1, A r2)", op.ToTestDisplayString());
Assert.Equal("System.Boolean A.op_Equality(A left, A right)", op.ToTestDisplayString());
Assert.Equal(Accessibility.Public, op.DeclaredAccessibility);
Assert.True(op.IsStatic);
Assert.False(op.IsAbstract);
Expand All @@ -4273,7 +4273,7 @@ True True False False
Assert.True(op.IsImplicitlyDeclared);

op = comp.GetMembers("A." + WellKnownMemberNames.InequalityOperatorName).OfType<SynthesizedRecordInequalityOperator>().Single();
Assert.Equal("System.Boolean A.op_Inequality(A r1, A r2)", op.ToTestDisplayString());
Assert.Equal("System.Boolean A.op_Inequality(A left, A right)", op.ToTestDisplayString());
Assert.Equal(Accessibility.Public, op.DeclaredAccessibility);
Assert.True(op.IsStatic);
Assert.False(op.IsAbstract);
Expand Down Expand Up @@ -4459,7 +4459,7 @@ public record struct RecordB();
";
var comp = CreateCompilation(src);
var b = comp.GlobalNamespace.GetTypeMember("RecordB");
AssertEx.SetEqual(new[] { "System.Boolean RecordB.op_Equality(RecordB r1, RecordB r2)" },
AssertEx.SetEqual(new[] { "System.Boolean RecordB.op_Equality(RecordB left, RecordB right)" },
b.GetSimpleNonTypeMembers("op_Equality").ToTestDisplayStrings());
}

Expand Down
4 changes: 2 additions & 2 deletions src/Compilers/CSharp/Test/Semantic/Semantics/RecordTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1684,8 +1684,8 @@ .maxstack 1
"System.Type C.EqualityContract { get; }",
"System.String C.ToString()",
"System.Boolean C." + WellKnownMemberNames.PrintMembersMethodName + "(System.Text.StringBuilder builder)",
"System.Boolean C.op_Inequality(C? r1, C? r2)",
"System.Boolean C.op_Equality(C? r1, C? r2)",
"System.Boolean C.op_Inequality(C? left, C? right)",
"System.Boolean C.op_Equality(C? left, C? right)",
"System.Int32 C.GetHashCode()",
"System.Boolean C.Equals(System.Object? obj)",
"System.Boolean C.Equals(C? other)",
Expand Down

0 comments on commit 17b9b60

Please sign in to comment.