Add std::vector copy constructor to proxy
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11233 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
f3a70a1a03
commit
7841adc675
2 changed files with 9 additions and 1 deletions
|
|
@ -153,7 +153,7 @@ public class li_std_vector_runme {
|
|||
}
|
||||
}
|
||||
try {
|
||||
new DoubleVector(null);
|
||||
new DoubleVector((System.Collections.ICollection)null);
|
||||
throw new Exception("ICollection constructor null test failed");
|
||||
} catch (ArgumentNullException) {
|
||||
}
|
||||
|
|
@ -180,6 +180,13 @@ public class li_std_vector_runme {
|
|||
throw new Exception("LastIndexOf non-existent test failed");
|
||||
if (dv.LastIndexOf(33.3) != 6)
|
||||
throw new Exception("LastIndexOf position test failed");
|
||||
|
||||
// Copy constructor test
|
||||
DoubleVector dvCopy = new DoubleVector(dv);
|
||||
for (int i=0; i<doubleArray.Length; i++) {
|
||||
if (doubleArray[i] != dvCopy[i])
|
||||
throw new Exception("Copy constructor failed, index:" + i);
|
||||
}
|
||||
}
|
||||
{
|
||||
// Repeat() test
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue