Add in runtime tests for std::string variables
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8612 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
15921b61d2
commit
3fe974fb76
1 changed files with 32 additions and 0 deletions
32
Examples/test-suite/php4/li_std_string_runme.php4
Normal file
32
Examples/test-suite/php4/li_std_string_runme.php4
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
<?php
|
||||||
|
// Sample test file
|
||||||
|
|
||||||
|
require "tests.php4";
|
||||||
|
require "li_std_string.php";
|
||||||
|
|
||||||
|
// Global variables
|
||||||
|
//$s="initial string";
|
||||||
|
//check::equal(GlobalString2_get() ,"global string 2", "GlobalString2 test 1");
|
||||||
|
|
||||||
|
// Global variables
|
||||||
|
$s = "initial string";
|
||||||
|
check::equal(GlobalString2_get(), "global string 2", "GlobalString2 test 1");
|
||||||
|
GlobalString2_set($s);
|
||||||
|
check::equal(GlobalString2_get(), $s, "GlobalString2 test 2");
|
||||||
|
check::equal(ConstGlobalString_get(), "const global string", "ConstGlobalString test");
|
||||||
|
|
||||||
|
// Member variables
|
||||||
|
$myStructure = new Structure();
|
||||||
|
check::equal($myStructure->MemberString2, "member string 2", "MemberString2 test 1");
|
||||||
|
$myStructure->MemberString2 = $s;
|
||||||
|
check::equal($myStructure->MemberString2, $s, "MemberString2 test 2");
|
||||||
|
check::equal($myStructure->ConstMemberString, "const member string", "ConstMemberString test");
|
||||||
|
|
||||||
|
check::equal(Structure::StaticMemberString2(), "static member string 2", "StaticMemberString2 test 1");
|
||||||
|
Structure::StaticMemberString2($s);
|
||||||
|
check::equal(Structure::StaticMemberString2(), $s, "StaticMemberString2 test 2");
|
||||||
|
// below broken ?
|
||||||
|
//check::equal(Structure::ConstStaticMemberString(), "const static member string", "ConstStaticMemberString test");
|
||||||
|
|
||||||
|
check::done();
|
||||||
|
?>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue