Skip to content

Commit ab50ee2

Browse files
committed
Fix recognition of no-op change requests for structs
Fix #81
1 parent 3f8c164 commit ab50ee2

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/ImmutableObjectGraph.Generation.Tests/TestSources/ImmutableWithComplexStructField.Tests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public void StructWithoutOperatorsAlwaysRecreatesObjectWithSameValue()
3232
Assert.Equal(s1.Field1, v2.SomeStructField.Field1);
3333
}
3434

35-
[Fact(Skip = "Not yet passing (#81).")]
35+
[Fact]
3636
public void StructWithoutOperatorsAlwaysRecreatesObjectWithoutValue()
3737
{
3838
var s1 = new SomeStructWithMultipleFields(1, 2);
@@ -52,7 +52,7 @@ public void StructWithOperatorsRecreatesObjectWithChangedValue()
5252
Assert.Equal(s13.Field2, v2.SomeStructFieldWithOperator.Field2);
5353
}
5454

55-
[Fact(Skip = "Not yet passing (#81).")]
55+
[Fact]
5656
public void StructWithOperatorsRecyclesObjectWithSameValue()
5757
{
5858
var s12 = new SomeStructWithMultipleFieldsAndOperator(1, 2);

src/ImmutableObjectGraph.Generation/CodeGen.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ private IEnumerable<MethodDeclarationSyntax> CreateWithCoreMethods()
531531
SyntaxFactory.ReturnStatement(
532532
SyntaxFactory.InvocationExpression(
533533
Syntax.ThisDot(WithFactoryMethodName),
534-
this.CreateArgumentList(this.applyToMetaType.AllFields, ArgSource.OptionalArgumentOrProperty, OptionalStyle.Always)
534+
this.CreateArgumentList(this.applyToMetaType.AllFields, ArgSource.Argument, OptionalStyle.None)
535535
.AddArguments(SyntaxFactory.Argument(SyntaxFactory.NameColon(IdentityParameterName), NoneToken, Syntax.OptionalFor(Syntax.ThisDot(IdentityPropertyName))))))));
536536
}
537537

0 commit comments

Comments
 (0)