Public Member Functions | Private Member Functions | Static Private Member Functions | List of all members
com.google.protobuf.MapTest Class Reference
Inheritance diagram for com.google.protobuf.MapTest:
Inheritance graph
[legend]

Public Member Functions

void doTestGetOrDefault (TestMapOrBuilder testMapOrBuilder)
 
void doTestGetOrThrow (TestMapOrBuilder testMapOrBuilder)
 
void testContains ()
 
void testCount ()
 
void testDeterministicSerialziation () throws Exception
 
void testDynamicMessage () throws Exception
 
void testDynamicMessageUnsetKeyAndValue () throws Exception
 
void testEqualsAndHashCode () throws Exception
 
void testGetMap ()
 
void testGetMapIsImmutable ()
 
void testGetOrDefault ()
 
void testGetOrThrow ()
 
void testGettersAndSetters () throws Exception
 
void testInitFromFullyDynamicMessage ()
 
void testInitFromPartialDynamicMessage ()
 
void testIterationOrder () throws Exception
 
void testMap_withNulls ()
 
void testMergeFrom () throws Exception
 
void testMutableMapLifecycle ()
 
void testMutableMapLifecycle_collections ()
 
void testNestedBuilderOnChangeEventPropagation ()
 
void testNestedBuilderOnChangeEventPropagationReflection ()
 
void testParseError () throws Exception
 
void testPut ()
 
void testPutAll () throws Exception
 
void testPutAllForUnknownEnumValues () throws Exception
 
void testPutChecksNullKeysAndValues () throws Exception
 
void testPutForUnknownEnumValues () throws Exception
 
void testReflectionApi () throws Exception
 
void testReflectionEqualsAndHashCode () throws Exception
 
void testRemove ()
 
void testReservedWordsFieldNames ()
 
void testSerializeAndParse () throws Exception
 
void testSetMapValues ()
 
void testTextFormat () throws Exception
 
void testUnknownEnumValues () throws Exception
 
void testUnknownEnumValuesInReflectionApi () throws Exception
 
void testUpdateMapValues ()
 

Private Member Functions

void assertMapContainsSetValues (TestMapOrBuilder testMapOrBuilder)
 
void assertMapCounts (int expectedCount, TestMapOrBuilder testMapOrBuilder)
 
void assertMapsAreImmutable (TestMapOrBuilder testMapOrBuilder)
 
void assertMapValuesCleared (TestMapOrBuilder testMapOrBuilder)
 
void assertMapValuesSet (TestMap message)
 
void assertMapValuesUpdated (TestMap message)
 
void copyMapValues (TestMap source, TestMap.Builder destination)
 
int readMapIntegerKey (CodedInputStream input) throws IOException
 
long readMapLongKey (CodedInputStream input) throws IOException
 
String readMapStringKey (CodedInputStream input) throws IOException
 
void setMapValuesUsingAccessors (TestMap.Builder builder)
 
void setMapValuesUsingMutableMap (TestMap.Builder builder)
 
TestMap tryParseTestMap (BizarroTestMap bizarroMap) throws IOException
 
void updateMapValuesUsingAccessors (TestMap.Builder builder)
 
void updateMapValuesUsingMutableMap (TestMap.Builder builder)
 

Static Private Member Functions

static void assertHasMapValues (Message message, String name, Map<?, ?> values)
 
static FieldDescriptor f (String name)
 
static Object getFieldValue (Message mapEntry, String name)
 
static< K, V > Map< K, V > mapForValues (K key1, V value1, K key2, V value2)
 
static< K, V > Map< K, V > newMap (K key1, V value1)
 
static< K, V > Map< K, V > newMap (K key1, V value1, K key2, V value2)
 
static< K, V > Map< K, V > newMap (K key1, V value1, K key2, V value2, K key3, V value3)
 
static< K, V > Message newMapEntry (Message.Builder builder, String name, K key, V value)
 
static Message.Builder setFieldValue (Message.Builder mapEntry, String name, Object value)
 
static void setMapValues (Message.Builder builder, String name, Map<?, ?> values)
 

Detailed Description

Unit tests for map fields.

Definition at line 56 of file MapTest.java.

Member Function Documentation

◆ assertHasMapValues()

static void com.google.protobuf.MapTest.assertHasMapValues ( Message  message,
String  name,
Map<?, ?>  values 
)
inlinestaticprivate

Definition at line 724 of file MapTest.java.

◆ assertMapContainsSetValues()

void com.google.protobuf.MapTest.assertMapContainsSetValues ( TestMapOrBuilder  testMapOrBuilder)
inlineprivate

Definition at line 1026 of file MapTest.java.

◆ assertMapCounts()

void com.google.protobuf.MapTest.assertMapCounts ( int  expectedCount,
TestMapOrBuilder  testMapOrBuilder 
)
inlineprivate

Definition at line 1077 of file MapTest.java.

◆ assertMapsAreImmutable()

void com.google.protobuf.MapTest.assertMapsAreImmutable ( TestMapOrBuilder  testMapOrBuilder)
inlineprivate

Definition at line 298 of file MapTest.java.

◆ assertMapValuesCleared()

void com.google.protobuf.MapTest.assertMapValuesCleared ( TestMapOrBuilder  testMapOrBuilder)
inlineprivate

Definition at line 273 of file MapTest.java.

◆ assertMapValuesSet()

void com.google.protobuf.MapTest.assertMapValuesSet ( TestMap  message)
inlineprivate

Definition at line 133 of file MapTest.java.

◆ assertMapValuesUpdated()

void com.google.protobuf.MapTest.assertMapValuesUpdated ( TestMap  message)
inlineprivate

Definition at line 241 of file MapTest.java.

◆ copyMapValues()

void com.google.protobuf.MapTest.copyMapValues ( TestMap  source,
TestMap.Builder  destination 
)
inlineprivate

Definition at line 123 of file MapTest.java.

◆ doTestGetOrDefault()

void com.google.protobuf.MapTest.doTestGetOrDefault ( TestMapOrBuilder  testMapOrBuilder)
inline

Definition at line 1094 of file MapTest.java.

◆ doTestGetOrThrow()

void com.google.protobuf.MapTest.doTestGetOrThrow ( TestMapOrBuilder  testMapOrBuilder)
inline

Definition at line 1136 of file MapTest.java.

◆ f()

static FieldDescriptor com.google.protobuf.MapTest.f ( String  name)
inlinestaticprivate

Definition at line 708 of file MapTest.java.

◆ getFieldValue()

static Object com.google.protobuf.MapTest.getFieldValue ( Message  mapEntry,
String  name 
)
inlinestaticprivate

Definition at line 712 of file MapTest.java.

◆ mapForValues()

static <K, V> Map<K, V> com.google.protobuf.MapTest.mapForValues ( K  key1,
value1,
K  key2,
value2 
)
inlinestaticprivate

Definition at line 762 of file MapTest.java.

◆ newMap() [1/3]

static <K, V> Map<K, V> com.google.protobuf.MapTest.newMap ( K  key1,
value1 
)
inlinestaticprivate

Definition at line 1451 of file MapTest.java.

◆ newMap() [2/3]

static <K, V> Map<K, V> com.google.protobuf.MapTest.newMap ( K  key1,
value1,
K  key2,
value2 
)
inlinestaticprivate

Definition at line 1457 of file MapTest.java.

◆ newMap() [3/3]

static <K, V> Map<K, V> com.google.protobuf.MapTest.newMap ( K  key1,
value1,
K  key2,
value2,
K  key3,
value3 
)
inlinestaticprivate

Definition at line 1464 of file MapTest.java.

◆ newMapEntry()

static <K, V> Message com.google.protobuf.MapTest.newMapEntry ( Message.Builder  builder,
String  name,
K  key,
value 
)
inlinestaticprivate

Definition at line 743 of file MapTest.java.

◆ readMapIntegerKey()

int com.google.protobuf.MapTest.readMapIntegerKey ( CodedInputStream  input) throws IOException
inlineprivate

Definition at line 1421 of file MapTest.java.

◆ readMapLongKey()

long com.google.protobuf.MapTest.readMapLongKey ( CodedInputStream  input) throws IOException
inlineprivate

Definition at line 1431 of file MapTest.java.

◆ readMapStringKey()

String com.google.protobuf.MapTest.readMapStringKey ( CodedInputStream  input) throws IOException
inlineprivate

Definition at line 1441 of file MapTest.java.

◆ setFieldValue()

static Message.Builder com.google.protobuf.MapTest.setFieldValue ( Message.Builder  mapEntry,
String  name,
Object  value 
)
inlinestaticprivate

Definition at line 717 of file MapTest.java.

◆ setMapValues()

static void com.google.protobuf.MapTest.setMapValues ( Message.Builder  builder,
String  name,
Map<?, ?>  values 
)
inlinestaticprivate

Definition at line 753 of file MapTest.java.

◆ setMapValuesUsingAccessors()

void com.google.protobuf.MapTest.setMapValuesUsingAccessors ( TestMap.Builder  builder)
inlineprivate

Definition at line 87 of file MapTest.java.

◆ setMapValuesUsingMutableMap()

void com.google.protobuf.MapTest.setMapValuesUsingMutableMap ( TestMap.Builder  builder)
inlineprivate

Definition at line 58 of file MapTest.java.

◆ testContains()

void com.google.protobuf.MapTest.testContains ( )
inline

Definition at line 1019 of file MapTest.java.

◆ testCount()

void com.google.protobuf.MapTest.testCount ( )
inline

Definition at line 1058 of file MapTest.java.

◆ testDeterministicSerialziation()

void com.google.protobuf.MapTest.testDeterministicSerialziation ( ) throws Exception
inline

Definition at line 1299 of file MapTest.java.

◆ testDynamicMessage()

void com.google.protobuf.MapTest.testDynamicMessage ( ) throws Exception
inline

Definition at line 869 of file MapTest.java.

◆ testDynamicMessageUnsetKeyAndValue()

void com.google.protobuf.MapTest.testDynamicMessageUnsetKeyAndValue ( ) throws Exception
inline

Definition at line 884 of file MapTest.java.

◆ testEqualsAndHashCode()

void com.google.protobuf.MapTest.testEqualsAndHashCode ( ) throws Exception
inline

Definition at line 605 of file MapTest.java.

◆ testGetMap()

void com.google.protobuf.MapTest.testGetMap ( )
inline

Definition at line 1008 of file MapTest.java.

◆ testGetMapIsImmutable()

void com.google.protobuf.MapTest.testGetMapIsImmutable ( )
inline

Definition at line 288 of file MapTest.java.

◆ testGetOrDefault()

void com.google.protobuf.MapTest.testGetOrDefault ( )
inline

Definition at line 1086 of file MapTest.java.

◆ testGetOrThrow()

void com.google.protobuf.MapTest.testGetOrThrow ( )
inline

Definition at line 1128 of file MapTest.java.

◆ testGettersAndSetters()

void com.google.protobuf.MapTest.testGettersAndSetters ( ) throws Exception
inline

Definition at line 427 of file MapTest.java.

◆ testInitFromFullyDynamicMessage()

void com.google.protobuf.MapTest.testInitFromFullyDynamicMessage ( )
inline

Definition at line 1395 of file MapTest.java.

◆ testInitFromPartialDynamicMessage()

void com.google.protobuf.MapTest.testInitFromPartialDynamicMessage ( )
inline

Definition at line 1374 of file MapTest.java.

◆ testIterationOrder()

void com.google.protobuf.MapTest.testIterationOrder ( ) throws Exception
inline

Definition at line 999 of file MapTest.java.

◆ testMap_withNulls()

void com.google.protobuf.MapTest.testMap_withNulls ( )
inline

Definition at line 1472 of file MapTest.java.

◆ testMergeFrom()

void com.google.protobuf.MapTest.testMergeFrom ( ) throws Exception
inline

Definition at line 595 of file MapTest.java.

◆ testMutableMapLifecycle()

void com.google.protobuf.MapTest.testMutableMapLifecycle ( )
inline

Definition at line 317 of file MapTest.java.

◆ testMutableMapLifecycle_collections()

void com.google.protobuf.MapTest.testMutableMapLifecycle_collections ( )
inline

Definition at line 381 of file MapTest.java.

◆ testNestedBuilderOnChangeEventPropagation()

void com.google.protobuf.MapTest.testNestedBuilderOnChangeEventPropagation ( )
inline

Definition at line 643 of file MapTest.java.

◆ testNestedBuilderOnChangeEventPropagationReflection()

void com.google.protobuf.MapTest.testNestedBuilderOnChangeEventPropagationReflection ( )
inline

Definition at line 672 of file MapTest.java.

◆ testParseError()

void com.google.protobuf.MapTest.testParseError ( ) throws Exception
inline

Definition at line 562 of file MapTest.java.

◆ testPut()

void com.google.protobuf.MapTest.testPut ( )
inline

Definition at line 1206 of file MapTest.java.

◆ testPutAll()

void com.google.protobuf.MapTest.testPutAll ( ) throws Exception
inline

Definition at line 449 of file MapTest.java.

◆ testPutAllForUnknownEnumValues()

void com.google.protobuf.MapTest.testPutAllForUnknownEnumValues ( ) throws Exception
inline

Definition at line 460 of file MapTest.java.

◆ testPutChecksNullKeysAndValues()

void com.google.protobuf.MapTest.testPutChecksNullKeysAndValues ( ) throws Exception
inline

Definition at line 492 of file MapTest.java.

◆ testPutForUnknownEnumValues()

void com.google.protobuf.MapTest.testPutForUnknownEnumValues ( ) throws Exception
inline

Definition at line 479 of file MapTest.java.

◆ testReflectionApi()

void com.google.protobuf.MapTest.testReflectionApi ( ) throws Exception
inline

Definition at line 769 of file MapTest.java.

◆ testReflectionEqualsAndHashCode()

void com.google.protobuf.MapTest.testReflectionEqualsAndHashCode ( ) throws Exception
inline

Definition at line 899 of file MapTest.java.

◆ testRemove()

void com.google.protobuf.MapTest.testRemove ( )
inline

Definition at line 1253 of file MapTest.java.

◆ testReservedWordsFieldNames()

void com.google.protobuf.MapTest.testReservedWordsFieldNames ( )
inline

Definition at line 1294 of file MapTest.java.

◆ testSerializeAndParse()

void com.google.protobuf.MapTest.testSerializeAndParse ( ) throws Exception
inline

Definition at line 531 of file MapTest.java.

◆ testSetMapValues()

void com.google.protobuf.MapTest.testSetMapValues ( )
inline

Definition at line 109 of file MapTest.java.

◆ testTextFormat()

void com.google.protobuf.MapTest.testTextFormat ( ) throws Exception
inline

Definition at line 855 of file MapTest.java.

◆ testUnknownEnumValues()

void com.google.protobuf.MapTest.testUnknownEnumValues ( ) throws Exception
inline

Definition at line 930 of file MapTest.java.

◆ testUnknownEnumValuesInReflectionApi()

void com.google.protobuf.MapTest.testUnknownEnumValuesInReflectionApi ( ) throws Exception
inline

Definition at line 966 of file MapTest.java.

◆ testUpdateMapValues()

void com.google.protobuf.MapTest.testUpdateMapValues ( )
inline

Definition at line 215 of file MapTest.java.

◆ tryParseTestMap()

TestMap com.google.protobuf.MapTest.tryParseTestMap ( BizarroTestMap  bizarroMap) throws IOException
inlineprivate

Definition at line 554 of file MapTest.java.

◆ updateMapValuesUsingAccessors()

void com.google.protobuf.MapTest.updateMapValuesUsingAccessors ( TestMap.Builder  builder)
inlineprivate

Definition at line 193 of file MapTest.java.

◆ updateMapValuesUsingMutableMap()

void com.google.protobuf.MapTest.updateMapValuesUsingMutableMap ( TestMap.Builder  builder)
inlineprivate

Definition at line 165 of file MapTest.java.


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


libaditof
Author(s):
autogenerated on Wed May 21 2025 02:07:07