Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix failing BerConverterTests.Decode_TestData test #99793

Merged
merged 3 commits into from
Mar 18, 2024
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public static IEnumerable<object[]> Decode_TestData()

// Content: sequence containing three octet strings
// Parsed as two sequences of octet strings
yield return new object[] { "vv", new byte[] { 48, 132, 0, 0, 0, 9, 4, 3, 97, 98, 99, 4, 0, 4, 0 }, new object[] { new string[] { "abc", "" }, null } };
yield return new object[] { "vv", new byte[] { 48, 132, 0, 0, 0, 12, 4, 3, 97, 98, 99, 4, 2, 100, 101, 4, 1, 102 }, new object[] { new string[] { "abc", "de", "f" }, null } };

// Content: sequence containing two sequences of octet strings
// Parsed as such
Expand All @@ -179,7 +179,7 @@ public static IEnumerable<object[]> Decode_TestData()

// Content: sequence of octet strings
// Parsed as two sequences of octet strings (returned as bytes)
yield return new object[] { "VV", new byte[] { 48, 132, 0, 0, 0, 9, 4, 3, 97, 98, 99, 4, 0, 4, 0 }, new object[] { new byte[][] { [97, 98, 99], [] }, null } };
yield return new object[] { "VV", new byte[] { 48, 132, 0, 0, 0, 12, 4, 3, 97, 98, 99, 4, 2, 100, 101, 4, 1, 102 },new object[]{ new byte[][] { [97, 98, 99], [100, 101], [102] }, null } };

// Content: sequence containing two booleans
// Parsed as a sequence containing two sequences of octet strings (returned as bytes)
Expand All @@ -191,7 +191,6 @@ public static IEnumerable<object[]> Decode_TestData()
}
}

[ActiveIssue("https://github.com/dotnet/runtime/issues/99725")]
[Theory]
[MemberData(nameof(Decode_TestData))]
public void Decode_Bytes_ReturnsExpected(string format, byte[] values, object[] expected)
Expand Down
Loading