Lines Matching refs:path

61 		BPath path;
62 CPPUNIT_ASSERT( path.InitCheck() == B_NO_INIT );
63 CPPUNIT_ASSERT( path.Path() == NULL );
67 // absolute existing path (root dir), no leaf, no normalization
71 BPath path(pathName);
72 CPPUNIT_ASSERT( path.InitCheck() == B_OK );
73 CPPUNIT_ASSERT( string(pathName) == path.Path() );
75 // absolute existing path, no leaf, no normalization
79 BPath path(pathName);
80 CPPUNIT_ASSERT( path.InitCheck() == B_OK );
81 CPPUNIT_ASSERT( string(pathName) == path.Path() );
83 // absolute non-existing path, no leaf, no normalization
87 BPath path(pathName);
88 CPPUNIT_ASSERT( path.InitCheck() == B_OK );
89 CPPUNIT_ASSERT( string(pathName) == path.Path() );
91 // absolute existing path (root dir), no leaf, auto normalization
96 BPath path(pathName);
97 CPPUNIT_ASSERT( path.InitCheck() == B_OK );
98 CPPUNIT_ASSERT( string(normalizedPathName) == path.Path() );
100 // absolute existing path, no leaf, auto normalization
105 BPath path(pathName);
106 CPPUNIT_ASSERT( path.InitCheck() == B_OK );
107 CPPUNIT_ASSERT( string(normalizedPathName) == path.Path() );
109 // absolute non-existing path, no leaf, auto normalization
113 BPath path(pathName);
114 CPPUNIT_ASSERT( path.InitCheck() == B_ENTRY_NOT_FOUND );
115 CPPUNIT_ASSERT( path.Path() == NULL );
117 // absolute existing path (root dir), no leaf, normalization forced
121 BPath path(pathName, NULL, true);
122 CPPUNIT_ASSERT( path.InitCheck() == B_OK );
123 CPPUNIT_ASSERT( string(pathName) == path.Path() );
125 // absolute existing path, no leaf, normalization forced
129 BPath path(pathName, NULL, true);
130 CPPUNIT_ASSERT( path.InitCheck() == B_OK );
131 CPPUNIT_ASSERT( string(pathName) == path.Path() );
133 // absolute non-existing path, no leaf, normalization forced
137 BPath path(pathName, NULL, true);
138 CPPUNIT_ASSERT( path.InitCheck() == B_ENTRY_NOT_FOUND );
139 CPPUNIT_ASSERT( path.Path() == NULL );
141 // relative existing path, no leaf, no normalization needed, but done
147 BPath path(pathName);
148 CPPUNIT_ASSERT( path.InitCheck() == B_OK );
149 CPPUNIT_ASSERT( string(absolutePathName) == path.Path() );
151 // relative non-existing path, no leaf, no normalization needed, but done
156 BPath path(pathName);
157 CPPUNIT_ASSERT( path.InitCheck() == B_ENTRY_NOT_FOUND );
158 CPPUNIT_ASSERT( path.Path() == NULL );
160 // relative existing path, no leaf, auto normalization
166 BPath path(pathName);
167 CPPUNIT_ASSERT( path.InitCheck() == B_OK );
168 CPPUNIT_ASSERT( string(normalizedPathName) == path.Path() );
170 // relative non-existing path, no leaf, auto normalization
175 BPath path(pathName);
176 CPPUNIT_ASSERT( path.InitCheck() == B_ENTRY_NOT_FOUND );
177 CPPUNIT_ASSERT( path.Path() == NULL );
179 // relative existing path, no leaf, normalization forced
185 BPath path(pathName, NULL, true);
186 CPPUNIT_ASSERT( path.InitCheck() == B_OK );
187 CPPUNIT_ASSERT( string(absolutePathName) == path.Path() );
189 // relative non-existing path, no leaf, normalization forced
194 BPath path(pathName, NULL, true);
195 CPPUNIT_ASSERT( path.InitCheck() == B_ENTRY_NOT_FOUND );
196 CPPUNIT_ASSERT( path.Path() == NULL );
198 // absolute existing path (root dir), leaf, no normalization
204 BPath path(pathName, leafName);
205 CPPUNIT_ASSERT( path.InitCheck() == B_OK );
206 CPPUNIT_ASSERT( string(absolutePathName) == path.Path() );
208 // absolute existing path, leaf, no normalization
214 BPath path(pathName, leafName);
215 CPPUNIT_ASSERT( path.InitCheck() == B_OK );
216 CPPUNIT_ASSERT( string(absolutePathName) == path.Path() );
218 // absolute non-existing path, leaf, no normalization
224 BPath path(pathName, leafName);
225 CPPUNIT_ASSERT( path.InitCheck() == B_OK );
226 CPPUNIT_ASSERT( string(absolutePathName) == path.Path() );
228 // absolute existing path (root dir), leaf, auto normalization
234 BPath path(pathName, leafName);
235 CPPUNIT_ASSERT( path.InitCheck() == B_OK );
236 CPPUNIT_ASSERT( string(absolutePathName) == path.Path() );
238 // absolute existing path, leaf, auto normalization
244 BPath path(pathName, leafName);
245 CPPUNIT_ASSERT( path.InitCheck() == B_OK );
246 CPPUNIT_ASSERT( string(absolutePathName) == path.Path() );
248 // absolute non-existing path, leaf, auto normalization
253 BPath path(pathName, leafName);
254 CPPUNIT_ASSERT( path.InitCheck() == B_ENTRY_NOT_FOUND );
255 CPPUNIT_ASSERT( path.Path() == NULL );
257 // absolute non-existing path, leaf, normalization forced
262 BPath path(pathName, leafName, true);
263 CPPUNIT_ASSERT( path.InitCheck() == B_ENTRY_NOT_FOUND );
264 CPPUNIT_ASSERT( path.Path() == NULL );
266 // relative existing path, leaf, no normalization needed, but done
273 BPath path(pathName, leafName);
274 CPPUNIT_ASSERT( path.InitCheck() == B_OK );
275 CPPUNIT_ASSERT( string(absolutePathName) == path.Path() );
277 // relative non-existing path, leaf, no normalization needed, but done
283 BPath path(pathName, leafName);
284 CPPUNIT_ASSERT( path.InitCheck() == B_ENTRY_NOT_FOUND );
285 CPPUNIT_ASSERT( path.Path() == NULL );
287 // relative existing path, leaf, auto normalization
294 BPath path(pathName, leafName);
295 CPPUNIT_ASSERT( path.InitCheck() == B_OK );
296 CPPUNIT_ASSERT( string(normalizedPathName) == path.Path() );
303 BPath path(pathName, leafName);
304 CPPUNIT_ASSERT( path.InitCheck() == B_BAD_VALUE );
305 CPPUNIT_ASSERT( path.Path() == NULL );
310 BPath path((const char*)NULL, "test");
311 CPPUNIT_ASSERT( path.InitCheck() == B_BAD_VALUE );
312 CPPUNIT_ASSERT( path.Path() == NULL );
317 BPath path((const char*)NULL);
318 CPPUNIT_ASSERT( path.InitCheck() == B_BAD_VALUE );
319 CPPUNIT_ASSERT( path.Path() == NULL );
328 BPath path(&dir, NULL);
329 CPPUNIT_ASSERT( path.InitCheck() == B_OK );
330 CPPUNIT_ASSERT( string(pathName) == path.Path() );
337 BPath path(&dir, NULL);
338 CPPUNIT_ASSERT( path.InitCheck() == B_OK );
339 CPPUNIT_ASSERT( string(pathName) == path.Path() );
346 BPath path(&dir, NULL, true);
347 CPPUNIT_ASSERT( path.InitCheck() == B_OK );
348 CPPUNIT_ASSERT( string(pathName) == path.Path() );
355 BPath path(&dir, NULL, true);
356 CPPUNIT_ASSERT( path.InitCheck() == B_OK );
357 CPPUNIT_ASSERT( string(pathName) == path.Path() );
366 BPath path(&dir, leafName);
367 CPPUNIT_ASSERT( path.InitCheck() == B_OK );
368 CPPUNIT_ASSERT( string(absolutePathName) == path.Path() );
377 BPath path(&dir, leafName);
378 CPPUNIT_ASSERT( path.InitCheck() == B_OK );
379 CPPUNIT_ASSERT( string(absolutePathName) == path.Path() );
388 BPath path(&dir, leafName);
389 CPPUNIT_ASSERT( path.InitCheck() == B_OK );
390 CPPUNIT_ASSERT( string(absolutePathName) == path.Path() );
398 BPath path(&dir, leafName);
399 CPPUNIT_ASSERT( path.InitCheck() == B_BAD_VALUE );
400 CPPUNIT_ASSERT( path.Path() == NULL );
406 BPath path(&dir, "test");
407 CPPUNIT_ASSERT( path.InitCheck() == B_BAD_VALUE );
408 CPPUNIT_ASSERT( path.Path() == NULL );
414 BPath path(&dir, "test");
415 CPPUNIT_ASSERT( path.InitCheck() == B_BAD_VALUE );
416 CPPUNIT_ASSERT( path.Path() == NULL );
423 BPath path((const BDirectory*)NULL, "test");
424 CPPUNIT_ASSERT( path.InitCheck() == B_BAD_VALUE );
425 CPPUNIT_ASSERT( path.Path() == NULL );
430 BPath path((const BDirectory*)NULL, NULL);
431 CPPUNIT_ASSERT( path.InitCheck() == B_BAD_VALUE );
432 CPPUNIT_ASSERT( path.Path() == NULL );
442 BPath path(&entry);
443 CPPUNIT_ASSERT( path.InitCheck() == B_OK );
444 CPPUNIT_ASSERT( string(pathName) == path.Path() );
451 BPath path(&entry);
452 CPPUNIT_ASSERT( path.InitCheck() == B_OK );
453 CPPUNIT_ASSERT( string(pathName) == path.Path() );
460 BPath path(&entry);
461 CPPUNIT_ASSERT( path.InitCheck() == B_OK );
462 CPPUNIT_ASSERT( string(pathName) == path.Path() );
468 BPath path(&entry);
469 CPPUNIT_ASSERT( path.InitCheck() == B_NO_INIT );
470 CPPUNIT_ASSERT( path.Path() == NULL );
476 BPath path(&entry);
477 CPPUNIT_ASSERT( equals(path.InitCheck(), B_NO_INIT, B_ENTRY_NOT_FOUND) );
478 CPPUNIT_ASSERT( path.Path() == NULL );
483 BPath path((const BEntry*)NULL);
484 CPPUNIT_ASSERT( equals(path.InitCheck(), B_NO_INIT, B_BAD_VALUE) );
485 CPPUNIT_ASSERT( path.Path() == NULL );
496 BPath path(&ref);
497 CPPUNIT_ASSERT( path.InitCheck() == B_OK );
498 CPPUNIT_ASSERT( string(pathName) == path.Path() );
507 BPath path(&ref);
508 CPPUNIT_ASSERT( path.InitCheck() == B_OK );
509 CPPUNIT_ASSERT( string(pathName) == path.Path() );
518 BPath path(&ref);
519 CPPUNIT_ASSERT( path.InitCheck() == B_OK );
520 CPPUNIT_ASSERT( string(pathName) == path.Path() );
525 BPath path((const entry_ref*)NULL);
526 CPPUNIT_ASSERT( equals(path.InitCheck(), B_NO_INIT, B_BAD_VALUE) );
527 CPPUNIT_ASSERT( path.Path() == NULL );
535 BPath path;
545 // absolute existing path (root dir), no leaf, no normalization
548 CPPUNIT_ASSERT( path.SetTo(pathName) == B_OK );
549 CPPUNIT_ASSERT( path.InitCheck() == B_OK );
550 CPPUNIT_ASSERT( string(pathName) == path.Path() );
551 path.Unset();
552 // absolute existing path, no leaf, no normalization
555 CPPUNIT_ASSERT( path.SetTo(pathName) == B_OK );
556 CPPUNIT_ASSERT( path.InitCheck() == B_OK );
557 CPPUNIT_ASSERT( string(pathName) == path.Path() );
558 path.Unset();
559 // absolute non-existing path, no leaf, no normalization
562 CPPUNIT_ASSERT( path.SetTo(pathName) == B_OK );
563 CPPUNIT_ASSERT( path.InitCheck() == B_OK );
564 CPPUNIT_ASSERT( string(pathName) == path.Path() );
565 path.Unset();
566 // absolute existing path (root dir), no leaf, auto normalization
570 CPPUNIT_ASSERT( path.SetTo(pathName) == B_OK );
571 CPPUNIT_ASSERT( path.InitCheck() == B_OK );
572 CPPUNIT_ASSERT( string(normalizedPathName) == path.Path() );
573 path.Unset();
574 // absolute existing path, no leaf, auto normalization
578 CPPUNIT_ASSERT( path.SetTo(pathName) == B_OK );
579 CPPUNIT_ASSERT( path.InitCheck() == B_OK );
580 CPPUNIT_ASSERT( string(normalizedPathName) == path.Path() );
581 path.Unset();
582 // absolute non-existing path, no leaf, auto normalization
585 CPPUNIT_ASSERT( path.SetTo(pathName) == B_ENTRY_NOT_FOUND );
586 CPPUNIT_ASSERT( path.InitCheck() == B_ENTRY_NOT_FOUND );
587 CPPUNIT_ASSERT( path.Path() == NULL );
588 path.Unset();
589 // absolute existing path (root dir), no leaf, normalization forced
592 CPPUNIT_ASSERT( path.SetTo(pathName, NULL, true) == B_OK );
593 CPPUNIT_ASSERT( path.InitCheck() == B_OK );
594 CPPUNIT_ASSERT( string(pathName) == path.Path() );
595 path.Unset();
596 // absolute existing path, no leaf, normalization forced
599 CPPUNIT_ASSERT( path.SetTo(pathName, NULL, true) == B_OK );
600 CPPUNIT_ASSERT( path.InitCheck() == B_OK );
601 CPPUNIT_ASSERT( string(pathName) == path.Path() );
602 path.Unset();
603 // absolute non-existing path, no leaf, normalization forced
606 CPPUNIT_ASSERT( path.SetTo(pathName, NULL, true) == B_ENTRY_NOT_FOUND );
607 CPPUNIT_ASSERT( path.InitCheck() == B_ENTRY_NOT_FOUND );
608 CPPUNIT_ASSERT( path.Path() == NULL );
609 path.Unset();
610 // relative existing path, no leaf, no normalization needed, but done
615 CPPUNIT_ASSERT( path.SetTo(pathName) == B_OK );
616 CPPUNIT_ASSERT( path.InitCheck() == B_OK );
617 CPPUNIT_ASSERT( string(absolutePathName) == path.Path() );
618 path.Unset();
619 // relative non-existing path, no leaf, no normalization needed, but done
624 CPPUNIT_ASSERT( path.SetTo(pathName) == B_ENTRY_NOT_FOUND );
625 CPPUNIT_ASSERT( path.InitCheck() == B_ENTRY_NOT_FOUND );
626 CPPUNIT_ASSERT( path.Path() == NULL );
627 path.Unset();
628 // relative existing path, no leaf, auto normalization
633 CPPUNIT_ASSERT( path.SetTo(pathName) == B_OK );
634 CPPUNIT_ASSERT( path.InitCheck() == B_OK );
635 CPPUNIT_ASSERT( string(normalizedPathName) == path.Path() );
636 path.Unset();
637 // relative non-existing path, no leaf, auto normalization
641 CPPUNIT_ASSERT( path.SetTo(pathName) == B_ENTRY_NOT_FOUND );
642 CPPUNIT_ASSERT( path.InitCheck() == B_ENTRY_NOT_FOUND );
643 CPPUNIT_ASSERT( path.Path() == NULL );
644 path.Unset();
645 // relative existing path, no leaf, normalization forced
650 CPPUNIT_ASSERT( path.SetTo(pathName, NULL, true) == B_OK );
651 CPPUNIT_ASSERT( path.InitCheck() == B_OK );
652 CPPUNIT_ASSERT( string(absolutePathName) == path.Path() );
653 path.Unset();
654 // relative non-existing path, no leaf, normalization forced
658 CPPUNIT_ASSERT( path.SetTo(pathName, NULL, true) == B_ENTRY_NOT_FOUND );
659 CPPUNIT_ASSERT( path.InitCheck() == B_ENTRY_NOT_FOUND );
660 CPPUNIT_ASSERT( path.Path() == NULL );
661 path.Unset();
662 // absolute existing path (root dir), leaf, no normalization
667 CPPUNIT_ASSERT( path.SetTo(pathName, leafName) == B_OK );
668 CPPUNIT_ASSERT( path.InitCheck() == B_OK );
669 CPPUNIT_ASSERT( string(absolutePathName) == path.Path() );
670 path.Unset();
671 // absolute existing path, leaf, no normalization
676 CPPUNIT_ASSERT( path.SetTo(pathName, leafName) == B_OK );
677 CPPUNIT_ASSERT( path.InitCheck() == B_OK );
678 CPPUNIT_ASSERT( string(absolutePathName) == path.Path() );
679 path.Unset();
680 // absolute non-existing path, leaf, no normalization
685 CPPUNIT_ASSERT( path.SetTo(pathName, leafName) == B_OK );
686 CPPUNIT_ASSERT( path.InitCheck() == B_OK );
687 CPPUNIT_ASSERT( string(absolutePathName) == path.Path() );
688 path.Unset();
689 // absolute existing path (root dir), leaf, auto normalization
694 CPPUNIT_ASSERT( path.SetTo(pathName, leafName) == B_OK );
695 CPPUNIT_ASSERT( path.InitCheck() == B_OK );
696 CPPUNIT_ASSERT( string(absolutePathName) == path.Path() );
697 path.Unset();
698 // absolute existing path, leaf, auto normalization
703 CPPUNIT_ASSERT( path.SetTo(pathName, leafName) == B_OK );
704 CPPUNIT_ASSERT( path.InitCheck() == B_OK );
705 CPPUNIT_ASSERT( string(absolutePathName) == path.Path() );
706 path.Unset();
707 // absolute existing path, leaf, self assignment
712 CPPUNIT_ASSERT( path.SetTo(pathName) == B_OK );
713 CPPUNIT_ASSERT( path.SetTo(path.Path(), ".///./") == B_OK );
714 CPPUNIT_ASSERT( string(pathName) == path.Path() );
715 CPPUNIT_ASSERT( path.SetTo(path.Path(), "..") == B_OK );
716 CPPUNIT_ASSERT( string("/boot") == path.Path() );
717 CPPUNIT_ASSERT( path.SetTo(path.Path(), leafName) == B_OK );
718 CPPUNIT_ASSERT( string(absolutePathName) == path.Path() );
719 path.Unset();
720 // absolute non-existing path, leaf, auto normalization
724 CPPUNIT_ASSERT( path.SetTo(pathName, leafName) == B_ENTRY_NOT_FOUND );
725 CPPUNIT_ASSERT( path.InitCheck() == B_ENTRY_NOT_FOUND );
726 CPPUNIT_ASSERT( path.Path() == NULL );
727 path.Unset();
728 // absolute non-existing path, leaf, normalization forced
732 CPPUNIT_ASSERT( path.SetTo(pathName, leafName, true) == B_ENTRY_NOT_FOUND );
733 CPPUNIT_ASSERT( path.InitCheck() == B_ENTRY_NOT_FOUND );
734 CPPUNIT_ASSERT( path.Path() == NULL );
735 path.Unset();
736 // relative existing path, leaf, no normalization needed, but done
742 CPPUNIT_ASSERT( path.SetTo(pathName, leafName) == B_OK );
743 CPPUNIT_ASSERT( path.InitCheck() == B_OK );
744 CPPUNIT_ASSERT( string(absolutePathName) == path.Path() );
745 path.Unset();
746 // relative non-existing path, leaf, no normalization needed, but done
751 CPPUNIT_ASSERT( path.SetTo(pathName, leafName) == B_ENTRY_NOT_FOUND );
752 CPPUNIT_ASSERT( path.InitCheck() == B_ENTRY_NOT_FOUND );
753 CPPUNIT_ASSERT( path.Path() == NULL );
754 path.Unset();
755 // relative existing path, leaf, auto normalization
761 CPPUNIT_ASSERT( path.SetTo(pathName, leafName) == B_OK );
762 CPPUNIT_ASSERT( path.InitCheck() == B_OK );
763 CPPUNIT_ASSERT( string(normalizedPathName) == path.Path() );
764 path.Unset();
767 CPPUNIT_ASSERT( path.SetTo("/", "/boot") == B_BAD_VALUE );
768 CPPUNIT_ASSERT( path.InitCheck() == B_BAD_VALUE );
769 CPPUNIT_ASSERT( path.Path() == NULL );
770 path.Unset();
773 CPPUNIT_ASSERT( path.SetTo((const char*)NULL, "test") == B_BAD_VALUE );
774 CPPUNIT_ASSERT( path.InitCheck() == B_BAD_VALUE );
775 CPPUNIT_ASSERT( path.Path() == NULL );
776 path.Unset();
779 CPPUNIT_ASSERT( path.SetTo((const char*)NULL) == B_BAD_VALUE );
780 CPPUNIT_ASSERT( path.InitCheck() == B_BAD_VALUE );
781 CPPUNIT_ASSERT( path.Path() == NULL );
782 path.Unset();
789 CPPUNIT_ASSERT( path.SetTo(&dir, NULL) == B_OK );
790 CPPUNIT_ASSERT( path.InitCheck() == B_OK );
791 CPPUNIT_ASSERT( string(pathName) == path.Path() );
792 path.Unset();
798 CPPUNIT_ASSERT( path.SetTo(&dir, NULL) == B_OK );
799 CPPUNIT_ASSERT( path.InitCheck() == B_OK );
800 CPPUNIT_ASSERT( string(pathName) == path.Path() );
801 path.Unset();
807 CPPUNIT_ASSERT( path.SetTo(&dir, NULL, true) == B_OK );
808 CPPUNIT_ASSERT( path.InitCheck() == B_OK );
809 CPPUNIT_ASSERT( string(pathName) == path.Path() );
810 path.Unset();
816 CPPUNIT_ASSERT( path.SetTo(&dir, NULL, true) == B_OK );
817 CPPUNIT_ASSERT( path.InitCheck() == B_OK );
818 CPPUNIT_ASSERT( string(pathName) == path.Path() );
819 path.Unset();
827 CPPUNIT_ASSERT( path.SetTo(&dir, leafName) == B_OK );
828 CPPUNIT_ASSERT( path.InitCheck() == B_OK );
829 CPPUNIT_ASSERT( string(absolutePathName) == path.Path() );
830 path.Unset();
838 CPPUNIT_ASSERT( path.SetTo(&dir, leafName) == B_OK );
839 CPPUNIT_ASSERT( path.InitCheck() == B_OK );
840 CPPUNIT_ASSERT( string(absolutePathName) == path.Path() );
841 path.Unset();
849 CPPUNIT_ASSERT( path.SetTo(&dir, leafName) == B_OK );
850 CPPUNIT_ASSERT( path.InitCheck() == B_OK );
851 CPPUNIT_ASSERT( string(absolutePathName) == path.Path() );
852 path.Unset();
859 CPPUNIT_ASSERT( path.SetTo(&dir, leafName) == B_BAD_VALUE );
860 CPPUNIT_ASSERT( path.InitCheck() == B_BAD_VALUE );
861 CPPUNIT_ASSERT( path.Path() == NULL );
862 path.Unset();
867 CPPUNIT_ASSERT( path.SetTo(&dir, "test") == B_BAD_VALUE );
868 CPPUNIT_ASSERT( path.InitCheck() == B_BAD_VALUE );
869 CPPUNIT_ASSERT( path.Path() == NULL );
870 path.Unset();
875 CPPUNIT_ASSERT( path.SetTo(&dir, "test") == B_BAD_VALUE );
876 CPPUNIT_ASSERT( path.InitCheck() == B_BAD_VALUE );
877 CPPUNIT_ASSERT( path.Path() == NULL );
878 path.Unset();
884 CPPUNIT_ASSERT( path.SetTo((const BDirectory*)NULL, "test") == B_BAD_VALUE );
885 CPPUNIT_ASSERT( path.InitCheck() == B_BAD_VALUE );
886 CPPUNIT_ASSERT( path.Path() == NULL );
887 path.Unset();
891 CPPUNIT_ASSERT( path.SetTo((const BDirectory*)NULL, NULL) == B_BAD_VALUE );
892 CPPUNIT_ASSERT( path.InitCheck() == B_BAD_VALUE );
893 CPPUNIT_ASSERT( path.Path() == NULL );
894 path.Unset();
903 CPPUNIT_ASSERT( path.SetTo(&entry) == B_OK );
904 CPPUNIT_ASSERT( path.InitCheck() == B_OK );
905 CPPUNIT_ASSERT( string(pathName) == path.Path() );
906 path.Unset();
912 CPPUNIT_ASSERT( path.SetTo(&entry) == B_OK );
913 CPPUNIT_ASSERT( path.InitCheck() == B_OK );
914 CPPUNIT_ASSERT( string(pathName) == path.Path() );
915 path.Unset();
921 CPPUNIT_ASSERT( path.SetTo(&entry) == B_OK );
922 CPPUNIT_ASSERT( path.InitCheck() == B_OK );
923 CPPUNIT_ASSERT( string(pathName) == path.Path() );
924 path.Unset();
929 CPPUNIT_ASSERT( path.SetTo(&entry) == B_NO_INIT );
930 CPPUNIT_ASSERT( path.InitCheck() == B_NO_INIT );
931 CPPUNIT_ASSERT( path.Path() == NULL );
932 path.Unset();
937 CPPUNIT_ASSERT( equals(path.SetTo(&entry), B_NO_INIT, B_ENTRY_NOT_FOUND) );
938 CPPUNIT_ASSERT( equals(path.InitCheck(), B_NO_INIT, B_ENTRY_NOT_FOUND) );
939 CPPUNIT_ASSERT( path.Path() == NULL );
940 path.Unset();
944 CPPUNIT_ASSERT( equals(path.SetTo((const BEntry*)NULL), B_NO_INIT,
946 CPPUNIT_ASSERT( equals(path.InitCheck(), B_NO_INIT, B_BAD_VALUE) );
947 CPPUNIT_ASSERT( path.Path() == NULL );
948 path.Unset();
957 CPPUNIT_ASSERT( path.SetTo(&ref) == B_OK );
958 CPPUNIT_ASSERT( path.InitCheck() == B_OK );
959 CPPUNIT_ASSERT( string(pathName) == path.Path() );
960 path.Unset();
967 CPPUNIT_ASSERT( path.SetTo(&ref) == B_OK );
968 CPPUNIT_ASSERT( path.InitCheck() == B_OK );
969 CPPUNIT_ASSERT( string(pathName) == path.Path() );
970 path.Unset();
977 CPPUNIT_ASSERT( path.SetTo(&ref) == B_OK );
978 CPPUNIT_ASSERT( path.InitCheck() == B_OK );
979 CPPUNIT_ASSERT( string(pathName) == path.Path() );
980 path.Unset();
984 CPPUNIT_ASSERT( equals(path.SetTo((const entry_ref*)NULL), B_NO_INIT,
986 CPPUNIT_ASSERT( equals(path.InitCheck(), B_NO_INIT, B_BAD_VALUE) );
987 CPPUNIT_ASSERT( path.Path() == NULL );
988 path.Unset();
996 BPath path;
999 CPPUNIT_ASSERT( path.InitCheck() == B_NO_INIT );
1000 CPPUNIT_ASSERT( path.Append("test") == B_BAD_VALUE );
1001 CPPUNIT_ASSERT( path.Path() == NULL );
1002 path.Unset();
1005 CPPUNIT_ASSERT( path.SetTo("/") == B_OK );
1006 CPPUNIT_ASSERT( string("/") == path.Path() );
1007 CPPUNIT_ASSERT( path.Append("boot") == B_OK );
1008 CPPUNIT_ASSERT( string("/boot") == path.Path() );
1009 CPPUNIT_ASSERT( path.Append("home/Desktop") == B_OK );
1010 CPPUNIT_ASSERT( string("/boot/home/Desktop") == path.Path() );
1011 CPPUNIT_ASSERT( path.Append("non/existing") == B_OK );
1012 CPPUNIT_ASSERT( string("/boot/home/Desktop/non/existing") == path.Path() );
1014 CPPUNIT_ASSERT( path.Append("at/least/not//now") == B_ENTRY_NOT_FOUND );
1015 CPPUNIT_ASSERT( path.InitCheck() == B_ENTRY_NOT_FOUND );
1016 CPPUNIT_ASSERT( path.Path() == NULL );
1017 path.Unset();
1020 CPPUNIT_ASSERT( path.SetTo("/boot") == B_OK );
1021 CPPUNIT_ASSERT( string("/boot") == path.Path() );
1022 CPPUNIT_ASSERT( path.Append("home/non-existing", true) == B_OK );
1023 CPPUNIT_ASSERT( string("/boot/home/non-existing") == path.Path() );
1024 CPPUNIT_ASSERT( path.Append("not/now", true) == B_ENTRY_NOT_FOUND );
1025 CPPUNIT_ASSERT( path.InitCheck() == B_ENTRY_NOT_FOUND );
1026 CPPUNIT_ASSERT( path.Path() == NULL );
1027 path.Unset();
1030 CPPUNIT_ASSERT( path.SetTo("/boot") == B_OK );
1031 CPPUNIT_ASSERT( path.Append(NULL) == B_OK );
1032 CPPUNIT_ASSERT( string("/boot") == path.Path() );
1033 CPPUNIT_ASSERT( path.SetTo("/boot") == B_OK );
1034 CPPUNIT_ASSERT( path.Append("/tmp") == B_BAD_VALUE );
1035 CPPUNIT_ASSERT( path.InitCheck() == B_BAD_VALUE );
1036 CPPUNIT_ASSERT( path.SetTo("/boot") == B_OK );
1037 CPPUNIT_ASSERT( path.Append("") == B_OK );
1038 CPPUNIT_ASSERT( string("/boot") == path.Path() );
1039 path.Unset();
1046 BPath path;
1049 CPPUNIT_ASSERT( path.InitCheck() == B_NO_INIT );
1050 CPPUNIT_ASSERT( path.Leaf() == NULL );
1051 path.Unset();
1054 CPPUNIT_ASSERT( path.SetTo("/") == B_OK );
1055 CPPUNIT_ASSERT( string("") == path.Leaf() );
1056 path.Unset();
1059 CPPUNIT_ASSERT( path.SetTo("/boot") == B_OK );
1060 CPPUNIT_ASSERT( string("boot") == path.Leaf() );
1061 CPPUNIT_ASSERT( path.SetTo("/boot/home") == B_OK );
1062 CPPUNIT_ASSERT( string("home") == path.Leaf() );
1063 CPPUNIT_ASSERT( path.SetTo("/boot/home/Desktop") == B_OK );
1064 CPPUNIT_ASSERT( string("Desktop") == path.Leaf() );
1065 path.Unset();
1068 CPPUNIT_ASSERT( path.SetTo("/non-existing") == B_OK );
1069 CPPUNIT_ASSERT( string("non-existing") == path.Leaf() );
1070 CPPUNIT_ASSERT( path.SetTo("/non/existing/dir") == B_OK );
1071 CPPUNIT_ASSERT( string("dir") == path.Leaf() );
1072 path.Unset();
1079 BPath path;
1085 CPPUNIT_ASSERT( path.InitCheck() == B_NO_INIT );
1086 CPPUNIT_ASSERT( path.GetParent(&parent) == B_NO_INIT );
1087 path.Unset();
1092 CPPUNIT_ASSERT( path.SetTo("/") == B_OK );
1093 CPPUNIT_ASSERT( path.GetParent(&parent) == B_ENTRY_NOT_FOUND );
1094 path.Unset();
1098 CPPUNIT_ASSERT( path.SetTo("/boot") == B_OK );
1099 CPPUNIT_ASSERT( path.GetParent(&parent) == B_OK );
1101 CPPUNIT_ASSERT( path.SetTo("/boot/home") == B_OK );
1102 CPPUNIT_ASSERT( path.GetParent(&parent) == B_OK );
1104 CPPUNIT_ASSERT( path.SetTo("/boot/home/Desktop") == B_OK );
1105 CPPUNIT_ASSERT( path.GetParent(&parent) == B_OK );
1107 path.Unset();
1111 CPPUNIT_ASSERT( path.SetTo("/non-existing") == B_OK );
1112 CPPUNIT_ASSERT( path.GetParent(&parent) == B_OK );
1114 CPPUNIT_ASSERT( path.SetTo("/non/existing/dir") == B_OK );
1115 CPPUNIT_ASSERT( path.GetParent(&parent) == B_OK );
1117 path.Unset();
1121 CPPUNIT_ASSERT( path.SetTo("/non/existing/dir") == B_OK );
1122 CPPUNIT_ASSERT( path.GetParent(&path) == B_OK );
1123 CPPUNIT_ASSERT( string("/non/existing") == path.Path() );
1124 CPPUNIT_ASSERT( path.GetParent(&path) == B_OK );
1125 CPPUNIT_ASSERT( string("/non") == path.Path() );
1126 CPPUNIT_ASSERT( path.GetParent(&path) == B_OK );
1127 CPPUNIT_ASSERT( string("/") == path.Path() );
1128 CPPUNIT_ASSERT( path.GetParent(&path) == B_ENTRY_NOT_FOUND );
1129 path.Unset();
1135 CPPUNIT_ASSERT( path.SetTo("/non/existing/dir") == B_OK );
1136 CPPUNIT_ASSERT( path.GetParent(NULL) == B_BAD_VALUE );
1137 path.Unset();
1146 BPath path;
1152 CPPUNIT_ASSERT( path.InitCheck() == B_NO_INIT );
1155 CPPUNIT_ASSERT( (path == path2) == true );
1156 CPPUNIT_ASSERT( (path != path2) == false );
1158 path.Unset();
1162 CPPUNIT_ASSERT( path.SetTo("/") == B_OK );
1164 CPPUNIT_ASSERT( (path == path2) == false );
1165 CPPUNIT_ASSERT( (path != path2) == true );
1166 path.Unset();
1170 CPPUNIT_ASSERT( path.InitCheck() == B_NO_INIT );
1172 CPPUNIT_ASSERT( (path == path2) == false );
1173 CPPUNIT_ASSERT( (path != path2) == true );
1174 path.Unset();
1182 CPPUNIT_ASSERT( path.SetTo(paths[i]) == B_OK );
1184 CPPUNIT_ASSERT( (path == path2) == (i == k) );
1185 CPPUNIT_ASSERT( (path != path2) == (i != k) );
1188 path.Unset();
1195 CPPUNIT_ASSERT( path.InitCheck() == B_NO_INIT );
1197 CPPUNIT_ASSERT( (path == pathName) == false );
1198 CPPUNIT_ASSERT( (path != pathName) == true );
1199 path.Unset();
1204 CPPUNIT_ASSERT( path.SetTo(paths[i]) == B_OK );
1206 CPPUNIT_ASSERT( (path == pathName) == (i == k) );
1207 CPPUNIT_ASSERT( (path != pathName) == (i != k) );
1210 path.Unset();
1212 // R5: initialized path equals NULL argument!
1213 // R5: uninitialized path does not equal NULL argument!
1215 CPPUNIT_ASSERT( path.SetTo("/") == B_OK );
1218 CPPUNIT_ASSERT( (path == pathName) == false );
1219 CPPUNIT_ASSERT( (path != pathName) == true );
1221 path.Unset();
1222 CPPUNIT_ASSERT( path.InitCheck() == B_NO_INIT );
1224 CPPUNIT_ASSERT( (path == pathName) == true );
1225 CPPUNIT_ASSERT( (path != pathName) == false );
1227 path.Unset();
1238 BPath path;
1239 CPPUNIT_ASSERT( path.InitCheck() == B_NO_INIT );
1240 BPath path2(path);
1246 BPath path("/boot/home/Desktop");
1247 CPPUNIT_ASSERT( path.InitCheck() == B_OK );
1248 BPath path2(path);
1250 CPPUNIT_ASSERT( path == path2 );
1257 BPath path;
1259 path2 = path;
1260 CPPUNIT_ASSERT( path.InitCheck() == B_NO_INIT );
1265 BPath path;
1268 path2 = path;
1269 CPPUNIT_ASSERT( path.InitCheck() == B_NO_INIT );
1275 BPath path("/boot/home");
1276 CPPUNIT_ASSERT( path.InitCheck() == B_OK );
1278 path2 = path;
1280 CPPUNIT_ASSERT( path == path2 );
1307 BPath path;
1311 CPPUNIT_ASSERT( path.InitCheck() == B_NO_INIT );
1312 CPPUNIT_ASSERT( path.IsFixedSize() == false );
1313 CPPUNIT_ASSERT( path.TypeCode() == B_REF_TYPE );
1314 CPPUNIT_ASSERT( path.AllowsTypeCode(B_REF_TYPE) == true );
1315 CPPUNIT_ASSERT( path.AllowsTypeCode(B_STRING_TYPE) == false );
1316 CPPUNIT_ASSERT( path.AllowsTypeCode(B_FLOAT_TYPE) == false );
1317 path.Unset();
1320 CPPUNIT_ASSERT( path.SetTo("/boot/home") == B_OK );
1321 CPPUNIT_ASSERT( path.IsFixedSize() == false );
1322 CPPUNIT_ASSERT( path.TypeCode() == B_REF_TYPE );
1323 CPPUNIT_ASSERT( path.AllowsTypeCode(B_REF_TYPE) == true );
1324 CPPUNIT_ASSERT( path.AllowsTypeCode(B_STRING_TYPE) == false );
1325 CPPUNIT_ASSERT( path.AllowsTypeCode(B_FLOAT_TYPE) == false );
1326 path.Unset();
1332 CPPUNIT_ASSERT( path.InitCheck() == B_NO_INIT );
1333 ssize_t size = path.FlattenedSize();
1335 CPPUNIT_ASSERT( path.Flatten(buffer, sizeof(buffer)) == B_OK );
1336 CPPUNIT_ASSERT( path.Unflatten(B_REF_TYPE, buffer, size) == B_OK );
1337 CPPUNIT_ASSERT( path.InitCheck() == B_NO_INIT );
1338 path.Unset();
1346 // init the path and get an equivalent entry ref
1347 CPPUNIT_ASSERT( path.SetTo(pathName) == B_OK );
1352 // flatten the path
1354 size = path.FlattenedSize();
1358 CPPUNIT_ASSERT( path.Flatten(buffer, sizeof(buffer)) == B_OK );
1364 // unflatten the path
1365 path.Unset();
1366 CPPUNIT_ASSERT( path.InitCheck() == B_NO_INIT );
1367 CPPUNIT_ASSERT( path.Unflatten(B_REF_TYPE, buffer, size) == B_OK );
1368 CPPUNIT_ASSERT( path == pathName );
1369 path.Unset();
1375 CPPUNIT_ASSERT( path.SetTo("/boot/home") == B_OK );
1377 CPPUNIT_ASSERT( path.Flatten(NULL, sizeof(buffer)) == B_BAD_VALUE );
1378 CPPUNIT_ASSERT( path.Flatten(buffer, path.FlattenedSize() - 2)
1381 path.Unset();