12 class thread_selftest :
public thread {
17 m_event.set_state(
true);
26 PFC_ASSERT(!
"Should not get here");
29 PFC_ASSERT(fabs(timer.
query() - 1.0) < 0.1);
31 PFC_ASSERT(fabs(timer.
query() - 2.0) < 0.1);
43 thread_selftest t; t.selftest();
49 PFC_STATIC_ASSERT(
sizeof(
t_uint8) == 1);
50 PFC_STATIC_ASSERT(
sizeof(
t_uint16) == 2);
51 PFC_STATIC_ASSERT(
sizeof(
t_uint32) == 4);
52 PFC_STATIC_ASSERT(
sizeof(
t_uint64) == 8);
54 PFC_STATIC_ASSERT(
sizeof(
t_int8) == 1);
55 PFC_STATIC_ASSERT(
sizeof(
t_int16) == 2);
56 PFC_STATIC_ASSERT(
sizeof(
t_int32) == 4);
57 PFC_STATIC_ASSERT(
sizeof(
t_int64) == 8);
59 PFC_STATIC_ASSERT(
sizeof(
t_float32) == 4);
60 PFC_STATIC_ASSERT(
sizeof(
t_float64) == 8);
62 PFC_STATIC_ASSERT(
sizeof(
t_size) ==
sizeof(
void*));
63 PFC_STATIC_ASSERT(
sizeof(
t_ssize) ==
sizeof(
void*));
65 PFC_STATIC_ASSERT(
sizeof(
wchar_t) == 2 ||
sizeof(
wchar_t) == 4);
67 PFC_STATIC_ASSERT(
sizeof(
GUID) == 16);
71 t_asdf::iterator iter = asdf._first_var();
72 t_asdf::const_iterator iter2 = asdf._first_var();
74 PFC_string_formatter() <<
"foo" << 1337 << foo();
82 debugLog out; out <<
"PFC selftest OK";
IMPORTANT: all classes derived from thread must call waitTillDone() in their destructor, to avoid object destruction during a virtual function call!
t_size add_item(const t_item &item)
t_storage & add_item(t_param const &p_item)
pfc::sized_int_t< sizeof(size_t) >::t_signed t_ssize
bool wait_for(double p_timeout_seconds)
Returns true when signaled, false on timeout.
void add_string_(const char *str)
pfc::string_base & operator<<(pfc::string_base &p_fmt, foo p_source)