src/work/peter/path/path_test.cc
changeset 1068 e0b0dcee5e17
parent 959 c80ef5912903
equal deleted inserted replaced
2:1fc7fcafa8bf 3:b31789bbc344
    64 
    64 
    65       cout << "P.length() == " << P.length() << endl;
    65       cout << "P.length() == " << P.length() << endl;
    66       check(P.length() == 0);
    66       check(P.length() == 0);
    67 
    67 
    68 #ifdef SKELETON
    68 #ifdef SKELETON
    69       cout << "P.tail() valid? " << (P.tail()!=INVALID) << endl;
    69       cout << "P.source() valid? " << (P.source()!=INVALID) << endl;
    70       check(! (P.tail()!=INVALID));
    70       check(! (P.source()!=INVALID));
    71 #else
    71 #else
    72       cout << "P.tail() valid? " << (P.from()!=INVALID) << endl;
    72       cout << "P.source() valid? " << (P.from()!=INVALID) << endl;
    73       check(! (P.to()!=INVALID));
    73       check(! (P.to()!=INVALID));
    74 #endif
    74 #endif
    75       {
    75       {
    76 	cout << "Builder objektum letrehozasa" << endl;
    76 	cout << "Builder objektum letrehozasa" << endl;
    77 	DPath::Builder B(P);
    77 	DPath::Builder B(P);
    87 
    87 
    88 	cout << "P.length() == " << P.length() << endl;
    88 	cout << "P.length() == " << P.length() << endl;
    89 	check(P.length() == 2);
    89 	check(P.length() == 2);
    90 
    90 
    91 #ifdef SKELETON
    91 #ifdef SKELETON
    92 	cout << "P.tail() valid? " << (P.tail()!=INVALID) << endl;
    92 	cout << "P.source() valid? " << (P.source()!=INVALID) << endl;
    93 	check(P.tail()!=INVALID);
    93 	check(P.source()!=INVALID);
    94 	cout << "P.tail()==v1 ? " << (P.tail()==v1) << endl;
    94 	cout << "P.source()==v1 ? " << (P.source()==v1) << endl;
    95 	check(P.tail() == v1);
    95 	check(P.source() == v1);
    96 #else
    96 #else
    97 	cout << "P.tail() valid? " << (P.from()!=INVALID) << endl;
    97 	cout << "P.source() valid? " << (P.from()!=INVALID) << endl;
    98 	check(P.from()!=INVALID);
    98 	check(P.from()!=INVALID);
    99 	cout << "P.tail()==v1 ? " << (P.from()==v1) << endl;
    99 	cout << "P.source()==v1 ? " << (P.from()==v1) << endl;
   100 	check(P.from() == v1);
   100 	check(P.from() == v1);
   101 #endif
   101 #endif
   102 
   102 
   103 	// Na ja, ez igy nem igazi, mindket esetet le kene tesztelni,
   103 	// Na ja, ez igy nem igazi, mindket esetet le kene tesztelni,
   104 	// de legalabb valami:
   104 	// de legalabb valami:
   126       }
   126       }
   127       cout << "P.length() == " << P.length() << endl;
   127       cout << "P.length() == " << P.length() << endl;
   128       check(P.length() == 4);
   128       check(P.length() == 4);
   129 
   129 
   130 #ifdef SKELETON
   130 #ifdef SKELETON
   131       cout << "P.head()==v3 ? " << (P.head()==v3) << endl;
   131       cout << "P.target()==v3 ? " << (P.target()==v3) << endl;
   132       check(P.head() == v3);
   132       check(P.target() == v3);
   133 #else
   133 #else
   134       cout << "P.head()==v3 ? " << (P.to()==v3) << endl;
   134       cout << "P.target()==v3 ? " << (P.to()==v3) << endl;
   135       check(P.to() == v3);
   135       check(P.to() == v3);
   136 #endif
   136 #endif
   137 
   137 
   138       cout << "Vegigiteralunk az eleken." << endl;
   138       cout << "Vegigiteralunk az eleken." << endl;
   139       typedef DPath::NodeIt NodeIt;
   139       typedef DPath::NodeIt NodeIt;