PageRenderTime 41ms CodeModel.GetById 17ms RepoModel.GetById 1ms app.codeStats 0ms

/trunk/Examples/test-suite/csharp/li_std_combinations_runme.cs

#
C# | 31 lines | 23 code | 7 blank | 1 comment | 5 complexity | 55d89c04e0d919cd6896ca3729e3edf2 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. using System;
  2. using li_std_combinationsNamespace;
  3. public class li_std_combinations_runme {
  4. public static void Main() {
  5. VectorPairIntString vpis = new VectorPairIntString();
  6. vpis.Add(new PairIntString(123, "one hundred and twenty three"));
  7. VectorString vs = new VectorString();
  8. vs.Add("hi");
  9. PairIntVectorString pivs = new PairIntVectorString(456, vs);
  10. if (pivs.second[0] != "hi")
  11. throw new ApplicationException("PairIntVectorString");
  12. VectorVectorString vvs = new VectorVectorString();
  13. vvs.Add(vs);
  14. PairIntPairIntString pipis = new PairIntPairIntString(12, new PairIntString(3, "4"));
  15. if (pipis.first != 12)
  16. throw new ApplicationException("PairIntPairIntString");
  17. PairDoubleString pds = new PairDoubleString(12.34, "okay");
  18. VectorPairDoubleString vpds = new VectorPairDoubleString();
  19. vpds.Add(pds);
  20. // Check SWIG_STD_VECTOR_ENHANCED macro - it provides the Contains method
  21. if (!vpds.Contains(pds))
  22. throw new ApplicationException("VectorPairDoubleString");
  23. }
  24. }