/[escript]/trunk/escript/test/DataTestCase.cpp
ViewVC logotype

Contents of /trunk/escript/test/DataTestCase.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2147 - (show annotations)
Wed Dec 10 04:41:26 2008 UTC (11 years ago) by jfenwick
File size: 35247 byte(s)
Made some changes to c++ unit tests to accomodate AUTOLAZY.
whereZero and whereNonZero can now work with lazy data.
There are some double frees if AUTOLAZY is turned on so don't use it yet.
1
2 /*******************************************************
3 *
4 * Copyright (c) 2003-2008 by University of Queensland
5 * Earth Systems Science Computational Center (ESSCC)
6 * http://www.uq.edu.au/esscc
7 *
8 * Primary Business: Queensland, Australia
9 * Licensed under the Open Software License version 3.0
10 * http://www.opensource.org/licenses/osl-3.0.php
11 *
12 *******************************************************/
13
14
15 #include <iostream>
16 #if defined (_WIN32) && defined (__INTEL_COMPILER)
17 #include <mathimf.h>
18 #else
19 #include <math.h>
20 #endif
21
22 #include "DataTestCase.h"
23
24 #include "escript/FunctionSpace.h"
25 #include "esysUtils/EsysException.h"
26
27 #include "escript/Data.h"
28 #include "escript/DataLazy.h"
29 #include "escript/EscriptParams.h"
30
31 #define AUTOLAZYON setEscriptParamInt("AUTOLAZY",1);
32 #define AUTOLAZYOFF setEscriptParamInt("AUTOLAZY",0);
33 #define CHECKAUTOLAZY (getEscriptParamInt("AUTOLAZY")==1)
34 #define SAVELAZYSTATE int LAZYSTATE=getEscriptParamInt("AUTOLAZY");
35 #define RESTORELAZYSTATE setEscriptParamInt("AUTOLAZY",LAZYSTATE);
36
37
38
39 using namespace std;
40 using namespace CppUnitTest;
41 using namespace escript;
42 using namespace esysUtils;
43 using namespace escript::DataTypes;
44
45 void DataTestCase::setUp() {
46 //
47 // This is called before each test is run
48 }
49
50 void DataTestCase::tearDown() {
51 //
52 // This is called after each test has been run
53 }
54
55
56
57 namespace
58 {
59
60 inline
61 DataTypes::ValueType::reference
62 getRef(Data& d,int s1, int p1, int x, int y)
63 {
64 return d.getDataAtOffset(d.getDataOffset(s1,p1)+getRelIndex(d.getDataPointShape(),x,y));
65 }
66
67 inline
68 DataTypes::ValueType::reference
69 getRef(Data& d, int x, int y)
70 {
71 return d.getDataAtOffset(getRelIndex(d.getDataPointShape(),x,y));
72 }
73
74 }
75
76
77 void DataTestCase::testCopyingWorker(bool delayed)
78 {
79
80 using namespace escript::DataTypes;
81 cout << endl;
82
83 DataTypes::ShapeType shape;
84 shape.push_back(2);
85 shape.push_back(3);
86 DataTypes::ValueType data(DataTypes::noValues(shape),1);
87 const int NUMDATS=3;
88 Data* dats[NUMDATS];
89 const char* strs[]={"DataConstant", "DataTagged", "DataExpanded"};
90 dats[0]=new Data(new DataConstant(FunctionSpace(),shape,data));
91 dats[1]=new Data(new DataTagged(FunctionSpace(),shape,data));
92 dats[2]=new Data(new DataExpanded(FunctionSpace(),shape,data));
93 if (delayed)
94 {
95 dats[0]->delaySelf();
96 dats[1]->delaySelf();
97 dats[2]->delaySelf();
98 }
99
100 for (int k=0;k<NUMDATS;++k)
101 {
102 cout << "\tTest deep copy " << strs[k] << endl;
103 Data* d=dats[k];
104 Data deep=d->copySelf(); // test self copy
105 if (delayed)
106 {
107 assert(deep.isLazy());
108 }
109 for (int i=0;i<DataTypes::noValues(shape);++i)
110 {
111 if (d->getDataAtOffset(i)!=deep.getDataAtOffset(i))
112 assert(false);
113 }
114 if (delayed)
115 {
116 d->delaySelf();
117 }
118 d->setToZero();
119 if (delayed)
120 {
121 assert(d->isLazy());
122 }
123 for (int i=0;i<DataTypes::noValues(shape);++i)
124 {
125 if (d->getDataAtOffset(i)==deep.getDataAtOffset(i))
126 assert(false);
127 }
128 if (delayed)
129 {
130 d->delaySelf();
131 deep.delaySelf();
132 }
133 d->copy(deep); // test copy from object
134 if (delayed)
135 {
136 assert(d->isLazy());
137 }
138 for (int i=0;i<DataTypes::noValues(shape);++i)
139 {
140 if (d->getDataAtOffset(i)!=deep.getDataAtOffset(i))
141 assert(false);
142 }
143 d->setToZero();
144 for (int i=0;i<DataTypes::noValues(shape);++i)
145 {
146 if (d->getDataAtOffset(i)==deep.getDataAtOffset(i))
147 assert(false);
148 }
149 delete dats[k];
150 }
151
152
153
154
155
156
157 }
158
159
160 void DataTestCase::testSlicingWorker(bool delayed)
161 {
162
163 using namespace escript::DataTypes;
164 cout << endl;
165 {
166 DataTypes::ShapeType viewShape;
167 viewShape.push_back(2);
168 viewShape.push_back(3);
169
170 const int NUMDATS=3;
171 const char* strs[]={"DataConstant", "DataTagged","DataExpanded"};
172 bool tags[]={false,true,false}; // is the slice of this data supposed to be tagged
173 Data* dats[NUMDATS];
174 for (int k=0;k<NUMDATS;++k)
175 {
176 dats[k]=new Data(1.3, viewShape);
177 }
178 dats[1]->tag();
179 dats[2]->expand();
180 for (int k=0;k<NUMDATS;++k)
181 {
182 Data* temp=dats[k];
183 dats[k]=new Data(dats[k]->delay());
184 delete temp;
185 }
186 for (int k=0;k<NUMDATS;++k)
187 {
188 cout << "\t\tTest get-slicing " << strs[k] << endl;
189 dats[k]->getDataAtOffset(dats[k]->getDataOffset(0,0)+getRelIndex(viewShape,0,0))=1.0;
190 dats[k]->getDataAtOffset(dats[k]->getDataOffset(0,0)+getRelIndex(viewShape,1,1))=2.0;
191
192 DataTypes::RegionType region;
193 region.push_back(DataTypes::RegionType::value_type(0,0));
194 region.push_back(DataTypes::RegionType::value_type(0,0));
195
196 Data slice1(dats[k]->getSlice(region));
197
198 if (tags[k]) {assert(slice1.isTagged());}
199 assert(slice1.getDataPointRank()==0);
200 assert(slice1.getDataPoint(0,0)==1.0);
201
202 //
203 // create a rank 2 slice with one value
204
205 region.clear();
206 region.push_back(DataTypes::RegionType::value_type(0,1));
207 region.push_back(DataTypes::RegionType::value_type(0,1));
208
209 Data slice2(dats[k]->getSlice(region));
210
211 //cout << slice2.toString() << endl;
212
213 if (tags[k]) {assert(slice2.isTagged());}
214 assert(slice2.getDataPointRank()==2);
215
216 assert(slice2.getDataAtOffset(slice2.getDataOffset(0,0)+getRelIndex(slice2.getDataPointShape(),0,0))==1.0);
217
218 //
219 // create a rank 2 slice with four values
220
221 region.clear();
222 region.push_back(DataTypes::RegionType::value_type(0,2));
223 region.push_back(DataTypes::RegionType::value_type(0,2));
224
225 Data slice3(dats[k]->getSlice(region));
226
227 //cout << slice3.toString() << endl;
228
229 if (tags[k]) {assert(slice3.isTagged());}
230 assert(slice3.getDataPointRank()==2);
231 assert(getRef(slice3,0,0,0,0)==1.0);
232 assert(getRef(slice3,0,0,0,1)==1.3);
233 assert(getRef(slice3,0,0,1,0)==1.3);
234 assert(getRef(slice3,0,0,1,1)==2.0);
235 }
236
237 // now some extra tests for tagged data (dats[1])
238
239 //
240 // add a value for tag "1"
241
242 DataTypes::ValueType viewData(6);
243 for (int i=0;i<viewData.size();i++) {
244 viewData[i]=i;
245 }
246 dats[1]->setTaggedValueFromCPP(1, viewShape, viewData);
247
248 //
249 // create a full slice
250
251 DataTypes::RegionType region;
252 region.push_back(DataTypes::RegionType::value_type(0,2));
253 region.push_back(DataTypes::RegionType::value_type(0,3));
254
255 Data slice4(dats[1]->getSlice(region));
256
257 assert(slice4.isTagged());
258 assert(slice4.getDataPointRank()==2);
259 assert(getRef(slice4,0,0,0,0)==0);
260 assert(getRef(slice4,0,0,0,1)==2);
261 assert(getRef(slice4,0,0,0,2)==4);
262 assert(getRef(slice4,0,0,1,0)==1);
263 assert(getRef(slice4,0,0,1,1)==3);
264 assert(getRef(slice4,0,0,1,2)==5);
265
266 for (int k=0;k<NUMDATS;++k)
267 {
268 delete dats[k];
269 }
270 }
271
272 {
273 DataTypes::ShapeType viewShape;
274 viewShape.push_back(2);
275 viewShape.push_back(3);
276
277 const int NUMDATS=3;
278 const char* strs[]={"DataConstant", "DataTagged","DataExpanded"};
279 Data* dats[NUMDATS];
280 Data* src[NUMDATS];
281 for (int k=0;k<NUMDATS;++k)
282 {
283 dats[k]=new Data(1.3, viewShape);
284 src[k]=new Data(10,DataTypes::scalarShape);
285 }
286 dats[1]->tag();
287 src[1]->tag();
288 dats[2]->expand();
289 src[2]->expand();
290 if (delayed)
291 {
292 for(int k=0;k<NUMDATS;++k)
293 {
294 if (delayed)
295 {
296 Data* temp=dats[k];
297 dats[k]=new Data(dats[k]->delay()); // coz delay returns an object not a pointer
298 delete temp;
299 temp=src[k];
300 src[k]=new Data(src[k]->delay());
301 delete temp;
302 }
303 }
304 }
305 for (int k=0;k<NUMDATS;++k)
306 {
307 cout << "\t\tTest set-slicing " << strs[k] << endl;
308 Data target(1.3,viewShape);
309 if (k==2) {target.expand();}
310 DataTypes::RegionType region;
311 region.push_back(DataTypes::RegionType::value_type(1,1));
312 region.push_back(DataTypes::RegionType::value_type(1,1));
313 target.setSlice(*(src[k]),region);
314 assert(getRef(target,0,0,1,1)==src[k]->getDataPoint(0,0));
315 }
316
317 // some extra tests on tagged data
318
319 //
320 // add a value for tag "1" to target
321
322 DataTypes::ValueType viewData(6);
323 for (int i=0;i<viewData.size();i++) {
324 viewData[i]=i;
325 }
326
327 Data target(1.3,viewShape,FunctionSpace(),false);
328 target.tag();
329 target.setTaggedValueFromCPP(1, viewShape, viewData);
330
331 //cout << "target:\n" << target.toString() << endl;
332
333 //
334 // set a slice in target from source
335
336 DataTypes::RegionType region;
337 region.push_back(DataTypes::RegionType::value_type(0,0));
338 region.push_back(DataTypes::RegionType::value_type(1,1));
339
340 target.setSlice(*src[1],region);
341
342 assert(target.isTagged());
343 assert(target.getDataPointRank()==2);
344 assert(getRef(target,0,0,0,0)==0);
345 assert(getRef(target,0,0,0,1)==src[1]->getDataPoint(0,0));
346 assert(getRef(target,0,0,0,2)==4);
347 assert(getRef(target,0,0,1,0)==1);
348 assert(getRef(target,0,0,1,1)==3);
349 assert(getRef(target,0,0,1,2)==5);
350
351 //
352 // add a value for tag "2" to source
353
354 DataTypes::ShapeType viewShape2;
355 DataTypes::ValueType viewData2(1);
356 viewData2[0]=6;
357 src[1]->setTaggedValueFromCPP(2, viewShape2, viewData2);
358
359 region.clear();
360 region.push_back(DataTypes::RegionType::value_type(0,0));
361 region.push_back(DataTypes::RegionType::value_type(1,1));
362
363 target.setSlice(*src[1],region);
364
365 assert(target.isTagged());
366 assert(target.getDataPointRank()==2);
367
368 // use a non-existant tag so we get a pointer to the default value
369 // ie: the first element in the data array
370 DataAbstract::ValueType::value_type* targetData=target.getSampleDataByTag(9);
371 for (int i=0; i<target.getLength(); i++) {
372 assert(targetData[i]>=0);
373 }
374 assert(targetData[0]==1.3);
375 assert(targetData[1]==1.3);
376 assert(targetData[2]==10);
377 assert(targetData[3]==1.3);
378 assert(targetData[4]==1.3);
379 assert(targetData[5]==1.3);
380 assert(targetData[6]==0);
381 assert(targetData[7]==1);
382 assert(targetData[8]==10);
383 assert(targetData[9]==3);
384 assert(targetData[10]==4);
385 assert(targetData[11]==5);
386 assert(targetData[12]==1.3);
387 assert(targetData[13]==1.3);
388 assert(targetData[14]==6);
389 assert(targetData[15]==1.3);
390 assert(targetData[16]==1.3);
391 assert(targetData[17]==1.3);
392
393
394 for (int k=0;k<NUMDATS;++k)
395 {
396 delete dats[k];
397 delete src[k];
398 }
399
400 }
401
402 }
403
404 // This is to test new copy routines, existing tests should remain where they are
405 void DataTestCase::testCopying()
406 {
407 cout << "\n\tReadyData." << endl;
408 testCopyingWorker(false);
409 cout << "\n\tLazyData." << endl;
410 testCopyingWorker(true);
411 }
412
413 void DataTestCase::testSlicing() {
414 cout << "\n\tReadyData." << endl;
415 testSlicingWorker(false);
416 cout << "\n\tLazyData." << endl;
417 testSlicingWorker(true);
418 }
419
420
421 void DataTestCase::testSomeDriver(bool autolazy)
422 {
423 cout << endl;
424 SAVELAZYSTATE
425 if (autolazy)
426 {
427 AUTOLAZYON
428 cout << "\tNow testing using autolazy." << endl;
429 }
430 cout << "\tCreate a Data object." << endl;
431
432 DataTypes::ShapeType viewShape;
433 viewShape.push_back(3);
434 DataTypes::ValueType viewData(3);
435 for (int i=0;i<viewShape[0];++i) {
436 viewData[i]=i;
437 }
438
439 bool expanded=true;
440 Data exData(viewData,viewShape,FunctionSpace(),expanded);
441 Data cData(viewData,viewShape);
442 Data result;
443
444 assert(exData.isExpanded());
445 assert(cData.isConstant());
446 assert(result.isEmpty());
447
448 cout << "\tTest some basic operations" << endl;
449 result=exData*cData;
450 cout << CHECKAUTOLAZY << " " << result.isLazy() << " " << result.isExpanded()<< endl;
451 assert(CHECKAUTOLAZY?result.isLazy():result.isExpanded());
452
453 assert(result.Lsup()==4);
454 assert(result.sup()==4);
455 assert(result.inf()==0);
456
457 result=exData+cData;
458 result=exData-cData;
459 result=exData/cData;
460
461 cout << "\tExercise wherePositive method" << endl;
462 assert(!exData.wherePositive().isEmpty());
463
464 cout << "\tExercise copyWithMask method" << endl;
465 exData.copyWithMask(result, exData.wherePositive());
466 assert(!exData.wherePositive().isEmpty());
467 RESTORELAZYSTATE
468
469 }
470
471 void DataTestCase::testSome() {
472 testSomeDriver(false);
473 testSomeDriver(true);
474 }
475
476
477
478 // This method tests to see if resolve() produces results of the correct type
479 void DataTestCase::testResolveType()
480 {
481 cout << endl;
482 cout << "\tTesting resolve()\n";
483 DataTypes::ShapeType viewShape;
484 viewShape.push_back(2);
485 viewShape.push_back(3);
486 viewShape.push_back(4);
487 DataTypes::ValueType viewData(2*3*4);
488 for (int i=0;i<DataTypes::noValues(viewShape);++i) {
489 viewData[i]=i;
490 }
491 Data c1(viewData,viewShape);
492 Data t1(viewData,viewShape);
493 Data e1(viewData,viewShape);
494 t1.tag();
495 e1.expand();
496 c1.delaySelf();
497 t1.delaySelf();
498 e1.delaySelf();
499 Data d1=c1+c1;
500 assert(d1.isLazy());
501 assert((d1.resolve(),d1.isConstant()));
502 d1=c1+t1;
503 assert(d1.isLazy());
504 assert((d1.resolve(),d1.isTagged()));
505 d1=t1+c1;
506 assert(d1.isLazy());
507 assert((d1.resolve(),d1.isTagged()));
508 d1=t1+t1;
509 assert(d1.isLazy());
510 assert((d1.resolve(),d1.isTagged()));
511 d1=c1+e1;
512 assert(d1.isLazy());
513 assert((d1.resolve(),d1.isExpanded()));
514 d1=e1+c1;
515 assert(d1.isLazy());
516 assert((d1.resolve(),d1.isExpanded()));
517 d1=e1+t1;
518 assert(d1.isLazy());
519 assert((d1.resolve(),d1.isExpanded()));
520 d1=t1+e1;
521 assert(d1.isLazy());
522 assert((d1.resolve(),d1.isExpanded()));
523 d1=e1+e1;
524 assert(d1.isLazy());
525 assert((d1.resolve(),d1.isExpanded()));
526 cout << "\tTesting tag()\n";
527 c1.tag();
528 assert(c1.isTagged());
529 t1.tag();
530 assert(t1.isTagged());
531 try
532 {
533 e1.tag();
534 assert(false); // this should have thrown
535 } catch(...) {}
536 cout << "\tTesting expand()\n";
537 Data c2(viewData,viewShape);
538 Data t2(viewData,viewShape);
539 Data e2(viewData,viewShape);
540 t2.tag();
541 e2.expand();
542 c2.delaySelf();
543 t2.delaySelf();
544 e2.delaySelf();
545 c2.expand();
546 assert(c2.isExpanded());
547 t2.expand();
548 assert(t2.isExpanded());
549 e2.expand();
550 assert(e2.isExpanded());
551 }
552
553 void DataTestCase::testDataConstant() {
554
555 cout << endl;
556
557 cout << "\tCreate a DataConstant object." << endl;
558
559 DataTypes::ShapeType viewShape;
560 viewShape.push_back(2);
561 viewShape.push_back(3);
562 viewShape.push_back(4);
563 DataTypes::ValueType viewData(2*3*4);
564 for (int i=0;i<DataTypes::noValues(viewShape);++i) {
565 viewData[i]=i;
566 }
567
568 Data left(viewData,viewShape);
569 Data right(viewData,viewShape);
570 Data result;
571
572 cout << "\tTest some basic operations" << endl;
573
574 result=left-right;
575
576 assert(left.isConstant());
577 assert(right.isConstant());
578 assert(result.isConstant());
579
580 result=left+right;
581
582 assert(left.isConstant());
583 assert(right.isConstant());
584 assert(result.isConstant());
585
586 assert(!result.isExpanded());
587 assert(!result.isTagged());
588
589 }
590
591 void DataTestCase::testDataTagged() {
592
593 cout << endl;
594
595 {
596
597 cout << "\tCreate a DataTagged object with a default value only." << endl;
598
599 DataTypes::ShapeType viewShape;
600 viewShape.push_back(3);
601
602 DataTypes::ValueType viewData(3);
603 for (int i=0;i<viewShape[0];i++) {
604 viewData[i]=i;
605 }
606 int arr[1]={1}; // iso c++ does not like empty arrays
607 DataTagged* dt=new DataTagged(FunctionSpace(),viewShape,arr,viewData);
608 Data myData(dt);
609
610 assert(!myData.isEmpty());
611 assert(myData.isTagged());
612 assert(myData.getTagNumber(0)==1);
613 assert(myData.getDataPointRank()==1);
614 assert(myData.getLength()==3);
615
616 assert(myData.getNoValues()==3);
617 assert(myData.getDataAtOffset(0)==0.0);
618 assert(myData.getDataAtOffset(1)==1.0);
619 assert(myData.getDataAtOffset(2)==2.0);
620
621 double* sampleData=myData.getSampleData(0);
622 for (int i=0; i<myData.getNoValues(); i++) {
623 assert(sampleData[i]==i);
624 }
625 // use a non-existent tag so we get a pointer to
626 // the first element of the data array
627 sampleData=myData.getSampleDataByTag(9);
628 for (int i=0; i<myData.getLength(); i++) {
629 assert(sampleData[i]==i);
630 }
631
632 cout << "\tTest setting of a tag and associated value." << endl;
633
634 // value for tag "1"
635 DataTypes::ValueType eTwoData(viewData);
636 // DataArrayView eTwoView(eTwoData, viewShape);
637 for (int i=0;i<viewShape[0];i++) {
638 eTwoData[i]=i+2.0;
639 }
640
641 myData.setTaggedValueFromCPP(1,viewShape, eTwoData);
642
643 assert(myData.getLength()==6);
644
645 int offset=myData.getDataOffset(0,0);
646 assert(offset==3);
647 assert(myData.getDataPointRank()==1);
648 assert(myData.getNoValues()==3);
649
650 assert(myData.getDataAtOffset(offset+0)==2);
651 assert(myData.getDataAtOffset(offset+1)==3);
652 assert(myData.getDataAtOffset(offset+2)==4);
653
654 sampleData=myData.getSampleDataByTag(1);
655 for (int i=0; i<myData.getNoValues(); i++) {
656 assert(sampleData[i]==i+2);
657 }
658
659 }
660
661 {
662
663 cout << "\tCreate a DataTagged object via tag() method." << endl;
664
665 DataTypes::ShapeType viewShape;
666 viewShape.push_back(2);
667 viewShape.push_back(3);
668 Data myData(1.3,viewShape,FunctionSpace(),false);
669 myData.tag();
670
671 assert(!myData.isEmpty());
672 assert(myData.isTagged());
673 assert(myData.getTagNumber(0)==1);
674 assert(myData.getDataPointRank()==2);
675 assert(myData.getLength()==6);
676
677 // check default value
678 assert(!myData.isEmpty());
679 assert(myData.getDataPointRank()==2);
680 assert(myData.getNoValues()==6);
681 assert(myData.getDataPointShape().size()==2);
682 assert(getRef(myData,0,0)==1.3);
683 assert(getRef(myData,0,1)==1.3);
684 assert(getRef(myData,0,2)==1.3);
685 assert(getRef(myData,1,0)==1.3);
686 assert(getRef(myData,1,1)==1.3);
687 assert(getRef(myData,1,2)==1.3);
688
689 // check value for data-point (0,0).
690 // myDataView = myData.getDataPoint(0,0);
691 assert(!myData.isEmpty());
692 // assert(myDataView.getOffset()==0);
693 assert(myData.getDataPointRank()==2);
694 assert(myData.getNoValues()==6);
695 assert(myData.getDataPointShape().size()==2);
696 assert(getRef(myData,0,0)==1.3);
697 assert(getRef(myData,0,1)==1.3);
698 assert(getRef(myData,0,2)==1.3);
699 assert(getRef(myData,1,0)==1.3);
700 assert(getRef(myData,1,1)==1.3);
701 assert(getRef(myData,1,2)==1.3);
702
703 }
704
705 }
706
707 void DataTestCase::testDataTaggedExceptions() {
708
709 cout << endl;
710
711 cout << "\tTest DataTagged exceptions." << endl;
712
713 Data myData;
714
715 try {
716 myData.getSampleDataByTag(0);;
717 assert(false);
718 }
719 catch (EsysException&) {
720 //cout << e.what() << endl;
721 assert(true);
722 }
723
724 try {
725 myData.setTaggedValueFromCPP(0,DataTypes::ShapeType(), DataTypes::ValueType());;
726 assert(false);
727 }
728 catch (EsysException&) {
729 //cout << e.what() << endl;
730 assert(true);
731 }
732
733 }
734
735 void DataTestCase::testConstructors() {
736
737 cout << endl;
738
739 DataTypes::ShapeType viewShape;
740 {
741 cout << "\tCreate an Empty Data object" << endl;
742 Data temp(1.3,viewShape,FunctionSpace(),false);
743 }
744 {
745 cout << "\tCreate a rank 2 Data object" << endl;
746 viewShape.push_back(2);
747 viewShape.push_back(3);
748 Data temp(1.3,viewShape,FunctionSpace(),false);
749 }
750 }
751
752
753 void DataTestCase::testOperations()
754 {
755
756 cout << endl;
757
758 // define the shape for the test data
759 DataTypes::ShapeType shape;
760 shape.push_back(2);
761 shape.push_back(3);
762
763 // allocate the data
764 DataTypes::ValueType data(DataTypes::noValues(shape),0);
765
766 // assign values to the data
767 for (int i=0;i<shape[0];i++) {
768 for (int j=0;j<shape[1];j++) {
769 data[getRelIndex(shape,i,j)]=getRelIndex(shape,i,j);
770 }
771 }
772
773
774
775 Data dats[]={Data(data,shape,FunctionSpace(),false),
776 Data(data,shape,FunctionSpace(),false),
777 Data(data,shape,FunctionSpace(),true),
778 Data(data,shape,FunctionSpace(),false),
779 Data(data,shape,FunctionSpace(),false),
780 Data(data,shape,FunctionSpace(),true)};
781 const int NUMDATS=6;
782 const int LAZY=3; // where do the lazy objects start?
783
784 // Data baseEx(data,shape,FunctionSpace(),true);
785 // Data baseCon(data,shape,FunctionSpace(),false);
786 // Data baseTag(data,shape,FunctionSpace(),false);
787 Data& baseCon=dats[0];
788 Data& baseTag=dats[1];
789 Data& baseEx=dats[2];
790 baseTag.tag();
791 dats[4].tag();
792 dats[3].delaySelf();
793 dats[4].delaySelf();
794 dats[5].delaySelf();
795
796 assert(baseEx.isExpanded());
797 assert(baseCon.isConstant());
798 assert(baseTag.isTagged());
799
800 Data results[NUMDATS];
801 // Data& resultEx=results[0];
802 // Data& resultCon=results[1];
803 // Data& resultTag=results[2];
804
805 // create 0 <= smalldata <= 1 for testing trig functions
806
807 DataTypes::ValueType smalldata(DataTypes::noValues(shape),0);
808
809 // assign values to the data
810 for (int i=0;i<shape[0];i++) {
811 for (int j=0;j<shape[1];j++) {
812 smalldata[getRelIndex(shape,i,j)]=(i==0 && j==0)?0:1.0/(getRelIndex(shape,i,j)+1);
813 }
814 }
815 Data sdats[]={Data(smalldata,shape,FunctionSpace(),false),
816 Data(smalldata,shape,FunctionSpace(),false),
817 Data(smalldata,shape,FunctionSpace(),true),
818 Data(smalldata,shape,FunctionSpace(),false),
819 Data(smalldata,shape,FunctionSpace(),false),
820 Data(smalldata,shape,FunctionSpace(),true)};
821 sdats[1].tag();
822 sdats[4].tag();
823 sdats[3].delaySelf();
824 sdats[4].delaySelf();
825 sdats[5].delaySelf();
826
827
828
829 // test unary operations
830
831 double tmp;
832 cout << "\tTest Data::pow." << endl;
833 Data power(3.0,shape,FunctionSpace(),true);
834 for (int z=0;z<NUMDATS;++z)
835 {
836 results[z].copy(dats[z].powD(power));
837 if (z>=LAZY)
838 {
839 assert(results[z].isLazy());
840 }
841 }
842 for (int i=0;i<shape[0];i++) {
843 for (int j=0;j<shape[1];j++) {
844 tmp=pow((double)data[getRelIndex(shape,i,j)],(double)3.0);
845 for (int z=0;z<NUMDATS;++z)
846 {
847 assert(std::abs(getRef(results[z],i,j) - tmp) <= REL_TOL*std::abs(tmp));
848 }
849 }
850 }
851
852 cout << "\tTest Data::sin." << endl;
853 for (int z=0;z<NUMDATS;++z)
854 {
855 results[z].copy(dats[z].sin());
856 if (z>=LAZY)
857 {
858 assert(results[z].isLazy());
859 }
860 }
861 for (int i=0;i<shape[0];i++) {
862 for (int j=0;j<shape[1];j++) {
863 tmp=sin((double)data[getRelIndex(shape,i,j)]);
864 for (int z=0;z<NUMDATS;++z)
865 {
866 assert(std::abs(getRef(results[z],i,j) - tmp) <= REL_TOL*std::abs(tmp));
867 }
868 }
869 }
870
871 cout << "\tTest Data::cos." << endl;
872 for (int z=0;z<NUMDATS;++z)
873 {
874 results[z].copy(dats[z].cos());
875 if (z>=LAZY)
876 {
877 assert(results[z].isLazy());
878 }
879 }
880 for (int i=0;i<shape[0];i++) {
881 for (int j=0;j<shape[1];j++) {
882 tmp=cos((double)data[getRelIndex(shape,i,j)]);
883 for (int z=0;z<NUMDATS;++z)
884 {
885 assert(std::abs(getRef(results[z],i,j) - tmp) <= REL_TOL*std::abs(tmp));
886 }
887 }
888 }
889
890 cout << "\tTest Data::tan." << endl;
891 for (int z=0;z<NUMDATS;++z)
892 {
893 results[z].copy(dats[z].tan());
894 if (z>=LAZY)
895 {
896 assert(results[z].isLazy());
897 }
898 }
899 for (int i=0;i<shape[0];i++) {
900 for (int j=0;j<shape[1];j++) {
901 tmp=tan((double)data[getRelIndex(shape,i,j)]);
902 for (int z=0;z<NUMDATS;++z)
903 {
904 assert(std::abs(getRef(results[z],i,j) - tmp) <= REL_TOL*std::abs(tmp));
905 }
906 }
907 }
908
909 cout << "\tTest Data::asin." << endl;
910 for (int z=0;z<NUMDATS;++z)
911 {
912 results[z].copy(sdats[z].asin());
913 if (z>=LAZY)
914 {
915 assert(results[z].isLazy());
916 }
917 }
918 for (int i=0;i<shape[0];i++) {
919 for (int j=0;j<shape[1];j++) {
920 tmp=asin((double)smalldata[getRelIndex(shape,i,j)]);
921 for (int z=0;z<NUMDATS;++z)
922 {
923 assert(std::abs(getRef(results[z],i,j) - tmp) <= REL_TOL*std::abs(tmp));
924 }
925 }
926 }
927
928 cout << "\tTest Data::acos." << endl;
929 for (int z=0;z<NUMDATS;++z)
930 {
931 results[z].copy(sdats[z].acos());
932 if (z>=LAZY)
933 {
934 assert(results[z].isLazy());
935 }
936 }
937 for (int i=0;i<shape[0];i++) {
938 for (int j=0;j<shape[1];j++) {
939 tmp=acos((double)smalldata[getRelIndex(shape,i,j)]);
940 for (int z=0;z<NUMDATS;++z)
941 {
942 assert(std::abs(getRef(results[z],i,j) - tmp) <= REL_TOL*std::abs(tmp));
943 }
944 }
945 }
946
947 cout << "\tTest Data::atan." << endl;
948 for (int z=0;z<NUMDATS;++z)
949 {
950 results[z].copy(sdats[z].atan());
951 if (z>=LAZY)
952 {
953 assert(results[z].isLazy());
954 }
955 }
956 for (int i=0;i<shape[0];i++) {
957 for (int j=0;j<shape[1];j++) {
958 tmp=atan((double)smalldata[getRelIndex(shape,i,j)]);
959 for (int z=0;z<NUMDATS;++z)
960 {
961 assert(std::abs(getRef(results[z],i,j) - tmp) <= REL_TOL*std::abs(tmp));
962 }
963 }
964 }
965
966 cout << "\tTest Data::sinh." << endl;
967 for (int z=0;z<NUMDATS;++z)
968 {
969 results[z].copy(dats[z].sinh());
970 if (z>=LAZY)
971 {
972 assert(results[z].isLazy());
973 }
974 }
975 for (int i=0;i<shape[0];i++) {
976 for (int j=0;j<shape[1];j++) {
977 tmp=sinh((double)data[getRelIndex(shape,i,j)]);
978 for (int z=0;z<NUMDATS;++z)
979 {
980 assert(std::abs(getRef(results[z],i,j) - tmp) <= REL_TOL*std::abs(tmp));
981 }
982 }
983 }
984
985 cout << "\tTest Data::cosh." << endl;
986 for (int z=0;z<NUMDATS;++z)
987 {
988 results[z].copy(dats[z].cosh());
989 if (z>=LAZY)
990 {
991 assert(results[z].isLazy());
992 }
993 }
994 for (int i=0;i<shape[0];i++) {
995 for (int j=0;j<shape[1];j++) {
996 tmp=cosh((double)data[getRelIndex(shape,i,j)]);
997 for (int z=0;z<NUMDATS;++z)
998 {
999 assert(std::abs(getRef(results[z],i,j) - tmp) <= REL_TOL*std::abs(tmp));
1000 }
1001 }
1002 }
1003
1004 cout << "\tTest Data::tanh." << endl;
1005 for (int z=0;z<NUMDATS;++z)
1006 {
1007 results[z].copy(dats[z].tanh());
1008 if (z>=LAZY)
1009 {
1010 assert(results[z].isLazy());
1011 }
1012 }
1013 for (int i=0;i<shape[0];i++) {
1014 for (int j=0;j<shape[1];j++) {
1015 tmp=tanh((double)data[getRelIndex(shape,i,j)]);
1016 for (int z=0;z<NUMDATS;++z)
1017 {
1018 assert(std::abs(getRef(results[z],i,j) - tmp) <= REL_TOL*std::abs(tmp));
1019 }
1020 }
1021 }
1022
1023 // rather than accomodate the different windows operations directly I'll just use inverse functions
1024 cout << "\tTest Data::asinh." << endl;
1025 for (int z=0;z<NUMDATS;++z)
1026 {
1027 results[z].copy(dats[z].asinh().sinh());
1028 if (z>=LAZY)
1029 {
1030 assert(results[z].isLazy());
1031 }
1032 }
1033 for (int i=0;i<shape[0];i++) {
1034 for (int j=0;j<shape[1];j++) {
1035 tmp=data[getRelIndex(shape,i,j)];
1036 for (int z=0;z<NUMDATS;++z)
1037 {
1038 assert(std::abs(getRef(results[z],i,j) - tmp) <= REL_TOL*std::abs(tmp));
1039 }
1040 }
1041 }
1042
1043 cout << "\tTest Data::acosh." << endl;
1044 for (int z=0;z<NUMDATS;++z)
1045 {
1046 results[z].copy(dats[z].acosh().cosh());
1047 if (z>=LAZY)
1048 {
1049 assert(results[z].isLazy());
1050 }
1051 }
1052 for (int i=0;i<shape[0];i++) {
1053 for (int j=0;j<shape[1];j++) {
1054 if (i==0 && j==0) break;
1055 tmp=data[getRelIndex(shape,i,j)];
1056 for (int z=0;z<NUMDATS;++z)
1057 {
1058 assert(std::abs(getRef(results[z],i,j) - tmp) <= REL_TOL*std::abs(tmp));
1059 }
1060 }
1061 }
1062
1063 cout << "\tTest Data::atanh." << endl;
1064 for (int z=0;z<NUMDATS;++z)
1065 {
1066 results[z].copy(dats[z].tanh().atanh()); // if these are the other way around the results are
1067 if (z>=LAZY) // undefined
1068 {
1069 assert(results[z].isLazy());
1070 }
1071 }
1072 for (int i=0;i<shape[0];i++) {
1073 for (int j=0;j<shape[1];j++) {
1074 tmp=data[getRelIndex(shape,i,j)];
1075 for (int z=0;z<NUMDATS;++z)
1076 {
1077 assert(std::abs(getRef(results[z],i,j) - tmp) <= REL_TOL*std::abs(tmp));
1078 }
1079 }
1080 }
1081
1082 cout << "\tTest Data::log." << endl;
1083 for (int z=0;z<NUMDATS;++z)
1084 {
1085 results[z].copy(dats[z].log());
1086 if (z>=LAZY)
1087 {
1088 assert(results[z].isLazy());
1089 }
1090 }
1091 for (int i=0;i<shape[0];i++) {
1092 for (int j=0;j<shape[1];j++) {
1093 if (i==0 && j==0) break;
1094 tmp=log((double)data[getRelIndex(shape,i,j)]);
1095 for (int z=0;z<NUMDATS;++z)
1096 {
1097 assert(std::abs(getRef(results[z],i,j) - tmp) <= REL_TOL*std::abs(tmp));
1098 }
1099 }
1100 }
1101
1102 cout << "\tTest Data::log10." << endl;
1103 for (int z=0;z<NUMDATS;++z)
1104 {
1105 results[z].copy(dats[z].log10());
1106 if (z>=LAZY)
1107 {
1108 assert(results[z].isLazy());
1109 }
1110 }
1111 for (int i=0;i<shape[0];i++) {
1112 for (int j=0;j<shape[1];j++) {
1113 if (i==0 && j==0) break;
1114 tmp=log10((double)data[getRelIndex(shape,i,j)]);
1115 for (int z=0;z<NUMDATS;++z)
1116 {
1117 assert(std::abs(getRef(results[z],i,j) - tmp) <= REL_TOL*std::abs(tmp));
1118 }
1119 }
1120 }
1121 #if defined (_WIN32) && !defined (__INTEL_COMPILER)
1122 cout << "\tSkip test Data::erf on windows with MSVC compiler." << endl;
1123 #else
1124 cout << "\tTest Data::erf." << endl;
1125 for (int z=0;z<NUMDATS;++z)
1126 {
1127 results[z].copy(dats[z].erf());
1128 if (z>=LAZY)
1129 {
1130 assert(results[z].isLazy());
1131 }
1132 }
1133 for (int i=0;i<shape[0];i++) {
1134 for (int j=0;j<shape[1];j++) {
1135 if (i==0 && j==0) break;
1136 tmp=erf((double)data[getRelIndex(shape,i,j)]);
1137 for (int z=0;z<NUMDATS;++z)
1138 {
1139 assert(std::abs(getRef(results[z],i,j) - tmp) <= REL_TOL*std::abs(tmp));
1140 }
1141 }
1142 }
1143 #endif
1144
1145
1146 cout << "\tTest Data::abs." << endl;
1147 for (int z=0;z<NUMDATS;++z)
1148 {
1149 results[z].copy(dats[z].abs());
1150 if (z>=LAZY)
1151 {
1152 assert(results[z].isLazy());
1153 }
1154 }
1155 for (int i=0;i<shape[0];i++) {
1156 for (int j=0;j<shape[1];j++) {
1157 tmp=abs((double)data[getRelIndex(shape,i,j)]);
1158 for (int z=0;z<NUMDATS;++z)
1159 {
1160 assert(std::abs(getRef(results[z],i,j) - tmp) <= REL_TOL*std::abs(tmp));
1161 }
1162 }
1163 }
1164
1165 cout << "\tTest Data::sign (positive)." << endl;
1166 for (int z=0;z<NUMDATS;++z)
1167 {
1168 results[z].copy(dats[z].sign());
1169 if (z>=LAZY)
1170 {
1171 assert(results[z].isLazy());
1172 }
1173 }
1174 for (int i=0;i<shape[0];i++) {
1175 for (int j=0;j<shape[1];j++) {
1176 tmp=(i==0 && j==0)?0:1;
1177 for (int z=0;z<NUMDATS;++z)
1178 {
1179 assert(std::abs(getRef(results[z],i,j) - tmp) <= REL_TOL*std::abs(tmp));
1180 }
1181 }
1182 }
1183
1184 cout << "\tTest Data::sign (negative)." << endl;
1185 for (int z=0;z<NUMDATS;++z)
1186 {
1187 results[z].copy(dats[z].neg().sign());
1188 if (z>=LAZY)
1189 {
1190 assert(results[z].isLazy());
1191 }
1192 }
1193 for (int i=0;i<shape[0];i++) {
1194 for (int j=0;j<shape[1];j++) {
1195 tmp=(i==0 && j==0)?0:-1;
1196 for (int z=0;z<NUMDATS;++z)
1197 {
1198 assert(std::abs(getRef(results[z],i,j) - tmp) <= REL_TOL*std::abs(tmp));
1199 }
1200 }
1201 }
1202
1203
1204 cout << "\tTest Data::exp." << endl;
1205 for (int z=0;z<NUMDATS;++z)
1206 {
1207 results[z].copy(dats[z].exp());
1208 if (z>=LAZY)
1209 {
1210 assert(results[z].isLazy());
1211 }
1212 }
1213 for (int i=0;i<shape[0];i++) {
1214 for (int j=0;j<shape[1];j++) {
1215 tmp=exp((double)data[getRelIndex(shape,i,j)]);
1216 for (int z=0;z<NUMDATS;++z)
1217 {
1218 assert(std::abs(getRef(results[z],i,j) - tmp) <= REL_TOL*std::abs(tmp));
1219 }
1220 }
1221 }
1222
1223 cout << "\tTest Data::sqrt." << endl;
1224 for (int z=0;z<NUMDATS;++z)
1225 {
1226 results[z].copy(dats[z].sqrt());
1227 if (z>=LAZY)
1228 {
1229 assert(results[z].isLazy());
1230 }
1231 }
1232 for (int i=0;i<shape[0];i++) {
1233 for (int j=0;j<shape[1];j++) {
1234 tmp=sqrt((double)data[getRelIndex(shape,i,j)]);
1235 for (int z=0;z<NUMDATS;++z)
1236 {
1237 assert(std::abs(getRef(results[z],i,j) - tmp) <= REL_TOL*std::abs(tmp));
1238 }
1239 }
1240 }
1241
1242 cout << "\tTest Data::neg." << endl;
1243 for (int z=0;z<NUMDATS;++z)
1244 {
1245 results[z].copy(dats[z].neg());
1246 if (z>=LAZY)
1247 {
1248 assert(results[z].isLazy());
1249 }
1250 }
1251 for (int i=0;i<shape[0];i++) {
1252 for (int j=0;j<shape[1];j++) {
1253 tmp=-data[getRelIndex(shape,i,j)];
1254 for (int z=0;z<NUMDATS;++z)
1255 {
1256 assert(std::abs(getRef(results[z],i,j) - tmp) <= REL_TOL*std::abs(tmp));
1257 }
1258 }
1259 }
1260
1261 cout << "\tTest Data::pos." << endl;
1262 for (int z=0;z<NUMDATS;++z)
1263 {
1264 results[z].copy(dats[z].pos());
1265 if (z>=LAZY)
1266 {
1267 assert(results[z].isLazy());
1268 }
1269 }
1270 for (int i=0;i<shape[0];i++) {
1271 for (int j=0;j<shape[1];j++) {
1272 for (int z=0;z<NUMDATS;++z)
1273 {
1274 assert(std::abs(getRef(results[z],i,j) - getRelIndex(shape,i,j)) <= REL_TOL*std::abs(data[getRelIndex(shape,i,j)]));
1275 }
1276 }
1277 }
1278
1279 // test reduction operations
1280
1281 cout << "\tTest Data::Lsup." << endl;
1282 for (int z=0;z<NUMDATS;++z)
1283 {
1284 assert(std::abs(dats[z].Lsup() - 5) <= REL_TOL*5);
1285 }
1286
1287 cout << "\tTest Data::sup." << endl;
1288 for (int z=0;z<NUMDATS;++z)
1289 {
1290 assert(std::abs(dats[z].sup() - 5) <= REL_TOL*5);
1291 }
1292
1293 cout << "\tTest Data::inf." << endl;
1294 for (int z=0;z<NUMDATS;++z)
1295 {
1296 assert(std::abs(dats[z].inf() - 0) <= REL_TOL*0);
1297 }
1298
1299 // test data-point reduction operations
1300
1301 cout << "\tTest Data::minval." << endl;
1302 for (int z=0;z<NUMDATS;++z)
1303 {
1304 results[z].copy(dats[z].minval());
1305 }
1306 for (int z=0;z<NUMDATS;++z)
1307 {
1308 assert(std::abs(results[z].getDataAtOffset(0) - 0) <= REL_TOL*0);
1309 }
1310
1311
1312 cout << "\tTest Data::maxval." << endl;
1313 for (int z=0;z<NUMDATS;++z)
1314 {
1315 results[z].copy(dats[z].maxval());
1316 }
1317 for (int z=0;z<NUMDATS;++z)
1318 {
1319 assert(std::abs(results[z].getDataAtOffset(0) - 5) <= REL_TOL*5);
1320 }
1321
1322 }
1323
1324
1325 // Here we test the binary operators in complex expressions
1326 void DataTestCase::testBinary()
1327 {
1328
1329 cout << endl;
1330
1331 // define the shape for the test data
1332 DataTypes::ShapeType shape;
1333 shape.push_back(2);
1334 shape.push_back(3);
1335
1336 // allocate the data
1337 DataTypes::ValueType data(DataTypes::noValues(shape),0);
1338
1339 // assign values to the data
1340 for (int i=0;i<shape[0];i++) {
1341 for (int j=0;j<shape[1];j++) {
1342 data[getRelIndex(shape,i,j)]=getRelIndex(shape,i,j)+2; // so we get no zeros
1343 }
1344 }
1345
1346
1347 Data one(1.0,DataTypes::scalarShape,FunctionSpace());
1348 Data two(2.0,DataTypes::scalarShape,FunctionSpace());
1349 Data dats[]={Data(data,shape,FunctionSpace(),false),
1350 Data(data,shape,FunctionSpace(),false),
1351 Data(data,shape,FunctionSpace(),true),
1352 Data(data,shape,FunctionSpace(),false),
1353 Data(data,shape,FunctionSpace(),false),
1354 Data(data,shape,FunctionSpace(),true)};
1355 dats[1].tag();
1356 dats[4].tag();
1357 const int NUMDATS=6;
1358 const int LAZY=3;
1359 dats[3].delaySelf();
1360 dats[4].delaySelf();
1361 dats[5].delaySelf();
1362 for (int z=0;z<NUMDATS;++z)
1363 {
1364 Data& a=dats[z];
1365 Data r1=(((a+a)/two)+a-a)*one; // scalar/*, matrix+-
1366 Data r2=(((a*a)/a+one)-one); // scalar+-, matrix*/
1367 Data r3=(a.powD(two)/a.powD(one)); // scalar power
1368 Data r4=a.powD(a); // matrix power
1369 if (z>LAZY)
1370 {
1371 assert(r1.isLazy() && r2.isLazy() && r3.isLazy() && r4.isLazy());
1372 }
1373 for (int i=0;i<DataTypes::noValues(shape);++i)
1374 {
1375 assert(std::abs(r1.getDataAtOffset(i)-data[i]) <= REL_TOL*data[i]);
1376 assert(std::abs(r2.getDataAtOffset(i)-data[i]) <= REL_TOL*data[i]);
1377 assert(std::abs(r3.getDataAtOffset(i)-data[i]) <= REL_TOL*data[i]);
1378 assert(std::abs(r4.getDataAtOffset(i)-pow(data[i],i)) <=REL_TOL*pow(data[i],i));
1379 }
1380 }
1381 }
1382
1383
1384 void DataTestCase::testMemAlloc() {
1385
1386 //
1387 // Simple little sanity check for the memory allocator
1388
1389 cout << endl;
1390
1391 Data *testData;
1392 for (int i=0; i<1000; i++) {
1393 testData = new Data(0.0, DataTypes::ShapeType(), FunctionSpace(), true);
1394 delete testData;
1395 }
1396
1397 DataTypes::ShapeType viewShape;
1398 viewShape.push_back(10);
1399 viewShape.push_back(10);
1400 viewShape.push_back(10);
1401
1402 Data *testData2;
1403 Data *testData3 = new Data(0.0, viewShape, FunctionSpace(), true);
1404 for (int i=0; i<1000; i++) {
1405 testData2 = new Data(0.0, viewShape, FunctionSpace(), true);
1406 delete testData2;
1407 }
1408 delete testData3;
1409
1410 }
1411
1412 TestSuite* DataTestCase::suite ()
1413 {
1414 //
1415 // create the suite of tests to perform.
1416 TestSuite *testSuite = new TestSuite ("DataTestCase");
1417 testSuite->addTest (new TestCaller< DataTestCase>("testCopying",&DataTestCase::testCopying));
1418 testSuite->addTest (new TestCaller< DataTestCase>("testSome",&DataTestCase::testSome));
1419 testSuite->addTest (new TestCaller< DataTestCase>("testDataConstant",&DataTestCase::testDataConstant));
1420 testSuite->addTest (new TestCaller< DataTestCase>("testDataTagged",&DataTestCase::testDataTagged));
1421 testSuite->addTest (new TestCaller< DataTestCase>("testDataTaggedExceptions",&DataTestCase::testDataTaggedExceptions));
1422 testSuite->addTest (new TestCaller< DataTestCase>("testConstructors",&DataTestCase::testConstructors));
1423 testSuite->addTest (new TestCaller< DataTestCase>("testSlicing",&DataTestCase::testSlicing));
1424 testSuite->addTest (new TestCaller< DataTestCase>("testOperations",&DataTestCase::testOperations));
1425 //testSuite->addTest (new TestCaller< DataTestCase>("testRefValue",&DataTestCase::testRefValue));
1426 testSuite->addTest (new TestCaller< DataTestCase>("testMemAlloc",&DataTestCase::testMemAlloc));
1427 testSuite->addTest (new TestCaller< DataTestCase>("Resolving",&DataTestCase::testResolveType));
1428
1429 return testSuite;
1430 }

Properties

Name Value
svn:eol-style native
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.26