683 {
688 node.
label =
"label";
689 std::shared_ptr<flutter::SpellOutStringAttribute> attribute =
690 std::make_shared<flutter::SpellOutStringAttribute>();
691 attribute->start = 1;
692 attribute->end = 2;
695 node.
value =
"value";
696 attribute = std::make_shared<flutter::SpellOutStringAttribute>();
697 attribute->start = 2;
698 attribute->end = 3;
702 std::shared_ptr<flutter::LocaleStringAttribute> local_attribute =
703 std::make_shared<flutter::LocaleStringAttribute>();
704 local_attribute->start = 3;
705 local_attribute->end = 4;
707 local_attribute->locale = "en-MX";
711 NSMutableAttributedString* expectedAttributedLabel =
712 [[NSMutableAttributedString alloc] initWithString:NSLocalizedString(@"label", @"test")];
713 NSDictionary* attributeDict = @{
714 UIAccessibilitySpeechAttributeSpellOut : @YES,
715 };
716 [expectedAttributedLabel setAttributes:attributeDict range:NSMakeRange(1, 1)];
717 XCTAssertTrue(
718 [object.accessibilityAttributedLabel isEqualToAttributedString:expectedAttributedLabel]);
719
720 NSMutableAttributedString* expectedAttributedValue =
721 [[NSMutableAttributedString alloc] initWithString:NSLocalizedString(@"value", @"test")];
722 attributeDict = @{
723 UIAccessibilitySpeechAttributeSpellOut : @YES,
724 };
725 [expectedAttributedValue setAttributes:attributeDict range:NSMakeRange(2, 1)];
726 XCTAssertTrue(
727 [object.accessibilityAttributedValue isEqualToAttributedString:expectedAttributedValue]);
728
729 NSMutableAttributedString* expectedAttributedHint =
730 [[NSMutableAttributedString alloc] initWithString:NSLocalizedString(@"hint", @"test")];
731 attributeDict = @{
732 UIAccessibilitySpeechAttributeLanguage : @"en-MX",
733 };
734 [expectedAttributedHint setAttributes:attributeDict range:NSMakeRange(3, 1)];
735 XCTAssertTrue(
736 [object.accessibilityAttributedHint isEqualToAttributedString:expectedAttributedHint]);
737}
StringAttributes hintAttributes
StringAttributes valueAttributes
StringAttributes labelAttributes