PageRenderTime 10ms CodeModel.GetById 1ms app.highlight 6ms 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
 1using System;
 2using li_std_combinationsNamespace;
 3
 4public class li_std_combinations_runme {
 5  public static void Main() {
 6    VectorPairIntString vpis = new VectorPairIntString();
 7    vpis.Add(new PairIntString(123, "one hundred and twenty three"));
 8
 9    VectorString vs = new VectorString();
10    vs.Add("hi");
11    PairIntVectorString pivs = new PairIntVectorString(456, vs);
12    if (pivs.second[0] != "hi")
13      throw new ApplicationException("PairIntVectorString");
14
15    VectorVectorString vvs = new VectorVectorString();
16    vvs.Add(vs);
17
18    PairIntPairIntString pipis = new PairIntPairIntString(12, new PairIntString(3, "4"));
19    if (pipis.first != 12)
20      throw new ApplicationException("PairIntPairIntString");
21
22    PairDoubleString pds = new PairDoubleString(12.34, "okay");
23    VectorPairDoubleString vpds = new VectorPairDoubleString();
24    vpds.Add(pds);
25
26    // Check SWIG_STD_VECTOR_ENHANCED macro - it provides the Contains method
27    if (!vpds.Contains(pds))
28      throw new ApplicationException("VectorPairDoubleString");
29  }
30}
31