1 |
#include "../../String/String.h"
|
2 |
#include "../../String/StringInput.h"
|
3 |
#include "../../System/System.h"
|
4 |
#include "../../LinkedList/StringLinkedList.h"
|
5 |
#include "LinkedListTest.h"
|
6 |
#include "../../System/SystemDefine.h"
|
7 |
|
8 |
|
9 |
LinkedListTest::LinkedListTest(){}
|
10 |
LinkedListTest::~LinkedListTest(){}
|
11 |
|
12 |
void LinkedListTest::run()
|
13 |
{
|
14 |
StringLinkedList *stringLinkedList = new StringLinkedList();
|
15 |
|
16 |
stringLinkedList->addLast("arne");
|
17 |
|
18 |
String arne="arneStringR";
|
19 |
|
20 |
stringLinkedList->addLast(arne);
|
21 |
|
22 |
String *arneNew = new String("kalleANKA");
|
23 |
|
24 |
stringLinkedList->addLast(arneNew);
|
25 |
|
26 |
for ( int i=0; i<stringLinkedList->size() ; i++ )
|
27 |
{
|
28 |
System::println(stringLinkedList->getElement(i));
|
29 |
}
|
30 |
|
31 |
|
32 |
delete arneNew;
|
33 |
|
34 |
delete stringLinkedList;
|
35 |
|
36 |
} |