| OLD | NEW |
| 1 /******************************************************************** | 1 /******************************************************************** |
| 2 * COPYRIGHT: | 2 * COPYRIGHT: |
| 3 * Copyright (c) 1999-2010, International Business Machines Corporation and | 3 * Copyright (c) 1999-2010, International Business Machines Corporation and |
| 4 * others. All Rights Reserved. | 4 * others. All Rights Reserved. |
| 5 ********************************************************************/ | 5 ********************************************************************/ |
| 6 /************************************************************************ | 6 /************************************************************************ |
| 7 * Date Name Description | 7 * Date Name Description |
| 8 * 12/15/99 Madhu Creation. | 8 * 12/15/99 Madhu Creation. |
| 9 * 01/12/2000 Madhu Updated for changed API and added new tests | 9 * 01/12/2000 Madhu Updated for changed API and added new tests |
| 10 ************************************************************************/ | 10 ************************************************************************/ |
| 11 | 11 |
| 12 #include <typeinfo> // for 'typeid' to work | |
| 13 | 12 |
| 14 #include "unicode/utypes.h" | 13 #include "unicode/utypes.h" |
| 15 | 14 |
| 16 #if !UCONFIG_NO_BREAK_ITERATION | 15 #if !UCONFIG_NO_BREAK_ITERATION |
| 17 | 16 |
| 18 #include "unicode/utypes.h" | 17 #include "unicode/utypes.h" |
| 19 #include "unicode/brkiter.h" | 18 #include "unicode/brkiter.h" |
| 20 #include "unicode/rbbi.h" | 19 #include "unicode/rbbi.h" |
| 21 #include "unicode/uchar.h" | 20 #include "unicode/uchar.h" |
| 22 #include "unicode/utf16.h" | 21 #include "unicode/utf16.h" |
| (...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 755 errln("Could not open compact trie dictionary enumerator: %s\n", u_error
Name(status)); | 754 errln("Could not open compact trie dictionary enumerator: %s\n", u_error
Name(status)); |
| 756 goto cleanup; | 755 goto cleanup; |
| 757 } | 756 } |
| 758 | 757 |
| 759 if (wordCount != (testCount = enumer2->count(status))) { | 758 if (wordCount != (testCount = enumer2->count(status))) { |
| 760 errln("CompactTrieDictionary word count (%d) differs from file word coun
t (%d), with status %s\n", | 759 errln("CompactTrieDictionary word count (%d) differs from file word coun
t (%d), with status %s\n", |
| 761 testCount, wordCount, u_errorName(status)); | 760 testCount, wordCount, u_errorName(status)); |
| 762 goto cleanup; | 761 goto cleanup; |
| 763 } | 762 } |
| 764 | 763 |
| 765 if (typeid(*enumer1) == typeid(*enumer2)) { | 764 if (CR_TYPEID(*enumer1) == CR_TYPEID(*enumer2)) { |
| 766 errln("CompactTrieEnumeration and MutableTrieEnumeration typeids are the
same"); | 765 errln("CompactTrieEnumeration and MutableTrieEnumeration typeids are the
same"); |
| 767 } | 766 } |
| 768 delete enumer1; | 767 delete enumer1; |
| 769 enumer1 = NULL; | 768 enumer1 = NULL; |
| 770 delete enumer2; | 769 delete enumer2; |
| 771 enumer2 = NULL; | 770 enumer2 = NULL; |
| 772 | 771 |
| 773 // Now un-compact it | 772 // Now un-compact it |
| 774 mutable2 = compactDict->cloneMutable(status); | 773 mutable2 = compactDict->cloneMutable(status); |
| 775 if (U_FAILURE(status)) { | 774 if (U_FAILURE(status)) { |
| (...skipping 4408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5184 pos = bi->last(); | 5183 pos = bi->last(); |
| 5185 do { | 5184 do { |
| 5186 // ruleStatus = bi->getRuleStatus(); | 5185 // ruleStatus = bi->getRuleStatus(); |
| 5187 printf("%d\t%d\n", pos, ruleStatus); | 5186 printf("%d\t%d\n", pos, ruleStatus); |
| 5188 pos = bi->previous(); | 5187 pos = bi->previous(); |
| 5189 } while (pos != BreakIterator::DONE); | 5188 } while (pos != BreakIterator::DONE); |
| 5190 #endif | 5189 #endif |
| 5191 } | 5190 } |
| 5192 | 5191 |
| 5193 #endif /* #if !UCONFIG_NO_BREAK_ITERATION */ | 5192 #endif /* #if !UCONFIG_NO_BREAK_ITERATION */ |
| OLD | NEW |