mirror of
https://github.com/BepInEx/dotnet-runtime.git
synced 2026-11-23 03:39:35 -10:00
- Fix a bunch of tests that didn't actually test anything. They just called the method without any assertions or checks after. - Rename tests to follow guidelines, instead of "PosTest1" and "NegTest2" - Take advantage of xunit - Shorten tests by using quicker and newer code - Use EncodingTestHelpers Commit migrated from https://github.com/dotnet/corefx/commit/241262ac0ec5bea8c7a10e7ff115a142e2636290
20 lines
700 B
C#
20 lines
700 B
C#
// Licensed to the .NET Foundation under one or more agreements.
|
|
// The .NET Foundation licenses this file to you under the MIT license.
|
|
// See the LICENSE file in the project root for more information.
|
|
|
|
using Xunit;
|
|
|
|
namespace System.Text.Tests
|
|
{
|
|
public class UTF7EncodingGetCharCount
|
|
{
|
|
[Theory]
|
|
[InlineData(new byte[] { 85, 84, 70, 56, 32, 69, 110, 99, 111, 100, 105, 110, 103, 32, 69, 120, 97, 109, 112, 108, 101 }, 2, 8, 8)]
|
|
[InlineData(new byte[0], 0, 0, 0)]
|
|
public void GetCharCount(byte[] bytes, int index, int count, int expected)
|
|
{
|
|
EncodingHelpers.GetCharCount(new UTF7Encoding(), bytes, index, count, expected);
|
|
}
|
|
}
|
|
}
|