| typedef ::std::basic_string<ucn> lestes::std::basic_ucn_string |
| typedef multi_action lestes::std::event |
Definition at line 41 of file event_macros.hh.
Definition at line 41 of file collection_refl.cc.
Definition at line 44 of file collection_refl.cc.
| typedef char lestes::std::hchar |
Host character type.
The native host character type, used in i/o operations.
Definition at line 64 of file character.hh.
| typedef lc_host_int_least32 lestes::std::lint |
| typedef source_location lestes::std::location |
Definition at line 34 of file location.hh.
| typedef ::std::string lestes::std::lstring |
Defines lestes string; not to be used for anything concerning the processed source file.
Definition at line 52 of file data_types.hh.
| typedef map< int, int > lestes::std::map_ii |
Definition at line 36 of file map.test.cc.
| typedef map< int, srp<integer> > lestes::std::map_ip |
Definition at line 38 of file map.test.cc.
| typedef map< srp<integer>, int > lestes::std::map_pi |
Definition at line 37 of file map.test.cc.
Definition at line 39 of file map.test.cc.
| typedef octet_type::octet lestes::std::octet |
| typedef set< int > lestes::std::set_i |
Definition at line 96 of file set.test.cc.
| typedef set< int, test_less<int> > lestes::std::set_ic |
Definition at line 97 of file set.test.cc.
| typedef set< srp<integer> > lestes::std::set_p |
Definition at line 98 of file set.test.cc.
| typedef set< srp<smart_int>, deref_less<smart_int> > lestes::std::set_pc |
Definition at line 99 of file set.test.cc.
| typedef lc_host_uint_least32 lestes::std::ucn |
Type for storing characters in source encoding.
The source character is represented by an at least 32-bit unsigned integer. When bit 31 is set, a value stored in the lower bits is in external character set, either input file character set, or execution (target) character set, depending on the context. The exception is the eof value, represented as 32 one bits. Thus execution character with value 0x7FFFFFFF cannot be represented in this scheme. When bit 31 is not set, Unicode UTF-32 value is stored in the lower bits. When the type is longer than 32 bits, the higher bits shall not be used and it is entirely in the responsibility of the programmer to keep these zero, otherwise the whole mechanism would break. To keep sane, use character class static methods.
Definition at line 42 of file character.hh.
| lstring lestes::std::assemble_backtrace | ( | ) |
return a string describing the current backtrace
Definition at line 49 of file backtrace.cc.
Referenced by foo(), lassert_fail(), and main().
00050 { 00051 const char * lestes_backtrace = ::std::getenv("LESTES_BACKTRACE"); 00052 if (lestes_backtrace) { 00053 lstring value(lestes_backtrace); 00054 if (value == "nil" || value == "0") { 00055 return " Backtrace printing disabled."; 00056 } 00057 } 00058 #ifdef HAVE_BACKTRACE_SUPPORT 00059 enum { 00060 INITIAL_ITEMS = 32, 00061 MAX_ITEMS = 512 00062 }; 00063 int items = INITIAL_ITEMS; 00064 void ** array = NULL; 00065 int size; 00066 do { 00067 if (array) { 00068 items *= 2; 00069 delete [] array; 00070 } 00071 array = new void *[items]; 00072 size = ::backtrace (array, items); 00073 } while (items < MAX_ITEMS && size == items); 00074 00075 char **strings = ::backtrace_symbols (array, size); 00076 00077 ::std::vector < lstring > stringv(strings, strings+size); 00078 00079 ::std::ostringstream oss; 00080 oss << "Obtained " << size << " stack frames:\n"; 00081 00082 ::std::vector < lstring >::iterator it = stringv.begin(); 00083 ::std::vector < lstring >::iterator jt = stringv.end(); 00084 for ( ; it != jt ; ++it ) { 00085 #ifdef HAVE_CXXABI_H 00086 lstring::size_type s1 = it->find('('); 00087 lstring::size_type lastslash = it->rfind('/', s1); 00088 lstring::size_type s2 = it->find('+', s1); 00089 00090 if(s1 == lstring::npos || s2 == lstring::npos ) { 00091 oss << "(?) " << *it << '\n'; 00092 } else { 00093 lstring lib; 00094 00095 if(lastslash != lstring::npos) 00096 lib = it->substr(lastslash + 1, s1 - lastslash - 1); 00097 else 00098 lib = it->substr(0, s1+1); 00099 00100 int status=-1; 00101 lstring mangled(*it, s1+1, s2-s1-1); 00102 00103 lstring demangled; 00104 //this avoids some segfaults but is it generally true 00105 //that mangled start w/ _ ? 00106 if(!mangled.size() || mangled[0] == '_') { 00107 char * raw = ::__cxxabiv1::__cxa_demangle(mangled.c_str(), NULL, 0, &status); 00108 if (raw) { 00109 demangled = raw; 00110 ::std::free(raw); 00111 } else 00112 demangled = mangled; 00113 } else { 00114 status = 666; 00115 demangled = "XXX"; 00116 } 00117 //demangling a C-name results in bulshit (but 00118 //status==OK). Is there some wayto detect this? 00119 if (status) { 00120 oss << mangled << " in " << lib << " (DEMANGLE FAILED)\n"; 00121 } else { 00122 oss << demangled << " in " << lib << '\n'; 00123 } 00124 00125 //too much garbage .. 00126 //+ ' ' + all.substr(s2) + " (mangled: " + mangled + ")\n"; 00127 } 00128 #else 00129 oss << *it << '\n'; 00130 #endif 00131 } 00132 if(size == items) { 00133 oss << " (... more stack frames ...)\n"; 00134 } 00135 free (strings); 00136 if (array) 00137 delete [] array; 00138 return oss.str(); 00139 #else 00140 return "(no backtrace support enabled)"; 00141 #endif 00142 }
| lestes::std::declare_event | ( | lassert_event | ) |
lassert_event is trigerred when a lassertion fails (including ignored lassertions)
| void lestes::std::file_info_test | ( | void | ) |
Tests file_info class.
Performs testing of file_info class.
Definition at line 49 of file file_info.test.cc.
References lestes::is_equal(), lassert, and loc.
Referenced by main().
00050 { 00051 ptr<file_info> fr = file_info::create("foobar.h",NULL); 00052 00053 lassert(is_equal(fr->name_get(),"foobar.h")); 00054 lassert(is_equal(fr->origin_get(),ptr<source_location>(NULL))); 00055 00056 ptr<source_location> loc = source_location::create(fr,1,1); 00057 00058 ptr<file_info> gr = file_info::create("barfoo.h",loc); 00059 00060 lassert(is_equal(gr->name_get(),"barfoo.h")); 00061 lassert(is_equal(gr->origin_get(),loc)); 00062 }
| lestes::std::initialize_event | ( | lassert_event | ) |
| void lestes::std::lassert_fail | ( | lstring | assertion, | |
| lstring | filename, | |||
| ulint | line, | |||
| lstring | function, | |||
| lstring | message, | |||
| ptr< source_location > | loc | |||
| ) |
Called when an assertion fails.
This function can ignore the condition provided that the LESTES_LASSERT environment variable is set to the string "continue", "0", or "nil".
Definition at line 48 of file lassert.cc.
References assemble_backtrace(), lestes::msg::logger::finish(), lassert_failing, lassert_msg(), lassert_msg_default(), loc, and lestes::report().
00051 { 00052 if (loc) { 00053 if (message.empty()) 00054 report << lassert_msg_default << loc; 00055 else 00056 report << lassert_msg << message << loc; 00057 } 00058 ::std::cerr << filename << ": In function '" << function << "': " << ::std::endl; 00059 if (!message.empty()) 00060 ::std::cerr << filename << ": " << message << ::std::endl; 00061 ::std::cerr << filename << ':' << line << ":" 00062 " lassertion failed: \"" << assertion << "\"." << ::std::endl; 00063 00064 #ifndef NO_BACKTRACE_IN_LASSERT 00065 ::std::cerr << assemble_backtrace() << ::std::endl; 00066 #endif 00067 00068 // do not trigger the event when "double-failing" 00069 // it can happen when lassertion fails inside an action run by the event 00070 // bool flag is enough, as in the second invocation of this function 00071 // there is nothing that can fail 00072 if (!lassert_failing) { 00073 lassert_failing = true; 00074 lassert_event->trigger(); 00075 } else 00076 ::std::cerr << filename << ": Double-fail!" << ::std::endl; 00077 00078 #ifdef CONTINUABLE_ASSERTIONS 00079 const char * lestes_lassert = ::std::getenv("LESTES_LASSERT"); 00080 if (lestes_lassert) { 00081 lstring value(lestes_lassert); 00082 if (value == "continue" || value == "0" || value == "nil") { 00083 ::std::cerr << filename << ':' << line << 00084 ": warning: lassertion continued, i.e. ignored." << ::std::endl; 00085 lassert_failing = false; 00086 } else { 00087 // close log files, if any 00088 ::lestes::msg::logger::finish(); 00089 00090 abort(); 00091 } 00092 } else 00093 #endif 00094 { 00095 // close log files, if any 00096 ::lestes::msg::logger::finish(); 00097 00098 abort(); 00099 } 00100 }
| ptr< ::lestes::msg::message_stencil1< lstring > > lestes::std::lassert_msg | ( | ::lestes::msg::message_stencil1< lstring >:: | create("ICE: %0",::lestes::msg::message::FLG_ERROR,::lestes::msg::formatter< lstring >::instance()) | ) |
Referenced by lassert_fail().
| ptr< ::lestes::msg::message_stencil0< bool > > lestes::std::lassert_msg_default | ( | ::lestes::msg::message_stencil0< bool >:: | create("ICE related to this",::lestes::msg::message::FLG_ERROR) | ) |
Referenced by lassert_fail().
| int lestes::std::main | ( | void | ) |
Definition at line 48 of file double_fail.test.cc.
References lassert.
00049 { 00050 lassert_event->attach( boom::create() ); 00051 lassert( false ); 00052 }
| int lestes::std::map_test | ( | ) |
Definition at line 41 of file map.test.cc.
References lassert.
Referenced by main().
00042 { 00043 ptr<map_ii> mii1 = map_ii::create(); 00044 mii1->insert( map_ii::value_type( 0, 1 ) ); 00045 mii1->insert( map_ii::value_type( 1, 2 ) ); 00046 ptr<map_ii> mii2 = map_ii::create(); 00047 mii2->insert( map_ii::value_type( 0, 1 ) ); 00048 mii2->insert( map_ii::value_type( 1, 2 ) ); 00049 lassert( *mii1 == *mii2 ); 00050 mii2->insert( map_ii::value_type( 2, 3 ) ); 00051 lassert( *mii1 != *mii2 ); 00052 ptr<map_ii> mii3 = map_ii::create(mii2); 00053 lassert( *mii3 == *mii2 ); 00054 00055 ptr<map_pi> mpi1 = map_pi::create(); 00056 ptr<map_ip> mip1 = map_ip::create(); 00057 ptr<map_pp> mpp1 = map_pp::create(); 00058 return 0; 00059 }
| std::ostream & lestes::std::operator<< | ( | ::std::ostream & | os, | |
| const ucn_string & | us | |||
| ) |
Prints ucn string to stream.
Prints ucn string to stream, escapes extended characters with backslash u or U. Any external characters are considered to have host encoding.
| os | The stream to write to. | |
| us | The string to print. |
Definition at line 85 of file ucn_string.cc.
References lestes::std::ucn_string::to_host_string().
| void lestes::std::operator<< | ( | const ptr< ::lestes::msg::argument_holder33< P0, P1, P2 > > & | holder, | |
| const ptr< source_location > & | loc | |||
| ) | [inline] |
Reports the message formed from the holder for three arguments.
| holder | The argument holder containing stencil and arguments for the message to report. | |
| loc | The location for the report. |
Definition at line 227 of file reporting_operators.hh.
References lestes::msg::reporter::instance(), and loc.
00228 { 00229 ptr< ::lestes::msg::reporter > r = ::lestes::msg::reporter::instance(); 00230 ptr< ::lestes::msg::message_stencil3<P0,P1,P2> > ms3 = holder->stencil_get(); 00231 P0 p0 = holder->p0_get(); 00232 P1 p1 = holder->p1_get(); 00233 P2 p2 = holder->p2_get(); 00234 ptr< ::lestes::msg::message> m = ms3->format(p0,p1,p2); 00235 r->report(m,loc); 00236 }
| ptr< ::lestes::msg::argument_holder33<P0,P1,P2> > lestes::std::operator<< | ( | const ptr< ::lestes::msg::argument_holder32< P0, P1, P2 > > & | holder, | |
| const P2 & | p2 | |||
| ) | [inline] |
Extends holder with second argument.
| holder | The inferior argument holder to extend. | |
| p2 | The second argument to hold. |
Definition at line 214 of file reporting_operators.hh.
| ptr< ::lestes::msg::argument_holder32<P0,P1,P2> > lestes::std::operator<< | ( | const ptr< ::lestes::msg::argument_holder31< P0, P1, P2 > > & | holder, | |
| const P1 & | p1 | |||
| ) | [inline] |
Extends holder with first argument.
| holder | The inferior argument holder to extend. | |
| p1 | The first argument to hold. |
Definition at line 200 of file reporting_operators.hh.
| ptr< ::lestes::msg::argument_holder31<P0,P1,P2> > lestes::std::operator<< | ( | const ptr< ::lestes::msg::argument_holder30< P0, P1, P2 > > & | holder, | |
| const P0 & | p0 | |||
| ) | [inline] |
Extends holder with zeroth argument.
| holder | The inferior argument holder to extend. | |
| p0 | The zeroth argument to hold. |
Definition at line 186 of file reporting_operators.hh.
| ptr< ::lestes::msg::argument_holder30<P0,P1,P2> > lestes::std::operator<< | ( | const ptr< ::lestes::msg::reporter > & | , | |
| const ptr< ::lestes::msg::message_stencil3< P0, P1, P2 > > & | ms3 | |||
| ) | [inline] |
Returns holder for three arguments, initializes with stencil.
| ms3 | The stencil to hold. |
Definition at line 173 of file reporting_operators.hh.
| void lestes::std::operator<< | ( | const ptr< ::lestes::msg::argument_holder22< P0, P1 > > & | holder, | |
| const ptr< source_location > & | loc | |||
| ) | [inline] |
Reports the message formed from the holder for two arguments.
| holder | The argument holder containing stencil and arguments for the message to report. | |
| loc | The location for the report. |
Definition at line 157 of file reporting_operators.hh.
References lestes::msg::reporter::instance(), and loc.
00158 { 00159 ptr< ::lestes::msg::reporter > r = ::lestes::msg::reporter::instance(); 00160 ptr< ::lestes::msg::message_stencil2<P0,P1> > ms2 = holder->stencil_get(); 00161 P0 p0 = holder->p0_get(); 00162 P1 p1 = holder->p1_get(); 00163 ptr< ::lestes::msg::message > m = ms2->format(p0,p1); 00164 r->report(m,loc); 00165 }
| ptr< ::lestes::msg::argument_holder22<P0,P1> > lestes::std::operator<< | ( | const ptr< ::lestes::msg::argument_holder21< P0, P1 > > & | holder, | |
| const P1 & | p1 | |||
| ) | [inline] |
Extends holder with first argument.
| holder | The inferior argument holder to extend. | |
| p1 | The first argument to hold. |
Definition at line 145 of file reporting_operators.hh.
| ptr< ::lestes::msg::argument_holder21<P0,P1> > lestes::std::operator<< | ( | const ptr< ::lestes::msg::argument_holder20< P0, P1 > > & | holder, | |
| const P0 & | p0 | |||
| ) | [inline] |
Extends holder with zeroth argument.
| holder | The inferior argument holder to extend. | |
| p0 | The zeroth argument to hold. |
Definition at line 132 of file reporting_operators.hh.
| ptr< ::lestes::msg::argument_holder20<P0,P1> > lestes::std::operator<< | ( | const ptr< ::lestes::msg::reporter > & | , | |
| const ptr< ::lestes::msg::message_stencil2< P0, P1 > > & | ms2 | |||
| ) | [inline] |
Returns holder for two arguments, initializes with stencil.
| ms2 | The stencil to hold. |
Definition at line 119 of file reporting_operators.hh.
| void lestes::std::operator<< | ( | const ptr< ::lestes::msg::argument_holder11< P0 > > & | holder, | |
| const ptr< source_location > & | loc | |||
| ) | [inline] |
Reports the message formed from the holder for one argument.
| holder | The argument holder containing stencil and argument for the message to report. | |
| loc | The location for the report. |
Definition at line 104 of file reporting_operators.hh.
References lestes::msg::reporter::instance(), and loc.
00105 { 00106 ptr< ::lestes::msg::reporter > r = ::lestes::msg::reporter::instance(); 00107 ptr< ::lestes::msg::message_stencil1<P0> > ms1 = holder->stencil_get(); 00108 P0 p0 = holder->p0_get(); 00109 ptr< ::lestes::msg::message > m = ms1->format(p0); 00110 r->report(m,loc); 00111 }
| ptr< ::lestes::msg::argument_holder11<P0> > lestes::std::operator<< | ( | const ptr< ::lestes::msg::argument_holder10< P0 > > & | holder, | |
| const P0 & | p0 | |||
| ) | [inline] |
Extends holder with zeroth argument.
| holder | The inferior argument holder to extend. | |
| p0 | The zeroth argument to hold. |
Definition at line 92 of file reporting_operators.hh.
| ptr< ::lestes::msg::argument_holder10<P0> > lestes::std::operator<< | ( | const ptr< ::lestes::msg::reporter > & | , | |
| const ptr< ::lestes::msg::message_stencil1< P0 > > & | ms1 | |||
| ) | [inline] |
Returns holder for one argument, initializes with stencil.
| ms1 | The stencil to hold. |
Definition at line 79 of file reporting_operators.hh.
| void lestes::std::operator<< | ( | const ptr< ::lestes::msg::argument_holder00< T > > & | holder, | |
| const ptr< source_location > & | loc | |||
| ) | [inline] |
Reports the message formed from the holder for zero arguments.
| holder | The argument holder containing stencil for the message to report. | |
| loc | The location for the report. |
Definition at line 65 of file reporting_operators.hh.
References lestes::msg::reporter::instance(), and loc.
00066 { 00067 ptr< ::lestes::msg::reporter > r = ::lestes::msg::reporter::instance(); 00068 ptr< ::lestes::msg::message_stencil0<T> > ms0 = holder->stencil_get(); 00069 ptr< ::lestes::msg::message > m = ms0->format(); 00070 r->report(m,loc); 00071 }
| ptr< ::lestes::msg::argument_holder00<T> > lestes::std::operator<< | ( | const ptr< ::lestes::msg::reporter > & | , | |
| const ptr< ::lestes::msg::message_stencil0< T > > & | ms0 | |||
| ) | [inline] |
Returns holder for zero arguments, initializes with stencil.
| ms0 | The stencil to hold. |
Definition at line 53 of file reporting_operators.hh.
| inline ::lestes::msg::binded_logger lestes::std::operator<< | ( | ptr< ::lestes::msg::logger > | l, | |
| T | x | |||
| ) | [inline] |
| void lestes::std::ptr_test | ( | void | ) |
Definition at line 88 of file ptr.test.cc.
References lestes::std::s::create(), lestes::std::aa::create(), lestes::std::a::create(), lestes::std::ptr< T >::dncast(), lassert, and lestes::std::ptr< T >::pointer_get().
Referenced by main().
00089 { 00090 // constructor with NULL 00091 ptr<a> a0(NULL); 00092 lassert(!a0); 00093 lassert(!(a0)); 00094 lassert(!(a0 != a0)); 00095 lassert(a0 == a0); 00096 lassert(a0 == ptr<a>(NULL)); 00097 00098 // default constructor 00099 ptr<a> a1; 00100 lassert(!a1); 00101 lassert(!(a1)); 00102 lassert(!(a1 != a1)); 00103 lassert(a1 == a1); 00104 lassert(a1 == ptr<a>(NULL)); 00105 00106 // constructor with pointer 00107 ptr<a> a2(a::create()); 00108 ptr<a> a3(a2.pointer_get()); 00109 lassert(a3); 00110 lassert(!(!a3)); 00111 lassert(a3 != ptr<a>(NULL)); 00112 lassert(a3 != a1); 00113 lassert(a1 != a3); 00114 lassert(a3 == a3); 00115 lassert(a3 == a2.pointer_get()); 00116 00117 // constructor with pointer to descendant 00118 ptr<aa> aa1(aa::create()); 00119 lassert(aa1); 00120 lassert(aa1->m()); 00121 ptr<a> a4(aa1.pointer_get()); 00122 lassert(a4 != ptr<a>(NULL)); 00123 lassert(a4 != a2); 00124 lassert(a2 != a4); 00125 lassert(a4 == a4); 00126 lassert(a4 == aa1.pointer_get()); 00127 00128 // constructor with ptr 00129 ptr<a> a5(a4); 00130 lassert(a5 != ptr<a>(NULL)); 00131 lassert(a5 != a2); 00132 lassert(a2 != a5); 00133 lassert(a5 == a5); 00134 lassert(a5 == a4); 00135 lassert(a4 == a5); 00136 lassert(a5 == a4.pointer_get()); 00137 00138 // constructor with ptr to descendant 00139 ptr<aa> aa2(aa::create()); 00140 ptr<a> a6(aa2); 00141 lassert(a6 != ptr<a>(NULL)); 00142 lassert(a6 != a2); 00143 lassert(a2 != a6); 00144 lassert(a6 == a6); 00145 lassert(a6 == aa2); 00146 00147 // constructor with srp 00148 ptr<s> s1(s::create(a3,aa1)); 00149 ptr<a> a7(s1->fa); 00150 lassert(a7 != ptr<a>(NULL)); 00151 lassert(a7 != a4); 00152 lassert(a4 != a7); 00153 lassert(a7 == a7); 00154 lassert(a7 == s1->fa); 00155 00156 // constructor with srp to descendant 00157 ptr<a> a8(s1->faa); 00158 lassert(a8 != ptr<a>(NULL)); 00159 lassert(a8 != a6); 00160 lassert(a6 != a8); 00161 lassert(a8 == a8); 00162 lassert(a8 == s1->faa); 00163 00164 // operator ->, operator * 00165 ptr<a> a9(a2); 00166 lassert(a9->m()); 00167 lassert(&(a9->f) == &(a2->f)); 00168 lassert(a9.operator->() == a2.operator->()); 00169 lassert(&((*a9).f) == &((*a2).f)); 00170 lassert(&(a9.operator*()) == &(a2.operator*())); 00171 00172 // assignment from pointer 00173 ptr<a> a10; 00174 a10 = a2.pointer_get(); 00175 lassert(a10 != ptr<a>(NULL)); 00176 lassert(a10 != a6); 00177 lassert(a6 != a10); 00178 lassert(a10 == a2); 00179 00180 // assignment from pointer to descendant 00181 ptr<a> a11; 00182 a11 = aa1.pointer_get(); 00183 lassert(a11 != ptr<a>(NULL)); 00184 lassert(a11 != a2); 00185 lassert(a2 != a11); 00186 lassert(a11 == aa1); 00187 00188 // assignment from ptr 00189 ptr<a> a12; 00190 a12 = a2; 00191 lassert(a12 != ptr<a>(NULL)); 00192 lassert(a12 != a6); 00193 lassert(a6 != a12); 00194 lassert(a12 == a2); 00195 00196 // assignment from ptr to descendant 00197 ptr<a> a13; 00198 a13 = aa1; 00199 lassert(a13 != ptr<a>(NULL)); 00200 lassert(a13 != a6); 00201 lassert(a6 != a13); 00202 lassert(a13 == aa1); 00203 00204 // assignment from srp 00205 ptr<a> a14; 00206 a14 = s1->fa; 00207 lassert(a14 != ptr<a>(NULL)); 00208 lassert(a14 != a6); 00209 lassert(a6 != a14); 00210 lassert(a14 == s1->fa); 00211 00212 // assignment from srp to descendant 00213 ptr<a> a15; 00214 a15= s1->faa; 00215 lassert(a15 != ptr<a>(NULL)); 00216 lassert(a15 != a6); 00217 lassert(a6 != a15); 00218 lassert(a15 == s1->faa); 00219 00220 // dynamic cast to proper type 00221 ptr<a> a16(aa::create()); 00222 ptr<aa> aa3; 00223 aa3 = a16.dncast<aa>(); 00224 lassert(aa3 != ptr<a>(NULL)); 00225 00226 // dynamic cast to improper type 00227 // it crashes as there is an assertion now. commented out by Rudo. 00228 #if 0 00229 ptr<a> a17(a::create()); 00230 aa3 = a17.dncast<aa>(); 00231 lassert(aa3 == ptr<a>(NULL)); 00232 #endif 00233 }
| int lestes::std::set_test | ( | ) |
Definition at line 101 of file set.test.cc.
References lassert.
Referenced by main().
00102 { 00103 ptr<set_i> s1 = set_i::create(); 00104 ptr<set_i> s2 = set_i::create(); 00105 s1->insert(0); 00106 s2->insert(0); 00107 lassert( *s1 == *s2 ); 00108 s2->insert(1); 00109 lassert( *s1 != *s2 ); 00110 00111 ptr<set_pc> x1 = set_pc::create(); 00112 ptr<set_pc> x2 = set_pc::create(); 00113 00114 ptr<smart_int> p = smart_int::create(1); 00115 00116 x1->insert( p ); 00117 x2->insert( p ); 00118 lassert( *x1 == *x2 ); 00119 00120 x1->insert( smart_int::create(2) ); 00121 x2->insert( smart_int::create(2) ); 00122 lassert( x1->size() == x2->size() ); 00123 deref_eqeq<smart_int> comparator; 00124 lassert( equal( x1->begin(), x1->end(), x2->begin(), comparator ) ); 00125 00126 x1->insert( smart_int::create(3) ); 00127 x2->insert( smart_int::create(4) ); 00128 lassert( x1->size() == x2->size() ); 00129 lassert( !equal( x1->begin(), x1->end(), x2->begin(), comparator ) ); 00130 00131 ptr<set_pc> x3 = set_pc::create(x2); 00132 lassert( equal( x2->begin(), x2->end(), x3->begin(), comparator ) ); 00133 00134 return 0; 00135 }
| void lestes::std::source_location_test | ( | void | ) |
Tests source_location class.
Performs testing of source_location class.
Definition at line 49 of file source_location.test.cc.
References a, b, lestes::is_equal(), and lassert.
Referenced by main().
00050 { 00051 ptr<file_info> fi = file_info::create("abc",NULL); 00052 ptr<source_location> a = source_location::create(fi,12,5); 00053 00054 lassert(is_equal(a,a)); 00055 lassert(is_equal(a->file_get(),fi)); 00056 lassert(is_equal(a->line_get(),12U)); 00057 lassert(is_equal(a->column_get(),5U)); 00058 00059 ptr<source_location> b = a; 00060 ptr<source_location> c = b; 00061 00062 lassert(is_equal(b,c)); 00063 lassert(is_equal(c,b)); 00064 lassert(is_equal(b->file_get(),c->file_get())); 00065 lassert(is_equal(b->line_get(),c->line_get())); 00066 lassert(is_equal(b->column_get(),c->column_get())); 00067 00068 ptr<source_location> d; 00069 00070 d = a; 00071 00072 lassert(is_equal(d,a)); 00073 lassert(is_equal(a,d)); 00074 lassert(is_equal(d->file_get(),fi)); 00075 lassert(is_equal(d->line_get(),12U)); 00076 lassert(is_equal(d->column_get(),5U)); 00077 }
| lestes::std::specialize_objectize_for_enum | ( | ::lestes::md::types::dt_id_type | ) |
| lestes::std::specialize_objectize_for_enum | ( | ::lestes::md::registers::reg_id_type | ) |
| lestes::std::specialize_objectize_for_enum | ( | ::lestes::md::instructions::tm_instr_property_key_type | ) |
| lestes::std::specialize_objectize_for_enum | ( | ::lestes::md::instructions::tm_instr_id_type | ) |
| lestes::std::specialize_objectize_for_enum | ( | ::lestes::md::instructions::tm_instr_op_id_type | ) |
| lestes::std::specialize_objectize_for_enum | ( | ::lestes::md::instructions::pi_pi2ge_template_id_type | ) |
| lestes::std::specialize_objectize_for_enum | ( | ::lestes::md::instructions::instruction_template_operand_pid_type | ) |
| lestes::std::specialize_objectize_for_enum | ( | test_enum | ) |
| lestes::std::specialize_objectize_for_enum | ( | ::lestes::md::types::tm_data_type_base::format_type | ) |
| lestes::std::specialize_objectize_for_enum | ( | ::lestes::md::types::tm_data_type_base::kind_type | ) |
| lestes::std::specialize_objectize_for_enum | ( | ::lestes::md::registers::reg_flag_type | ) |
| lestes::std::specialize_objectize_for_enum | ( | ::lestes::md::literals::literal_info_base::kind_type | ) |
| lestes::std::specialize_objectize_for_enum | ( | ::lestes::md::instructions::tm_instr_op_base::kind_type | ) |
| lestes::std::specialize_objectize_for_enum | ( | ::lestes::md::instructions::intr_flag_type | ) |
| lestes::std::specialize_objectize_for_enum | ( | ::lestes::lang::cplus::sem::ss_type2info::info_type | ) |
| lestes::std::specialize_objectize_for_enum | ( | ::lestes::lang::cplus::sem::ss_type2id::id_type | ) |
| lestes::std::specialize_objectize_for_enum | ( | ::lestes::lang::cplus::sem::ss_decl_stmt::initializer_kind_enum | ) |
| lestes::std::specialize_objectize_for_enum | ( | ::lestes::lang::cplus::sem::ss_compound_stmt::behavior_type | ) |
| lestes::std::specialize_objectize_for_enum | ( | ::lestes::lang::cplus::sem::ss_floating_literal_info::sign_type | ) |
| lestes::std::specialize_objectize_for_enum | ( | ::lestes::lang::cplus::sem::ss_storage_class::type | ) |
| lestes::std::specialize_objectize_for_enum | ( | ::lestes::lang::cplus::sem::ss_access_specifier::type | ) |
| lestes::std::specialize_objectize_for_enum | ( | ::lestes::lang::cplus::sem::ss_linkage::type | ) |
| lestes::std::specialize_objectize_for_enum | ( | ::lestes::lang::cplus::sem::ss_decl_name_matcher::state_type | ) |
| lestes::std::specialize_objectize_for_enum | ( | ::lestes::lang::cplus::sem::ss_decl2id::id_type | ) |
| lestes::std::specialize_objectize_for_enum | ( | ::lestes::lang::cplus::sem::ss_decl_enum | ) |
| lestes::std::specialize_objectize_for_enum | ( | ::lestes::lang::cplus::sem::declaration_context::type | ) |
| lestes::std::specialize_objectize_for_enum | ( | ::lestes::lang::cplus::sem::rank_type | ) |
| lestes::std::specialize_objectize_for_enum | ( | ::lestes::lang::cplus::sem::or_or_functional_enum | ) |
| lestes::std::specialize_objectize_for_enum | ( | ::lestes::lang::cplus::sem::lu_params::parent_search_type | ) |
| lestes::std::specialize_objectize_for_enum | ( | ::lestes::lang::cplus::sem::lu_params::using_declarations_handling_type | ) |
| lestes::std::specialize_objectize_for_enum | ( | ::lestes::lang::cplus::sem::lu_params::using_directives_handling_type | ) |
| lestes::std::specialize_objectize_for_enum | ( | ::lestes::lang::cplus::sem::lu_filter::result_type | ) |
| lestes::std::specialize_objectize_for_enum | ( | ::lestes::lang::cplus::sem::as_literal::literal_kind | ) |
| lestes::std::specialize_objectize_for_enum | ( | ::lestes::lang::cplus::sem::as_declaration_specifier2properties::type_specifier_type | ) |
| lestes::std::specialize_objectize_for_enum | ( | ::lestes::lang::cplus::lex::lex_floating_literal::suffix_type | ) |
| lestes::std::specialize_objectize_for_enum | ( | ::lestes::lang::cplus::lex::lex_integral_literal::suffix_type | ) |
| lestes::std::specialize_objectize_for_enum | ( | ::lestes::lang::cplus::lex::lex_integral_literal::base_type | ) |
| lestes::std::specialize_objectize_for_enum | ( | ::lestes::backend_v2::intercode::visitor_pi_pi2id::kind_type | ) |
| lestes::std::specialize_objectize_for_enum | ( | ::lestes::backend_v2::intercode::pi_mem_factory::kind_type | ) |
| lestes::std::specialize_objectize_for_enum | ( | ::lestes::backend_v2::intercode::pi_operand::kind_type | ) |
| lestes::std::specialize_objectize_for_enum | ( | ::lestes::backend_v2::intercode::ge_operand::kind_type | ) |
| lestes::std::specialize_objectize_for_enum | ( | ::lestes::backend_v2::intercode::ge_pi::property_id_type | ) |
| lestes::std::specialize_objectize_for_enum | ( | ::lestes::backend_v2::intercode::ge_pi::kind_type | ) |
| lestes::std::specialize_objectize_nodump | ( | ::map_type::iterator | ) |
| lestes::std::specialize_objectize_nodump | ( | ::lestes::lang::cplus::syn::token_list_iterator | ) |
| lestes::std::specialize_objectize_nodump | ( | ::lestes::lang::cplus::sem::bases_type::const_iterator | ) |
| lestes::std::specialize_objectize_nodump | ( | ::lestes::lang::cplus::lex::encoder_factory::encoder_create_type | ) |
Makes the encoder_create_type nondumpable.
| lestes::std::specialize_objectize_nodump_reference | ( | lint & | ) |
| lestes::std::specialize_objectize_nodump_reference | ( | ::std::ostream & | ) |
Initializer of static fields of character class.
Definition at line 654 of file character.hh.
bool lestes::std::lassert_failing [static] |
| const lstring lestes::std::msg_not_implemented_yet = "Not implemented yet." |
Definition at line 40 of file messages.hh.
Referenced by lestes::md::instructions::pi_pi2ge_pi::visit_pi_bm(), lestes::md::instructions::pi_pi2ge_pi::visit_pi_divrni(), lestes::md::instructions::pi_pi2ge_pi::visit_pi_divrpi(), lestes::md::instructions::pi_pi2ge_pi::visit_pi_divrz(), lestes::md::instructions::pi_pi2ge_pi::visit_pi_iba(), lestes::md::instructions::pi_pi2ge_pi::visit_pi_ibe(), lestes::md::instructions::pi_pi2ge_pi::visit_pi_ibg(), lestes::md::instructions::pi_pi2ge_pi::visit_pi_ibl(), lestes::md::instructions::pi_pi2ge_pi::visit_pi_ibm(), lestes::md::instructions::pi_pi2ge_pi::visit_pi_ibn(), lestes::md::instructions::pi_pi2ge_pi::visit_pi_ibne(), lestes::md::instructions::pi_pi2ge_pi::visit_pi_ibng(), lestes::md::instructions::pi_pi2ge_pi::visit_pi_ibnl(), lestes::md::instructions::pi_pi2ge_pi::visit_pi_icall(), and lestes::md::instructions::pi_pi2ge_pi::visit_pi_icallv().
1.5.1-20070107