- Timestamp:
- Nov 7, 2009, 4:41:18 PM (17 years ago)
- Branches:
- 1941-docker-image-to-test, devel, master
- Children:
- 4d44f38
- Parents:
- 9642924
- Location:
- tol_pkg/graphtools
- Files:
-
- 2 edited
-
graphtools.tol (modified) (1 diff)
-
test/test_0001/test.tol (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tol_pkg/graphtools/graphtools.tol
r9642924 r2b60aab 304 304 { 305 305 _.edge::get.all(idx) 306 }; 307 308 //////////////////////////////////////////////////////////////////////////// 309 Set get.vertex.names(Real void) 310 //////////////////////////////////////////////////////////////////////////// 311 { 312 ((_.vertex::_.feature)[1])::_.domain 306 313 } 307 308 314 } 309 315 -
tol_pkg/graphtools/test/test_0001/test.tol
r9642924 r2b60aab 5 5 6 6 Text email_ = "vdebuen@tol-project.org"; 7 Text link_ = ""; 7 8 Text summary_ = "checking a simple graph"; 8 9 … … 23 24 GraphTools::@Graph graph = GraphTools::@Graph::New("test_0001",True); 24 25 25 Real graph::initialize(Set {vertex.names = For(1,vertex.num,Text(Real k)26 Set vertex.names = For(1,vertex.num,Text(Real k) 26 27 { 27 "Key_"<<FormatReal(k," 0%6.0f")<<28 "Key_"<<FormatReal(k,"%06.0f")<< 28 29 "_"+FormatReal(IntRand(0,999999999),"%09.0lf") 29 })}); 30 }); 31 32 Real graph::initialize(vertex.names); 30 33 31 34 Real graph::_.edge::add.feature.numeric("Length"); … … 40 43 Real graph::edge.build(data); 41 44 42 43 45 Real edge.idx = IntRand(1,edge.num); 44 46 Set edge.info = graph::edge.get.all(edge.idx); … … 52 54 Real ok.1 = edge.idx.1==edge.idx; 53 55 Real ok.2 = edge.idx.2==edge.idx; 56 57 Set vertex.names_ = graph::get.vertex.names(?); 58 59 Real ok.3 = Card(vertex.names)==Card(vertex.names_); 54 60 55 61 Real t1 = Copy(Time); … … 67 73 WriteLn("Loading OIS time "<<(t3-t2)+" seconds"); 68 74 69 /*70 75 Real numErr1 = Copy(NError); 71 76 Real numWar1 = Copy(NWarning); 72 77 73 Set partialResults_ = [[numErr0, numErr1, ok]]; 78 Set partialResults_ = [[numErr0, numErr1, 79 ok.1, ok.2, ok.3]]; 74 80 75 81 //This is a messure of the success of the test 76 82 Real quality_ = And(numErr1 == numErr0, 77 83 numWar1 == numWar0, 78 ok );84 ok.1, ok.2, ok.3); 79 85 80 86 //Return the results
Note: See TracChangeset
for help on using the changeset viewer.
