Revision 477, 449 bytes
(checked in by mido, 15 years ago)
|
panove, vite, jak jsem peclivej na upravu kodu.. snad se vam bude libit:) konfigurace je v souboru /system/astylerc
|
Rev | Line | |
---|
[418] | 1 | #include "TestList.h" |
---|
| 2 | #include "Test.h" |
---|
| 3 | |
---|
| 4 | #include <cassert> |
---|
| 5 | |
---|
| 6 | namespace UnitTest { |
---|
| 7 | |
---|
[477] | 8 | TestList::TestList() |
---|
| 9 | : m_head ( 0 ) |
---|
| 10 | , m_tail ( 0 ) { |
---|
[418] | 11 | } |
---|
| 12 | |
---|
[477] | 13 | void TestList::Add ( Test* test ) { |
---|
| 14 | if ( m_tail == 0 ) { |
---|
| 15 | assert ( m_head == 0 ); |
---|
| 16 | m_head = test; |
---|
| 17 | m_tail = test; |
---|
| 18 | } else { |
---|
| 19 | m_tail->next = test; |
---|
| 20 | m_tail = test; |
---|
| 21 | } |
---|
[418] | 22 | } |
---|
| 23 | |
---|
[477] | 24 | Test* TestList::GetHead() const { |
---|
| 25 | return m_head; |
---|
[418] | 26 | } |
---|
| 27 | |
---|
[477] | 28 | ListAdder::ListAdder ( TestList& list, Test* test ) { |
---|
| 29 | list.Add ( test ); |
---|
[418] | 30 | } |
---|
| 31 | |
---|
| 32 | } |
---|