649 {
654 node.
label =
"label";
655 std::shared_ptr<flutter::SpellOutStringAttribute> attribute =
656 std::make_shared<flutter::SpellOutStringAttribute>();
657 attribute->start = 1;
658 attribute->end = 2;
661 node.
value =
"value";
662 attribute = std::make_shared<flutter::SpellOutStringAttribute>();
663 attribute->start = 2;
664 attribute->end = 3;
668 std::shared_ptr<flutter::LocaleStringAttribute> local_attribute =
669 std::make_shared<flutter::LocaleStringAttribute>();
670 local_attribute->start = 3;
671 local_attribute->end = 4;
673 local_attribute->locale = "en-MX";
677 NSMutableAttributedString* expectedAttributedLabel =
678 [[NSMutableAttributedString alloc] initWithString:NSLocalizedString(@"label", @"test")];
679 NSDictionary* attributeDict = @{
680 UIAccessibilitySpeechAttributeSpellOut : @YES,
681 };
682 [expectedAttributedLabel setAttributes:attributeDict range:NSMakeRange(1, 1)];
683 XCTAssertTrue(
684 [object.accessibilityAttributedLabel isEqualToAttributedString:expectedAttributedLabel]);
685
686 NSMutableAttributedString* expectedAttributedValue =
687 [[NSMutableAttributedString alloc] initWithString:NSLocalizedString(@"value", @"test")];
688 attributeDict = @{
689 UIAccessibilitySpeechAttributeSpellOut : @YES,
690 };
691 [expectedAttributedValue setAttributes:attributeDict range:NSMakeRange(2, 1)];
692 XCTAssertTrue(
693 [object.accessibilityAttributedValue isEqualToAttributedString:expectedAttributedValue]);
694
695 NSMutableAttributedString* expectedAttributedHint =
696 [[NSMutableAttributedString alloc] initWithString:NSLocalizedString(@"hint", @"test")];
697 attributeDict = @{
698 UIAccessibilitySpeechAttributeLanguage : @"en-MX",
699 };
700 [expectedAttributedHint setAttributes:attributeDict range:NSMakeRange(3, 1)];
701 XCTAssertTrue(
702 [object.accessibilityAttributedHint isEqualToAttributedString:expectedAttributedHint]);
703}
StringAttributes hintAttributes
StringAttributes valueAttributes
StringAttributes labelAttributes