PageRenderTime 20ms CodeModel.GetById 1ms app.highlight 14ms RepoModel.GetById 2ms app.codeStats 0ms

/trunk/Examples/test-suite/octave/template_typedef_runme.m

#
Objective C | 51 lines | 41 code | 10 blank | 0 comment | 3 complexity | 6fbdba6cf75e62c4e8cbbec9bbf92f51 MD5 | raw file
 1template_typedef
 2
 3d = make_Identity_float();
 4c = make_Identity_reald();
 5
 6
 7try
 8  a = swig_this(d);
 9  a = swig_this(c);
10catch
11  error
12end_try_catch
13
14try
15  e = make_Multiplies_float_float_float_float(d, d);
16  a = swig_this(e);
17catch
18  e
19  error("is not an instance")
20end_try_catch
21
22try
23  f = make_Multiplies_reald_reald_reald_reald(c, c);
24  a = swig_this(f);
25catch
26  f
27  error("is not an instance");
28end_try_catch
29
30try
31  g = make_Multiplies_float_float_reald_reald(d, c);
32  a = swig_this(g);
33catch
34  error(g, "is not an instance")
35end_try_catch
36
37
38# the old large format
39if (strcmp("<unknown>",swig_typequery("vfncs::ArithUnaryFunction<vfncs::arith_traits<float,double>::argument_type,vfncs::arith_traits<float,double >::result_type > *")))
40  error
41endif
42
43# the reduced format
44if (strcmp("<unknown>",swig_typequery("vfncs::ArithUnaryFunction<double,double> *")))
45  error
46endif
47
48# this is a bad name
49if (!strcmp("<unknown>",swig_typequery("vfncs::ArithUnaryFunction<double,doublex> *")))
50  error
51endif