add in const std::string variable tests

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8608 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2006-01-29 14:47:38 +00:00
commit 2df53312a3
2 changed files with 12 additions and 0 deletions

View file

@ -84,6 +84,8 @@ public class li_std_string_runme {
li_std_string.setGlobalString2(s);
if (!li_std_string.getGlobalString2().equals(s))
throw new Exception("GlobalString2 test 2");
if (!li_std_string.getConstGlobalString().equals("const global string"))
throw new Exception("ConstGlobalString test");
// Member variables
Structure myStructure = new Structure();
@ -92,11 +94,15 @@ public class li_std_string_runme {
myStructure.setMemberString2(s);
if (!myStructure.getMemberString2().equals(s))
throw new Exception("MemberString2 test 2");
if (!myStructure.getConstMemberString().equals("const member string"))
throw new Exception("ConstMemberString test");
if (!Structure.getStaticMemberString2().equals("static member string 2"))
throw new Exception("StaticMemberString2 test 1");
Structure.setStaticMemberString2(s);
if (!Structure.getStaticMemberString2().equals(s))
throw new Exception("StaticMemberString2 test 2");
if (!Structure.getConstStaticMemberString().equals("const static member string"))
throw new Exception("ConstStaticMemberString test");
}
}