Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Instance Methods | Properties | List of all members
MockTextChecker Class Reference
Inheritance diagram for MockTextChecker:

Instance Methods

(void) - mockResultRange:suggestions:withStartingIndex:
 
(void) - reset
 
(instancetype) - init [implementation]
 
(void) - mockResultRange:suggestions:withStartingIndex: [implementation]
 
(NSRange) - rangeOfMisspelledWordInString:range:startingAt:wrap:language: [implementation]
 
(NSArray< NSString * > *) - guessesForWordRange:inString:language: [implementation]
 

Properties

NSMutableDictionary< NSNumber *, NSValue * > * startingIndexToRange
 
NSMutableDictionary< NSString *, NSArray< NSString * > * > * rangeToSuggestions
 

Detailed Description

Definition at line 16 of file FlutterSpellCheckPluginTest.mm.

Method Documentation

◆ guessesForWordRange:inString:language:

- (NSArray< NSString * > *) guessesForWordRange: (NSRange)  range
inString: (NSString*)  string
language: (NSString*)  language 
implementation

Definition at line 27 of file FlutterSpellCheckPluginTest.mm.

79 :(NSRange)range
80 inString:(NSString*)string
81 language:(NSString*)language {
82 return self.rangeToSuggestions[NSStringFromRange(range)];
83}
NSMutableDictionary< NSString *, NSArray< NSString * > * > * rangeToSuggestions

◆ init

- (instancetype) init
implementation

Definition at line 27 of file FlutterSpellCheckPluginTest.mm.

46 {
47 self = [super init];
48 if (self) {
49 _startingIndexToRange = [[NSMutableDictionary alloc] init];
50 _rangeToSuggestions = [[NSMutableDictionary alloc] init];
51 }
52 return self;
53}

◆ mockResultRange:suggestions:withStartingIndex: [1/2]

- (void) mockResultRange: (NSRange)  range
suggestions: (NSArray<NSString*>*)  suggestions
withStartingIndex: (NSInteger)  startingIndex 
implementation

Definition at line 27 of file FlutterSpellCheckPluginTest.mm.

55 :(NSRange)range
56 suggestions:(NSArray<NSString*>*)suggestions
57 withStartingIndex:(NSInteger)startingIndex {
58 NSValue* valueForRange = [NSValue valueWithRange:range];
59 self.startingIndexToRange[@(startingIndex)] = valueForRange;
60 NSString* rangeString = NSStringFromRange(valueForRange.rangeValue);
61 self.rangeToSuggestions[rangeString] = suggestions;
62}

◆ mockResultRange:suggestions:withStartingIndex: [2/2]

- (void) mockResultRange: (NSRange)  range
suggestions: (nonnull NSArray< NSString * > *)  suggestions
withStartingIndex: (NSInteger)  startingIndex 

◆ rangeOfMisspelledWordInString:range:startingAt:wrap:language:

- (NSRange) rangeOfMisspelledWordInString: (NSString*)  stringToCheck
range: (NSRange)  range
startingAt: (NSInteger)  startingOffset
wrap: (BOOL wrapFlag
language: (NSString*)  language 
implementation

Definition at line 27 of file FlutterSpellCheckPluginTest.mm.

71 :(NSString*)stringToCheck
72 range:(NSRange)range
73 startingAt:(NSInteger)startingOffset
74 wrap:(BOOL)wrapFlag
75 language:(NSString*)language {
76 return self.startingIndexToRange[@(startingOffset)].rangeValue;
77}
NSMutableDictionary< NSNumber *, NSValue * > * startingIndexToRange
int BOOL

◆ reset

- (void) reset

Definition at line 27 of file FlutterSpellCheckPluginTest.mm.

64 {
65 [self.startingIndexToRange removeAllObjects];
66 [self.rangeToSuggestions removeAllObjects];
67}

Property Documentation

◆ rangeToSuggestions

- (NSMutableDictionary<NSString*, NSArray<NSString*>*>*) rangeToSuggestions
readwritenonatomicstrong

Definition at line 27 of file FlutterSpellCheckPluginTest.mm.

◆ startingIndexToRange

- (NSMutableDictionary<NSNumber*, NSValue*>*) startingIndexToRange
readwritenonatomicstrong

Definition at line 21 of file FlutterSpellCheckPluginTest.mm.


The documentation for this class was generated from the following file: