~ubuntu-branches/ubuntu/maverick/swig1.3/maverick

« back to all changes in this revision

Viewing changes to Examples/test-suite/java/li_std_string_runme.java

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-12-05 01:16:04 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051205011604-ygx904it6413k3go
Tags: 1.3.27-1ubuntu1
Resynchronise with Debian again, for the new subversion packages.

Show diffs side-by-side

added added

removed removed

Lines of Context:
66
66
          li_std_string.test_throw();
67
67
          throw new Throwable("Test 5 failed");
68
68
      } catch (RuntimeException e) {
 
69
        if (!e.getMessage().equals("test_throw message"))
 
70
          throw new Exception("Test 5 string check: " + e.getMessage());
69
71
      }
70
72
      try {
71
73
          li_std_string.test_const_reference_throw();
72
74
          throw new Throwable("Test 6 failed");
73
75
      } catch (RuntimeException e) {
 
76
        if (!e.getMessage().equals("test_const_reference_throw message"))
 
77
          throw new Exception("Test 6 string check: " + e.getMessage());
74
78
      }
 
79
 
 
80
      // Global variables
 
81
      String s = "initial string";
 
82
      if (!li_std_string.getGlobalString2().equals("global string 2"))
 
83
        throw new Exception("GlobalString2 test 1");
 
84
      li_std_string.setGlobalString2(s);
 
85
      if (!li_std_string.getGlobalString2().equals(s))
 
86
        throw new Exception("GlobalString2 test 2");
 
87
 
 
88
      // Member variables
 
89
      Structure myStructure = new Structure();
 
90
      if (!myStructure.getMemberString2().equals("member string 2"))
 
91
        throw new Exception("MemberString2 test 1");
 
92
      myStructure.setMemberString2(s);
 
93
      if (!myStructure.getMemberString2().equals(s))
 
94
        throw new Exception("MemberString2 test 2");
 
95
 
 
96
      if (!Structure.getStaticMemberString2().equals("static member string 2"))
 
97
        throw new Exception("StaticMemberString2 test 1");
 
98
      Structure.setStaticMemberString2(s);
 
99
      if (!Structure.getStaticMemberString2().equals(s))
 
100
        throw new Exception("StaticMemberString2 test 2");
75
101
  }
76
102
}