public void LazinatorReadOnlySpanInStruct() { // we have special code to deal with ReadOnlySpans within structs. So, here is a test to make sure that it works. WReadOnlySpanChar wReadOnlySpanChar = new WReadOnlySpanChar(); wReadOnlySpanChar.Value = new Span <char>("mystring".ToArray()); var result = CloneWithOptionalVerification(wReadOnlySpanChar, false, false); new string(result.Value).Should().Be("mystring"); }
public void CloneWithoutBuffer_WReadOnlySpanChar() { WReadOnlySpanChar GetWReadOnlySpanChar() { WReadOnlySpanChar wReadOnlySpanChar = new WReadOnlySpanChar(); wReadOnlySpanChar.Value = new Span <char>("mystring".ToArray()); return(wReadOnlySpanChar); } VerifyCloningEquivalence(() => GetWReadOnlySpanChar()); }