Correct test for global shared_ptr variable

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10343 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2008-04-04 23:26:54 +00:00
commit a37115f55d
5 changed files with 13 additions and 17 deletions

View file

@ -55,8 +55,8 @@ public class li_boost_shared_ptr_runme {
int wrapper_count = li_boost_shared_ptr.shared_ptr_wrapper_count();
if (wrapper_count != li_boost_shared_ptr.getNOT_COUNTING())
if (wrapper_count != 0)
throw new RuntimeException("shared_ptr wrapper count not zero: " + wrapper_count);
if (wrapper_count != 1) // Expect 1 instance - the one global variable (GlobalSmartValue)
throw new RuntimeException("shared_ptr wrapper count=" + wrapper_count);
if (debug)
System.out.println("Finished");