Add ToArray test for C# std::vector wrapper

This commit is contained in:
William S Fulton 2018-01-12 18:26:47 +00:00
commit 368cd3b52c
3 changed files with 15 additions and 1 deletions

View file

@ -177,6 +177,17 @@ public class li_std_vector_runme {
if (doubleArray[i] != dvCopy[i])
throw new Exception("Copy constructor failed, index:" + i);
}
if (dvCopy.Count != doubleArray.Length)
throw new Exception("Copy constructor lengths mismatch");
// ToArray test
double[] dvArray = dv.ToArray();
for (int i=0; i<doubleArray.Length; i++) {
if (doubleArray[i] != dvArray[i])
throw new Exception("ToArray failed, index:" + i);
}
if (dvArray.Length != doubleArray.Length)
throw new Exception("ToArray lengths mismatch");
}
{
// Repeat() test