| 42 | } |
| 43 | |
| 44 | inline void TestError() { |
| 45 | TErrClass::TPool pool(TDefaultAllocator::Instance()); |
| 46 | TErrClass* f = new (&pool) TErrClass(false); |
| 47 | |
| 48 | delete f; |
| 49 | |
| 50 | bool wasError = false; |
| 51 | |
| 52 | try { |
| 53 | new (&pool) TErrClass(true); |
| 54 | } catch (...) { |
| 55 | wasError = true; |
| 56 | } |
| 57 | |
| 58 | UNIT_ASSERT(wasError); |
| 59 | UNIT_ASSERT_EQUAL(f, new (&pool) TErrClass(false)); |
| 60 | } |
| 61 | |
| 62 | inline void TestAllocate() { |
| 63 | TClass::TPool pool(TDefaultAllocator::Instance()); |
nothing calls this directly
no test coverage detected