mirror of
https://github.com/bitwarden/server.git
synced 2025-06-30 23:52:50 -05:00
[PM-5052] Upgrade to .NET 8 (#3461)
* Upgrade to .NET 8 * Linting * Clean up old JSON deserialization code * More .NET 8-oriented linting * Light feedback * Get rid of old test we don't know the root issue for * Fix a new test * Remove now-unnecessary Renovate constraint * Use Any() * Somehow a 6.0 tooling config we don't need snuck back in * Space out properties that always change per release * Bump a few core packages since the last update
This commit is contained in:
@ -31,22 +31,4 @@ public class SpanExtensionsTests
|
||||
Assert.True(splitChunk.IsEmpty);
|
||||
Assert.Equal(fullString, rest.ToString());
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("11111", '1', 5)]
|
||||
[InlineData("Text", 'z', 0)]
|
||||
[InlineData("1", '1', 1)]
|
||||
public void Count_ReturnsCount(string text, char countChar, int expectedInstances)
|
||||
{
|
||||
Assert.Equal(expectedInstances, text.AsSpan().Count(countChar));
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData(new[] { 5, 4 }, 5, 1)]
|
||||
[InlineData(new[] { 1 }, 5, 0)]
|
||||
[InlineData(new[] { 5, 5, 5 }, 5, 3)]
|
||||
public void CountIntegers_ReturnsCount(int[] array, int countNumber, int expectedInstances)
|
||||
{
|
||||
Assert.Equal(expectedInstances, ((ReadOnlySpan<int>)array.AsSpan()).Count(countNumber));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user