updated tests to current version
This commit is contained in:
@@ -2,21 +2,21 @@
|
||||
TOP = ../../../..
|
||||
include $(TOP)/config/CONFIG_BASE
|
||||
|
||||
SRCS.c += ../resourceLibTest.cc
|
||||
SRCS.c += ../tsDLListBench.cc
|
||||
SRCS.c += ../tsDLListTest.cc
|
||||
SRCS.c += ../tsSLListBench.cc
|
||||
SRCS.c += ../tsSLListTest.cc
|
||||
SRCS.cc += ../resourceLibTest.cc
|
||||
SRCS.cc += ../tsDLListBench.cc
|
||||
SRCS.cc += ../tsDLListTest.cc
|
||||
SRCS.cc += ../tsSLListBench.cc
|
||||
SRCS.cc += ../tsSLListTest.cc
|
||||
|
||||
TARGETS += resourceLibTest
|
||||
TARGETS += tsDLListBench
|
||||
TARGETS += tsDLListTest
|
||||
TARGETS += tsSLListTest
|
||||
TARGETS += buildHere
|
||||
#TARGETS += resourceLibTest
|
||||
#TARGETS += tsDLListBench
|
||||
#TARGETS += tsDLListTest
|
||||
#TARGETS += tsSLListTest
|
||||
|
||||
include $(TOP)/config/RULES.Unix
|
||||
|
||||
ifdef fred
|
||||
all: resourceLibTest tsDLListBench tsDLListTest tsSLListBench tsSLListTest
|
||||
buildHere: resourceLibTest tsDLListBench tsDLListTest tsSLListBench tsSLListTest
|
||||
|
||||
resourceLibTest: resourceLibTest.o
|
||||
$(LINK.cc) -o $@ $<
|
||||
@@ -32,5 +32,4 @@ tsSLListBench: tsSLListBench.o
|
||||
|
||||
tsSLListTest: tsSLListTest.o
|
||||
$(LINK.cc) -o $@ $<
|
||||
endif
|
||||
|
||||
|
||||
@@ -35,9 +35,9 @@ main ()
|
||||
|
||||
list.add(*pFred);
|
||||
list.add(*pFredII);
|
||||
pFredBack = list.first();
|
||||
pFredBack = iter();
|
||||
assert(pFredBack == pFred);
|
||||
pFredBack = list.last();
|
||||
pFredBack = iter();
|
||||
assert(pFredBack == pFredII);
|
||||
list.remove(*pFred);
|
||||
list.add(*pFred);
|
||||
@@ -51,6 +51,7 @@ main ()
|
||||
list.add(* new fred("C"));
|
||||
list.add(* new fred("D"));
|
||||
|
||||
iter.reset();
|
||||
while (pFredBack = iter()) {
|
||||
pFredBack->show();
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#include <tsSLList.h>
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
|
||||
class fred : public tsSLNode<fred> {
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#include <tsSLList.h>
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
|
||||
class fred : public tsSLNode<fred> {
|
||||
public:
|
||||
@@ -36,12 +37,12 @@ main ()
|
||||
list.add(*pFredII);
|
||||
pFredBack = iter();
|
||||
assert(pFredBack == pFredII);
|
||||
list.remove(*pFred); // removes pFredII
|
||||
list.add(*pFredII);
|
||||
pFredBack = list.get();
|
||||
assert (pFredBack == pFredII);
|
||||
list.remove(*pFredII); // removes *pFred !!
|
||||
list.add(*pFred);
|
||||
pFredBack = list.get();
|
||||
assert (pFredBack == pFred);
|
||||
pFredBack = list.get();
|
||||
assert (pFredBack == pFredII);
|
||||
list.add(*pFredII);
|
||||
list.add(*pFred);
|
||||
iter.reset();
|
||||
|
||||
@@ -35,9 +35,9 @@ main ()
|
||||
|
||||
list.add(*pFred);
|
||||
list.add(*pFredII);
|
||||
pFredBack = list.first();
|
||||
pFredBack = iter();
|
||||
assert(pFredBack == pFred);
|
||||
pFredBack = list.last();
|
||||
pFredBack = iter();
|
||||
assert(pFredBack == pFredII);
|
||||
list.remove(*pFred);
|
||||
list.add(*pFred);
|
||||
@@ -51,6 +51,7 @@ main ()
|
||||
list.add(* new fred("C"));
|
||||
list.add(* new fred("D"));
|
||||
|
||||
iter.reset();
|
||||
while (pFredBack = iter()) {
|
||||
pFredBack->show();
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#include <tsSLList.h>
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
#include <time.h>
|
||||
|
||||
class fred : public tsSLNode<fred> {
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
|
||||
#include <tsSLList.h>
|
||||
#include <assert.h>
|
||||
#include <stdio.h>
|
||||
|
||||
class fred : public tsSLNode<fred> {
|
||||
public:
|
||||
@@ -36,12 +37,12 @@ main ()
|
||||
list.add(*pFredII);
|
||||
pFredBack = iter();
|
||||
assert(pFredBack == pFredII);
|
||||
list.remove(*pFred); // removes pFredII
|
||||
list.add(*pFredII);
|
||||
pFredBack = list.get();
|
||||
assert (pFredBack == pFredII);
|
||||
list.remove(*pFredII); // removes *pFred !!
|
||||
list.add(*pFred);
|
||||
pFredBack = list.get();
|
||||
assert (pFredBack == pFred);
|
||||
pFredBack = list.get();
|
||||
assert (pFredBack == pFredII);
|
||||
list.add(*pFredII);
|
||||
list.add(*pFred);
|
||||
iter.reset();
|
||||
|
||||
Reference in New Issue
Block a user