Add non-const char *& runtime tests

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11553 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2009-08-13 23:37:05 +00:00
commit d1a6d960eb
2 changed files with 26 additions and 4 deletions

View file

@ -127,15 +127,26 @@ public class char_strings_runme {
// char *& tests
for (i=0; i<count; i++) {
String str = char_strings.GetConstCharPointerRef();
String str = char_strings.GetCharPointerRef();
if (!str.equals(CPLUSPLUS_MSG))
throw new RuntimeException("Test char pointer ref get failed, iteration " + i);
}
for (i=0; i<count; i++) {
if (!char_strings.SetConstCharPointerRef(OTHERLAND_MSG + i, i))
if (!char_strings.SetCharPointerRef(OTHERLAND_MSG + i, i))
throw new RuntimeException("Test char pointer ref set failed, iteration " + i);
}
for (i=0; i<count; i++) {
String str = char_strings.GetConstCharPointerRef();
if (!str.equals(CPLUSPLUS_MSG))
throw new RuntimeException("Test const char pointer ref get failed, iteration " + i);
}
for (i=0; i<count; i++) {
if (!char_strings.SetConstCharPointerRef(OTHERLAND_MSG + i, i))
throw new RuntimeException("Test const char pointer ref set failed, iteration " + i);
}
}
}