1# test for stl beautifier, do op_regex_test < mangled-name.txt 2# line go by couple mangled name then expected name after run, line 3# starting by # and blank line are ignored. The test must output nothing if 4# successfull 5 6# before removing tests think it take time to write them. This is intended 7# to be a coverage test of all pattern in stl.pat. 8 9# g++ 2.95 stl mangled name 10 11basic_string<char, string_char_traits<char>, __default_alloc_template<true, 0> > 12string 13 14prefix_basic_string<char, string_char_traits<char>, __default_alloc_template<true, 0> > 15prefix_basic_string<char, string_char_traits<char>, __default_alloc_template<true, 0>> 16 17vector<basic_string<char, string_char_traits<char>, __default_alloc_template<true, 0> >, allocator<basic_string<char, string_char_traits<char>, __default_alloc_template<true, 0> > > > 18vector<string> 19 20map<int, image_name, less<int>, allocator<image_name> > 21map<int, image_name> 22 23map<basic_string<char, string_char_traits<char>, __default_alloc_template<true, 0> >, image_name, less<basic_string<char, string_char_traits<char>, __default_alloc_template<true, 0> > >, allocator<image_name> > 24map<string, image_name> 25 26multimap<int, long, less<int>, allocator<long> > 27multimap<int, long> 28 29prefix_multimap<int, long, less<int>, allocator<long> > 30prefix_multimap<int, long, less<int>, allocator<long>> 31 32map<int, long, compare, allocator<long> > 33map<int, long, compare> 34 35bitset<33, unsigned long> 36bitset<33> 37 38istream_iterator<char, @PTRDIFF_T_TYPE@> 39istream_iterator<char> 40 41ostream_iterator<char, @PTRDIFF_T_TYPE@> 42ostream_iterator<char> 43 44# shared between all supported gcc version 45deque<int, allocator<int>, 0> 46deque<int> 47 48std::deque<int, std::allocator<int>, 0> 49deque<int> 50 51prefix_deque<int, allocator<int>, 0> 52prefix_deque<int, allocator<int>, 0> 53 54list<int, allocator<int> > 55list<int> 56 57list<op_bfd_symbol, allocator<op_bfd_symbol> > 58list<op_bfd_symbol> 59 60_List_iterator<int, int const &, int const *> 61list<int>::const_iterator 62 63_List_iterator<int, int &, int *> 64list<int>::iterator 65 66prefix_list<int, allocator<int> > 67prefix_list<int, allocator<int>> 68 69std::list<int, std::allocator<int> > 70list<int> 71 72queue<int, deque<int, allocator<int>, 0> > 73queue<int> 74 75prefix_queue<int, deque<int, allocator<int>, 0> > 76prefix_queue<int, deque<int>> 77 78std::queue<int, std::deque<int, allocator<int>, 0> > 79queue<int> 80 81# get ride of _Rb_tree typedef, these are also mapped by map/set but we can't 82# distinguish a set<pair<int, int>>::iterator and a map<int, int>::iterator 83# as they decay to an identical typedef so we don't try to be clever here. 84_Rb_tree_iterator<T, T const &, T const *> 85_Rb_tree<T>::const_iterator 86 87_Rb_tree_iterator<T, T &, T *> 88_Rb_tree<T>::iterator 89 90# this run through special case pattern 91_Rb_tree_iterator<pair<string const, image_name>, pair<string const, image_name> const &, pair<string const, image_name> const *> 92_Rb_tree<pair<string const, image_name>>::const_iterator 93 94_Rb_tree_iterator<pair<string const, image_name>, pair<string const, image_name> &, pair<string const, image_name> *> 95_Rb_tree<pair<string const, image_name>>::iterator 96 97_Rb_tree<int, int, _Identity<int>, less<int>, allocator<int> > 98_Rb_tree<int, int, int> 99 100_Rb_tree<string, pair<string const, int const>, _Select1st<pair<string const, int const>>, less<string>, allocator<int const>> 101_Rb_tree<string, pair<string const, int const>, string const> 102 103_Select1st<pair<int const, long> > 104int const 105 106_Select1st<pair<int const, long const> > 107int const 108 109_Select1st<pair<string const, split_sample_filename const>> 110string const 111 112_Identity<int> 113int 114 115# this test fail since pair<> is not recognized as a type 116# _Select1st<pair<pair<symbol_entry const *, unsigned long long> const, sample_entry>> 117# pair<symbol_entry const *, unsigned long long> const 118 119# 2.95 map/multimap 120_Rb_tree<int, pair<int const, long>, _Select1st<pair<int const, long> >, less<int>, allocator<long> > 121_Rb_tree<int, pair<int const, long>, int const> 122# 3.2 map/multimap 123_Rb_tree<int, pair<int const, long>, _Select1st<pair<int const, long> >, less<int>, allocator<pair<int const, long> > > 124_Rb_tree<int, pair<int const, long>, int const> 125 126_List_base<string, allocator<string>> 127_List_base<string> 128 129# strictly speaking 3rd parameters is less<ContainerType::value_type> 130priority_queue<int, vector<int, allocator<int> >, less<int> > 131priority_queue<int> 132 133prefix_priority_queue<int, vector<int, allocator<int> >, less<int> > 134prefix_priority_queue<int, vector<int>, less<int>> 135 136std::priority_queue<int, std::vector<int, std::allocator<int> >, std::less<int> > 137priority_queue<int> 138 139vector<int, allocator<int> > 140vector<int> 141 142vector<bool, allocator<bool> > 143vector<bool> 144 145vector<block1::block2, allocator<block1::block2> > 146vector<block1::block2> 147 148stack<int, deque<int, allocator<int>, 0> > 149stack<int> 150 151prefix_stack<int, deque<int, allocator<int>, 0> > 152prefix_stack<int, deque<int>> 153 154std::stack<int, std::deque<int, std::allocator<int>, 0> > 155stack<int> 156 157# test complex typename, we don't support more than one level of nesting 158vector<list<int, allocator<int> >, allocator<list<int, allocator<int> > > > 159vector<list<int>> 160 161std::vector<std::list<int, std::allocator<int> >, std::allocator<list<int, std::allocator<int> > > > 162vector<list<int>> 163 164set<int, less<int>, allocator<int> > 165set<int> 166 167set<basic_string<char, string_char_traits<char>, __default_alloc_template<true, 0> >, less<basic_string<char, string_char_traits<char>, __default_alloc_template<true, 0> > >, allocator<basic_string<char, string_char_traits<char>, __default_alloc_template<true, 0> > > > 168set<string> 169 170set<int, less_by_file_loc, allocator<int> > 171set<int, less_by_file_loc> 172 173prefix_set<int, less<int>, allocator<int> > 174prefix_set<int, less<int>, allocator<int>> 175 176prefix_set<int, less<int>, allocator<int> > 177prefix_set<int, less<int>, allocator<int>> 178 179multiset<int, less<int>, allocator<int> > 180multiset<int> 181 182# test than pointer and reference to pointer are handled 183vector<int *, allocator<int *> > 184vector<int *> 185 186vector<unsigned int *, allocator<unsigned int *> > 187vector<unsigned int *> 188 189# algorithm, will work for 3.2 too. 190int * find<int *, int>(int *, int *, int const &, random_access_iterator_tag) 191int * find(int *, int *, int const &, random_access_iterator_tag) 192char const * find_if<char const *, compare>(char const *, char const *, compare, random_access_iterator_tag) 193char const * find_if(char const *, char const *, compare, random_access_iterator_tag) 194 195# gcc 3.2 196std::basic_string<char, std::char_traits<char>, std::allocator<char> > 197string 198 199std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > 200wstring 201 202# __normal_iterator are treated a part 203__gnu_cxx::__normal_iterator<char const*, string> 204string::const_iterator 205__gnu_cxx::__normal_iterator<char*, string> 206string::iterator 207__gnu_cxx::__normal_iterator<wchar_t*, wstring> 208wstring::iterator 209__gnu_cxx::__normal_iterator<wchar_t const*, wstring> 210wstring::const_iterator 211std::reverse_iterator<__gnu_cxx::__normal_iterator<char*, string>> 212reverse_iterator<string::iterator> 213 214__gnu_cxx::__normal_iterator<int const*, vector<int>> 215vector<int>::const_iterator 216__gnu_cxx::__normal_iterator<int*, vector<int>> 217vector<int>::iterator 218std::reverse_iterator<__gnu_cxx::__normal_iterator<int const*, vector<int>> 219reverse_iterator<vector<int>::const_iterator 220 221std::map<int, long, std::less<int>, std::allocator<std::pair<int const, long> > > 222map<int, long> 223 224std::multimap<int, long, std::less<int>, std::allocator<std::pair<int const, long> > > 225multimap<int, long> 226 227std::map<int, long, compare, std::allocator<std::pair<int const, long> > > 228map<int, long, compare> 229 230# parameter is size_t on x86 it's an unsigned 231bitset<(@SIZE_T_TYPE@)33> 232bitset<33> 233 234# 3, 4, 5th params are ptrdiff_t it's an int on x86 235std::iterator<std::input_iterator_tag, int, @PTRDIFF_T_TYPE@, @PTRDIFF_T_TYPE@*, @PTRDIFF_T_TYPE@&> 236iterator<input_iterator_tag, int> 237 238std::iterator<std::output_iterator_tag, int, @PTRDIFF_T_TYPE@, @PTRDIFF_T_TYPE@*, @PTRDIFF_T_TYPE@&> 239iterator<output_iterator_tag, int> 240 241std::iterator<std::forward_iterator_tag, int, @PTRDIFF_T_TYPE@, @PTRDIFF_T_TYPE@*, @PTRDIFF_T_TYPE@&> 242iterator<forward_iterator_tag, int> 243 244std::iterator<std::bidirectional_iterator_tag, int, @PTRDIFF_T_TYPE@, @PTRDIFF_T_TYPE@*, @PTRDIFF_T_TYPE@&> 245iterator<bidirectional_iterator_tag, int> 246 247std::iterator<std::random_iterator_tag, int, @PTRDIFF_T_TYPE@, @PTRDIFF_T_TYPE@*, @PTRDIFF_T_TYPE@&> 248iterator<random_iterator_tag, int> 249 250# 4th parms is ptrdiff_t 251std::istream_iterator<long, char, std::char_traits<char>, @PTRDIFF_T_TYPE@> 252istream_iterator<long> 253 254std::ostream_iterator<long, char, std::char_traits<char>, @PTRDIFF_T_TYPE@> 255ostream_iterator<long> 256 257# simple enough, it's just <iosfwd> 258std::basic_ios<int, std::char_traits<int> > 259basic_ios<int> 260 261std::basic_streambuf<int, std::char_traits<int> > 262basic_streambuf<int> 263 264std::basic_istream<int, std::char_traits<int> > 265basic_istream<int> 266 267std::basic_ostream<int, std::char_traits<int> > 268basic_ostream<int> 269 270std::basic_iostream<int, std::char_traits<int> > 271basic_iostream<int> 272 273std::basic_filebuf<int, std::char_traits<int> > 274basic_filebuf<int> 275 276std::basic_ifstream<int, std::char_traits<int> > 277basic_ifstream<int> 278 279std::basic_ofstream<int, std::char_traits<int> > 280basic_ofstream<int> 281 282std::basic_fstream<int, std::char_traits<int> > 283basic_fstream<int> 284 285std::istreambuf_iterator<long, std::char_traits<long> > 286istreambuf_iterator<long> 287 288std::ostreambuf_iterator<long, std::char_traits<long> > 289ostreambuf_iterator<long> 290 291std::basic_stringbuf<long, std::char_traits<long>, std::allocator<long> > 292basic_stringbuf<long> 293 294std::basic_istringstream<long, std::char_traits<long>, std::allocator<long> > 295basic_istringstream<long> 296 297std::basic_ostringstream<long, std::char_traits<long>, std::allocator<long> > 298basic_ostringstream<long> 299 300std::basic_stringstream<long, std::char_traits<long>, std::allocator<long> > 301basic_stringstream<long> 302 303# all the above intantiated with char and wchar_t fallback to standardised 304# typedef except istreambuf_iterator and ostreambuf_iterator 305 306std::basic_ios<char, std::char_traits<char> > 307ios 308std::basic_ios<wchar_t, std::char_traits<wchar_t> > 309wios 310 311std::basic_streambuf<char, std::char_traits<char> > 312streambuf 313std::basic_streambuf<wchar_t, std::char_traits<wchar_t> > 314wstreambuf 315 316std::basic_istream<char, std::char_traits<char> > 317istream 318std::basic_istream<wchar_t, std::char_traits<wchar_t> > 319wistream 320 321std::basic_ostream<char, std::char_traits<char> > 322ostream 323std::basic_ostream<wchar_t, std::char_traits<wchar_t> > 324wostream 325 326std::basic_iostream<char, std::char_traits<char> > 327iostream 328std::basic_iostream<wchar_t, std::char_traits<wchar_t> > 329wiostream 330 331std::basic_filebuf<char, std::char_traits<char> > 332filebuf 333std::basic_filebuf<wchar_t, std::char_traits<wchar_t> > 334wfilebuf 335 336std::basic_ifstream<char, std::char_traits<char> > 337ifstream 338std::basic_ifstream<wchar_t, std::char_traits<wchar_t> > 339wifstream 340 341std::basic_ofstream<char, std::char_traits<char> > 342ofstream 343std::basic_ofstream<wchar_t, std::char_traits<wchar_t> > 344wofstream 345 346std::basic_fstream<char, std::char_traits<char> > 347fstream 348std::basic_fstream<wchar_t, std::char_traits<wchar_t> > 349wfstream 350 351std::basic_stringbuf<char, std::char_traits<char>, std::allocator<char> > 352stringbuf 353std::basic_stringbuf<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > 354wstringbuf 355 356std::basic_istringstream<char, std::char_traits<char>, std::allocator<char> > 357istringstream 358std::basic_istringstream<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > 359wistringstream 360 361std::basic_ostringstream<char, std::char_traits<char>, std::allocator<char> > 362ostringstream 363std::basic_ostringstream<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > 364wostringstream 365 366std::basic_stringstream<char, std::char_traits<char>, std::allocator<char> > 367stringstream 368std::basic_stringstream<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > 369wstringstream 370 371# these two are also in iosfw, namely 372# typedef fpos<char_traits<char>::state_type> streampos; 373# typedef fpos<char_traits<wchar_t>::state_type> wstreampos; 374# but twice decay to fpos<__mbstate>, we choosed to translate to streampos 375std::fpos<__mbstate_t> 376streampos 377 378# locale 379std::num_put<char, std::ostreambuf_iterator<char> > 380num_put<char> 381std::num_put<wchar_t, std::ostreambuf_iterator<wchar_t> > 382num_put<wchar_t> 383std::num_get<char, std::istreambuf_iterator<char> > 384num_get<char> 385std::num_get<wchar_t, std::istreambuf_iterator<wchar_t> > 386num_get<wchar_t> 387 388std::time_put<char, std::ostreambuf_iterator<char> > 389time_put<char> 390std::time_put<wchar_t, std::ostreambuf_iterator<wchar_t> > 391time_put<wchar_t> 392std::time_get<char, std::istreambuf_iterator<char> > 393time_get<char> 394std::time_get<wchar_t, std::istreambuf_iterator<wchar_t> > 395time_get<wchar_t> 396 397std::money_put<char, std::ostreambuf_iterator<char> > 398money_put<char> 399std::money_put<wchar_t, std::ostreambuf_iterator<wchar_t> > 400money_put<wchar_t> 401std::money_get<char, std::istreambuf_iterator<char> > 402money_get<char> 403std::money_get<wchar_t, std::istreambuf_iterator<wchar_t> > 404money_get<wchar_t> 405 406std::moneypunct<char, (bool)0> 407moneypunct<char> 408std::moneypunct<wchar_t, (bool)0> 409moneypunct<wchar_t> 410std::moneypunct_byname<char, (bool)0> 411moneypunct_byname<char> 412std::moneypunct_byname<wchar_t, (bool)0> 413moneypunct_byname<wchar_t> 414 415# algorithm 416vector<string>::iterator find<vector<string>::iterator, string>(vector<string>::iterator, vector<string>::iterator, string const&, random_access_iterator_tag) 417vector<string>::iterator find(vector<string>::iterator, vector<string>::iterator, string const&, random_access_iterator_tag) 418 419string::iterator find<string::iterator, int>(string::iterator, string::iterator, int const&, random_access_iterator_tag) 420string::iterator find(string::iterator, string::iterator, int const&, random_access_iterator_tag) 421 422vector<int>::iterator find<vector<int>::iterator, int>(vector<int>::iterator, vector<int>::iterator, int const&, random_access_iterator_tag) 423vector<int>::iterator find(vector<int>::iterator, vector<int>::iterator, int const&, random_access_iterator_tag) 424 425char const * find<char const *, int>(char const *, char const *, int const &, random_access_iterator_tag) 426char const * find(char const *, char const *, int const &, random_access_iterator_tag) 427 428string::const_iterator find<string::const_iterator, int>(string::const_iterator, string::const_iterator, int const&, random_access_iterator_tag) 429string::const_iterator find(string::const_iterator, string::const_iterator, int const&, random_access_iterator_tag) 430 431string::const_iterator find_if<string::const_iterator, compare>(string::const_iterator, string::const_iterator, compare, random_access_iterator_tag) 432string::const_iterator find_if(string::const_iterator, string::const_iterator, compare, random_access_iterator_tag) 433 434vector<int>::iterator find_if<vector<int>::iterator, compare>(vector<int>::iterator, vector<int>::iterator, compare, random_access_iterator_tag) 435vector<int>::iterator find_if(vector<int>::iterator, vector<int>::iterator, compare, random_access_iterator_tag) 436 437ostream & operator<<<char, string_char_traits<char>, __default_alloc_template<true, 0>>(ostream &, string const &) 438ostream & operator<<(ostream &, string const &) 439 440istream & operator>><char, string_char_traits<char>, __default_alloc_template<true, 0>>(istream &, string &) 441istream & operator>>(istream &, string &) 442 443istream & getline<char, string_char_traits<char>, __default_alloc_template<true, 0>>(istream &, string &) 444istream & getline(istream &, string &) 445 446ostream& operator<< <char, char_traits<char>, allocator<char>>(ostream&, string const&) 447ostream & operator<<(ostream &, string const &) 448 449istream& operator>> <char, char_traits<char>, allocator<char>>(istream&, string&) 450istream & operator>>(istream &, string &) 451 452std::basic_ostream<char, std::char_traits<char> >::operator<<(long) 453ostream::operator<<(long) 454