Changeset 99527 in vbox
- Timestamp:
- Apr 25, 2023 6:40:37 PM (2 years ago)
- svn:sync-xref-src-repo-rev:
- 157036
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libs/xpcom18a4/xpcom/tests/TestHashtables.cpp
r86419 r99527 114 114 PLDHashOperator 115 115 nsTEnumGo(EntityToUnicodeEntry* aEntry, void* userArg) { 116 printf(" enumerated \"%s\" = %u\n", 116 printf(" enumerated \"%s\" = %u\n", 117 117 aEntry->mNode->mStr, aEntry->mNode->mUnicode); 118 118 … … 202 202 PLDHashOperator 203 203 nsCEnumRead(const nsACString& aKey, TestUniChar* aData, void* userArg) { 204 printf(" enumerated \"%s\" = % c\n",204 printf(" enumerated \"%s\" = %u\n", 205 205 PromiseFlatCString(aKey).get(), aData->GetChar()); 206 206 return PL_DHASH_NEXT; … … 209 209 PLDHashOperator 210 210 nsCEnum(const nsACString& aKey, nsAutoPtr<TestUniChar>& aData, void* userArg) { 211 printf(" enumerated \"%s\" = % c\n",211 printf(" enumerated \"%s\" = %u\n", 212 212 PromiseFlatCString(aKey).get(), aData->GetChar()); 213 213 return PL_DHASH_NEXT; … … 278 278 { 279 279 ++refcount_; 280 printf("IFoo@%p::AddRef(), refcount --> %d\n", 280 printf("IFoo@%p::AddRef(), refcount --> %d\n", 281 281 NS_STATIC_CAST(void*, this), refcount_); 282 282 return refcount_; … … 289 289 if ( wrap_message ) 290 290 printf(">>"); 291 291 292 292 nsrefcnt newrefcount = --refcount_; 293 293 printf("IFoo@%p::Release(), refcount --> %d\n", … … 487 487 exit (13); 488 488 } 489 489 490 490 printf("not found; good.\n"); 491 491 492 492 printf("Enumerating:\n"); 493 493 494 494 count = UniToEntity.EnumerateRead(nsDEnumRead, nsnull); 495 495 if (count != ENTITY_COUNT) { … … 497 497 exit (14); 498 498 } 499 499 500 500 printf("Clearing..."); 501 501 UniToEntity.Clear(); … … 552 552 exit (13); 553 553 } 554 554 555 555 printf("not found; good.\n"); 556 556 557 557 printf("Enumerating:\n"); 558 558 559 559 count = UniToEntityL.EnumerateRead(nsDEnumRead, nsnull); 560 560 if (count != ENTITY_COUNT) { … … 562 562 exit (14); 563 563 } 564 564 565 565 printf("Clearing..."); 566 566 UniToEntityL.Clear(); … … 613 613 } 614 614 615 printf("Found % c\n", myChar->GetChar());615 printf("Found %u\n", myChar->GetChar()); 616 616 } 617 617 … … 621 621 exit (19); 622 622 } 623 623 624 624 printf("not found; good.\n"); 625 625 626 626 printf("Enumerating:\n"); 627 627 628 628 count = EntToUniClass.EnumerateRead(nsCEnumRead, nsnull); 629 629 if (count != ENTITY_COUNT) { … … 631 631 exit (20); 632 632 } 633 633 634 634 printf("Clearing...\n"); 635 635 EntToUniClass.Clear(); … … 681 681 } 682 682 683 printf("Found % c\n", myChar->GetChar());683 printf("Found %u\n", myChar->GetChar()); 684 684 } 685 685 … … 689 689 exit (19); 690 690 } 691 691 692 692 printf("not found; good.\n"); 693 693 694 694 printf("Enumerating:\n"); 695 695 696 696 count = EntToUniClassL.EnumerateRead(nsCEnumRead, nsnull); 697 697 if (count != ENTITY_COUNT) { … … 699 699 exit (20); 700 700 } 701 701 702 702 printf("Clearing...\n"); 703 703 EntToUniClassL.Clear(); … … 735 735 CreateIFoo(getter_AddRefs(foo)); 736 736 foo->SetString(nsDependentCString(gEntities[i].mStr)); 737 738 737 738 739 739 fooArray.InsertObjectAt(foo, i); 740 740 … … 751 751 for (i = 0; i < ENTITY_COUNT; ++i) { 752 752 printf(" Getting entry %s...", gEntities[i].mStr); 753 753 754 754 if (!EntToUniClass2.Get(fooArray[i], &myChar2)) { 755 755 printf("FAILED\n"); … … 757 757 } 758 758 759 printf("Found % c\n", myChar2);759 printf("Found %u\n", myChar2); 760 760 } 761 761 … … 765 765 exit (25); 766 766 } 767 767 768 768 printf("not found; good.\n"); 769 769 770 770 printf("Enumerating:\n"); 771 771 772 772 count = EntToUniClass2.EnumerateRead(nsIEnum2Read, nsnull); 773 773 if (count != ENTITY_COUNT) { … … 775 775 exit (26); 776 776 } 777 777 778 778 printf("Clearing...\n"); 779 779 EntToUniClass2.Clear(); … … 809 809 CreateIFoo(getter_AddRefs(foo)); 810 810 foo->SetString(nsDependentCString(gEntities[i].mStr)); 811 811 812 812 if (!UniToEntClass2.Put(gEntities[i].mUnicode, foo)) { 813 813 printf("FAILED\n"); … … 821 821 for (i = 0; i < ENTITY_COUNT; ++i) { 822 822 printf(" Getting entry %s...", gEntities[i].mStr); 823 823 824 824 nsCOMPtr<IFoo> myEnt; 825 825 if (!UniToEntClass2.Get(gEntities[i].mUnicode, getter_AddRefs(myEnt))) { … … 827 827 exit (30); 828 828 } 829 829 830 830 nsCAutoString str; 831 831 myEnt->GetString(str); … … 839 839 exit (31); 840 840 } 841 841 842 842 printf("not found; good.\n"); 843 843 844 844 printf("Enumerating:\n"); 845 845 846 846 count = UniToEntClass2.EnumerateRead(nsIEnumRead, nsnull); 847 847 if (count != ENTITY_COUNT) { … … 849 849 exit (32); 850 850 } 851 851 852 852 printf("Clearing...\n"); 853 853 UniToEntClass2.Clear(); … … 883 883 CreateIFoo(getter_AddRefs(foo)); 884 884 foo->SetString(nsDependentCString(gEntities[i].mStr)); 885 885 886 886 if (!UniToEntClass2L.Put(gEntities[i].mUnicode, foo)) { 887 887 printf("FAILED\n"); … … 895 895 for (i = 0; i < ENTITY_COUNT; ++i) { 896 896 printf(" Getting entry %s...", gEntities[i].mStr); 897 897 898 898 nsCOMPtr<IFoo> myEnt; 899 899 if (!UniToEntClass2L.Get(gEntities[i].mUnicode, getter_AddRefs(myEnt))) { … … 901 901 exit (30); 902 902 } 903 903 904 904 nsCAutoString str; 905 905 myEnt->GetString(str); … … 912 912 exit (31); 913 913 } 914 914 915 915 printf("not found; good.\n"); 916 916 917 917 printf("Enumerating:\n"); 918 918 919 919 count = UniToEntClass2L.EnumerateRead(nsIEnumRead, nsnull); 920 920 if (count != ENTITY_COUNT) { … … 922 922 exit (32); 923 923 } 924 924 925 925 printf("Clearing...\n"); 926 926 UniToEntClass2L.Clear();
Note:
See TracChangeset
for help on using the changeset viewer.