|
|
@ -1,4 +1,5 @@ |
|
|
using System; |
|
|
using System; |
|
|
|
|
|
using System.Collections; |
|
|
using System.Collections.Generic; |
|
|
using System.Collections.Generic; |
|
|
using System.Collections.Specialized; |
|
|
using System.Collections.Specialized; |
|
|
using System.ComponentModel; |
|
|
using System.ComponentModel; |
|
|
@ -334,5 +335,27 @@ namespace Avalonia.Base.UnitTests.Collections |
|
|
|
|
|
|
|
|
Assert.True(raised); |
|
|
Assert.True(raised); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
[Fact] |
|
|
|
|
|
public void Can_CopyTo_Array_Of_Same_Type() |
|
|
|
|
|
{ |
|
|
|
|
|
var target = new AvaloniaList<string> { "foo", "bar", "baz" }; |
|
|
|
|
|
var result = new string[3]; |
|
|
|
|
|
|
|
|
|
|
|
target.CopyTo(result, 0); |
|
|
|
|
|
|
|
|
|
|
|
Assert.Equal(target, result); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
[Fact] |
|
|
|
|
|
public void Can_CopyTo_Array_Of_Base_Type() |
|
|
|
|
|
{ |
|
|
|
|
|
var target = new AvaloniaList<string> { "foo", "bar", "baz" }; |
|
|
|
|
|
var result = new object[3]; |
|
|
|
|
|
|
|
|
|
|
|
((IList)target).CopyTo(result, 0); |
|
|
|
|
|
|
|
|
|
|
|
Assert.Equal(target, result); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|