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:
parent
aa100d9b60
commit
2df53312a3
2 changed files with 12 additions and 0 deletions
|
|
@ -76,6 +76,8 @@ public class runme
|
||||||
li_std_string.GlobalString2 = s;
|
li_std_string.GlobalString2 = s;
|
||||||
if (li_std_string.GlobalString2 != s)
|
if (li_std_string.GlobalString2 != s)
|
||||||
throw new Exception("GlobalString2 test 2");
|
throw new Exception("GlobalString2 test 2");
|
||||||
|
if (li_std_string.ConstGlobalString != "const global string")
|
||||||
|
throw new Exception("ConstGlobalString test");
|
||||||
|
|
||||||
// Member variables
|
// Member variables
|
||||||
Structure myStructure = new Structure();
|
Structure myStructure = new Structure();
|
||||||
|
|
@ -84,11 +86,15 @@ public class runme
|
||||||
myStructure.MemberString2 = s;
|
myStructure.MemberString2 = s;
|
||||||
if (myStructure.MemberString2 != s)
|
if (myStructure.MemberString2 != s)
|
||||||
throw new Exception("MemberString2 test 2");
|
throw new Exception("MemberString2 test 2");
|
||||||
|
if (myStructure.ConstMemberString != "const member string")
|
||||||
|
throw new Exception("ConstMemberString test");
|
||||||
|
|
||||||
if (Structure.StaticMemberString2 != "static member string 2")
|
if (Structure.StaticMemberString2 != "static member string 2")
|
||||||
throw new Exception("StaticMemberString2 test 1");
|
throw new Exception("StaticMemberString2 test 1");
|
||||||
Structure.StaticMemberString2 = s;
|
Structure.StaticMemberString2 = s;
|
||||||
if (Structure.StaticMemberString2 != s)
|
if (Structure.StaticMemberString2 != s)
|
||||||
throw new Exception("StaticMemberString2 test 2");
|
throw new Exception("StaticMemberString2 test 2");
|
||||||
|
if (Structure.ConstStaticMemberString != "const static member string")
|
||||||
|
throw new Exception("ConstStaticMemberString test");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -84,6 +84,8 @@ public class li_std_string_runme {
|
||||||
li_std_string.setGlobalString2(s);
|
li_std_string.setGlobalString2(s);
|
||||||
if (!li_std_string.getGlobalString2().equals(s))
|
if (!li_std_string.getGlobalString2().equals(s))
|
||||||
throw new Exception("GlobalString2 test 2");
|
throw new Exception("GlobalString2 test 2");
|
||||||
|
if (!li_std_string.getConstGlobalString().equals("const global string"))
|
||||||
|
throw new Exception("ConstGlobalString test");
|
||||||
|
|
||||||
// Member variables
|
// Member variables
|
||||||
Structure myStructure = new Structure();
|
Structure myStructure = new Structure();
|
||||||
|
|
@ -92,11 +94,15 @@ public class li_std_string_runme {
|
||||||
myStructure.setMemberString2(s);
|
myStructure.setMemberString2(s);
|
||||||
if (!myStructure.getMemberString2().equals(s))
|
if (!myStructure.getMemberString2().equals(s))
|
||||||
throw new Exception("MemberString2 test 2");
|
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"))
|
if (!Structure.getStaticMemberString2().equals("static member string 2"))
|
||||||
throw new Exception("StaticMemberString2 test 1");
|
throw new Exception("StaticMemberString2 test 1");
|
||||||
Structure.setStaticMemberString2(s);
|
Structure.setStaticMemberString2(s);
|
||||||
if (!Structure.getStaticMemberString2().equals(s))
|
if (!Structure.getStaticMemberString2().equals(s))
|
||||||
throw new Exception("StaticMemberString2 test 2");
|
throw new Exception("StaticMemberString2 test 2");
|
||||||
|
if (!Structure.getConstStaticMemberString().equals("const static member string"))
|
||||||
|
throw new Exception("ConstStaticMemberString test");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue