Skip to content

Commit d365736

Browse files
Cherrypick test improvements
1 parent 299774c commit d365736

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

‎java/core/src/test/java/com/google/protobuf/ImportOptionTest.java‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
import com.google.protobuf.Descriptors.Descriptor;
66
import com.google.protobuf.Descriptors.FieldDescriptor;
77
import com.google.protobuf.Descriptors.FileDescriptor;
8-
import proto2_unittest.UnittestCustomOptions;
9-
import proto2_unittest_import_option.TestMessage;
10-
import proto2_unittest_import_option.UnittestImportOptionProto;
118
import org.junit.Test;
129
import org.junit.runner.RunWith;
1310
import org.junit.runners.JUnit4;
11+
import proto2_unittest.UnittestCustomOptions;
12+
import proto2_unittest_import_option.TestMessage;
13+
import proto2_unittest_import_option.UnittestImportOptionProto;
1414

1515
/** Unit test for import option. */
1616
@RunWith(JUnit4.class)
@@ -36,5 +36,8 @@ public void testImportOption() throws Exception {
3636
// TODO: Since `option_deps` are treated as `deps` in Bazel 7, the unknown
3737
// fields are not empty. Once we drop Bazel 7 support we can test that these are filled with
3838
// unknown fields.
39+
assertThat(unknownFieldsFile.asMap().size()).isAtMost(1);
40+
assertThat(unknownFieldsMessage.asMap().size()).isAtMost(1);
41+
assertThat(unknownFieldsField.asMap().size()).isAtMost(1);
3942
}
4043
}

0 commit comments

Comments
 (0)