Skip to content

Commit 494a34b

Browse files
committed
fix test
1 parent 83479cd commit 494a34b

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

engine/src/flutter/lib/ui/semantics/semantics_update_builder_unittests.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ TEST_F(SemanticsUpdateBuilderTest, CanHandleSemanticsLocale) {
145145
ASSERT_EQ(nodes.size(), (size_t)1);
146146
auto node = nodes.find(0)->second;
147147
// Should match the updateNode in ui_test.dart.
148-
ASSERT_EQ(node.locale, "es-MX");
148+
ASSERT_EQ(node.locale, "es_MX");
149149
message_latch->Signal();
150150
};
151151

engine/src/flutter/shell/platform/android/platform_view_android_delegate/platform_view_android_delegate_unittests.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ TEST(PlatformViewShell, UpdateSemanticsDoesUpdateLocale) {
154154
node0.id = 0;
155155
node0.identifier = "identifier";
156156
node0.label = "label";
157-
node0.locale = "es-MX";
157+
node0.locale = "es_MX";
158158
update.insert(std::make_pair(0, node0));
159159

160160
std::vector<uint8_t> expected_buffer(

engine/src/flutter/shell/platform/android/test/io/flutter/view/AccessibilityBridgeTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -869,7 +869,7 @@ public void itBuildsAttributedStringWithLocale() {
869869
TestSemanticsNode root = new TestSemanticsNode();
870870
root.id = 0;
871871
root.label = "label";
872-
root.locale = "es-MX";
872+
root.locale = "es_MX";
873873

874874
TestSemanticsUpdate testSemanticsUpdate = root.toUpdate();
875875
testSemanticsUpdate.sendUpdateToBridge(accessibilityBridge);
@@ -879,7 +879,7 @@ public void itBuildsAttributedStringWithLocale() {
879879
Object[] objectSpans = actual.getSpans(0, actual.length(), Object.class);
880880
assertEquals(objectSpans.length, 1);
881881
LocaleSpan localeSpan = (LocaleSpan) objectSpans[0];
882-
assertEquals(localeSpan.getLocale().toLanguageTag(), "es-MX");
882+
assertEquals(localeSpan.getLocale().toLanguageTag(), "es_MX");
883883
assertEquals(actual.getSpanStart(localeSpan), 0);
884884
assertEquals(actual.getSpanEnd(localeSpan), actual.length());
885885
}

0 commit comments

Comments
 (0)