From 20f7309220a774e1c2b5b0ec3cf94f4d09c192bd Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Wed, 22 Mar 2023 20:50:57 +0000 Subject: std_array.i std_vector.i tweaks Efficiency fixes and tidy up from previous commit. Add test case for constructing from differently sized containers. Issue #2478 --- Examples/test-suite/csharp/cpp11_std_array_runme.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'Examples') diff --git a/Examples/test-suite/csharp/cpp11_std_array_runme.cs b/Examples/test-suite/csharp/cpp11_std_array_runme.cs index ee7c5ee24..649e06206 100644 --- a/Examples/test-suite/csharp/cpp11_std_array_runme.cs +++ b/Examples/test-suite/csharp/cpp11_std_array_runme.cs @@ -78,5 +78,20 @@ public class cpp11_std_array_runme catch (ArgumentOutOfRangeException) { } + + // ICollection constructor, differently sized + ai = new ArrayInt6(new int[] {1, 2, 3}); + compareContainers(ai, new int[] { 1, 2, 3, 0, 0, 0}); + ai = new ArrayInt6(new int[] {1, 2, 3, 4, 5, 6, 7, 8}); + compareContainers(ai, new int[] { 1, 2, 3, 4, 5, 6}); + + // ToArray test + int[] aiArray = ai.ToArray(); + for (int i=0; i