PageRenderTime 38ms CodeModel.GetById 12ms RepoModel.GetById 1ms app.codeStats 0ms

/tags/rel-1-3-29/SWIG/Examples/test-suite/csharp/constover_runme.cs

#
C# | 34 lines | 27 code | 7 blank | 0 comment | 12 complexity | a24259147695c91c89fd144fb04008cc MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. using System;
  2. using constoverNamespace;
  3. public class runme
  4. {
  5. static void Main()
  6. {
  7. string p = constover.test("test");
  8. if ( p != "test" )
  9. throw new Exception( "test failed!" );
  10. p = constover.test_pconst("test");
  11. if ( p != "test_pconst" )
  12. throw new Exception( "test_pconst failed!" );
  13. Foo f = new Foo();
  14. p = f.test("test");
  15. if ( p != "test" )
  16. throw new Exception( "member-test failed!" );
  17. p = f.test_pconst("test");
  18. if ( p != "test_pconst" )
  19. throw new Exception( "member-test_pconst failed!" );
  20. p = f.test_constm("test");
  21. if ( p != "test_constmethod" )
  22. throw new Exception( "member-test_constm failed!" );
  23. p = f.test_pconstm("test");
  24. if ( p != "test_pconstmethod" )
  25. throw new Exception( "member-test_pconstm failed!" );
  26. }
  27. }