Beispiel #1
0
 public void Test(char[] expected, Generic.IEnumerable <char> actual)
 {
     Assert.Equal(expected, actual.ToArray());
 }
Beispiel #2
0
 public Block(Generic.IEnumerable <Statement> statements) : this(statements.ToArray())
 {
 }
Beispiel #3
0
 public void ArrayEqual(Generic.IEnumerable <string> left, Generic.IEnumerable <string> right)
 {
     Assert.Equal(left.ToArray(), right.ToArray());
 }
Beispiel #4
0
 public void Prepend(Generic.IEnumerable <char> expect, Generic.IEnumerator <char> prefix, Generic.IEnumerator <char> postfix)
 {
     Assert.Equal(expect.ToArray(), postfix.Prepend(prefix).ToArray());
 }
Beispiel #5
0
 /// <summary>
 /// Extracts an array from <paramref>me</paramref>. Changing the resulting array may break <paramref>me</paramref>.
 /// </summary>
 /// <param name="me">Block to extract array from.</param>
 /// <returns>The content of <paramref>me</paramref> as an array. It may or may not be a copy.</returns>
 public static T[] AsArray <T>(this Generic.IEnumerable <T> me)
 {
     return((me as IAsArray <T>)?.AsArray() ?? me.ToArray());
 }