Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,8 @@ dotnet_diagnostic.CA1304.severity = none
dotnet_diagnostic.CA1305.severity = none
dotnet_diagnostic.CA1311.severity = none

# CA1861: Avoid constant arrays as arguments
# CA1866: Use char overload
# Test inputs are built per test case; the performance of test code is irrelevant.
dotnet_diagnostic.CA1861.severity = none
dotnet_diagnostic.CA1866.severity = none

[benchmarks/**.cs]
Expand Down
8 changes: 4 additions & 4 deletions tests/Ramstack.Parsing.Tests/ParsersTests.Separated.cs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ public void Separated_TrailingEmptyPair_StopsAfterEmptyItem([Values] bool allowT
var success = parser.TryParse(ref context, out var value);

Assert.That(success, Is.True);
Assert.That(value, Is.EqualTo(new[] { 12, 7 }));
Assert.That(value, Is.EqualTo([12, 7]));
Assert.That(item.Attempts, Is.EqualTo(2));

Assert.That(context.Position, Is.EqualTo(3));
Expand Down Expand Up @@ -206,7 +206,7 @@ public void Separated_OnlyItemConsumesInput_ContinuesParsing([Values] bool allow
var result = parser.Parse("abc!");

Assert.That(result.Success, Is.True);
Assert.That(result.Value, Is.EqualTo(new[] { 'a', 'b', 'c' }));
Assert.That(result.Value, Is.EqualTo(['a', 'b', 'c']));
Assert.That(result.Length, Is.EqualTo(3));
}

Expand All @@ -233,7 +233,7 @@ public void Separated_OnlySeparatorConsumesInput_ContinuesParsing([Values] bool
var result = parser.Parse(",,!");

Assert.That(result.Success, Is.True);
Assert.That(result.Value, Is.EqualTo(new[] { 'x', 'x', 'x' }));
Assert.That(result.Value, Is.EqualTo(['x', 'x', 'x']));
Assert.That(result.Length, Is.EqualTo(2));
}

Expand All @@ -260,7 +260,7 @@ public void Separated_MaximumReached_ConsumesTrailingSeparatorOnlyWhenAllowed(bo
var success = parser.TryParse(ref context, out var value);

Assert.That(success, Is.True);
Assert.That(value, Is.EqualTo(new[] { 'a' }));
Assert.That(value, Is.EqualTo(['a']));
Assert.That(context.Position, Is.EqualTo(expectedLength));
Assert.That(context.MatchedSegment.Index, Is.Zero);
Assert.That(context.MatchedSegment.Length, Is.EqualTo(expectedLength));
Expand Down
Loading