5 use t::lib::XSP::Test tests => 4;
7 run_diff xsp_stdout => 'expected';
11 === Pointer/const pointer type
16 %typemap{int*}{simple};
17 %typemap{const int*}{simple};
20 int* boo(const int* a);
24 MODULE=Foo PACKAGE=Foo
33 === Const value/const reference type
38 %typemap{const std::string}{simple};
39 %typemap{const std::string&}{reference};
41 void foo(const std::string a);
42 void boo(const std::string& a);
46 MODULE=Foo PACKAGE=Foo
63 %typemap{const std::vector<int>&}{simple};
64 %typemap{const std::map<int, std::string>}{simple};
65 %typemap{const std::vector&}{reference}; // check type equality
67 void foo(const std::vector<int>& a);
68 void boo(const std::map<int, std::string> a);
72 MODULE=Foo PACKAGE=Foo
77 const std::vector< int >& a
81 const std::map< int, std::string > a
82 === Template argument transformed to pointer
87 %typemap{const std::vector<double>&}{reference}; // check type equality
89 void foo(const std::vector<double>& a);
93 MODULE=Foo PACKAGE=Foo
98 std::vector< double >* a