/**
* @inheritDoc
*/
+ public Type key_type {
+ get { return typeof (K); }
+ }
+
+ /**
+ * @inheritDoc
+ */
+ public Type value_type {
+ get { return typeof (V); }
+ }
+
+ /**
+ * @inheritDoc
+ */
public Type element_type {
get { return typeof (Map.Entry<K,V>); }
}
public abstract Map<K,V> read_only_view { owned get; }
/**
+ * The type of the keys in this map.
+ */
+ public abstract Type key_type { get; }
+
+ /**
+ * The type of the values in this map.
+ */
+ public abstract Type value_type { get; }
+
+ /**
* Returns an immutable empty map.
*
* @return an immutable empty map
/**
* @inheritDoc
*/
+ public Type key_type {
+ get { return typeof (K); }
+ }
+
+ /**
+ * @inheritDoc
+ */
+ public Type value_type {
+ get { return typeof (V); }
+ }
+
+ /**
+ * @inheritDoc
+ */
public Type element_type {
get { return typeof (Map.Entry<K,V>); }
}
public MapTests (string name) {
base (name);
+ add_test ("[Map] type correctness", test_type_correctness);
add_test ("[Map] has_key, size and is_empty",
test_has_key_size_is_empty);
add_test ("[Map] keys", test_keys);
protected Map<string, string> test_map;
+ public void test_type_correctness () {
+ // Check the map exists
+ assert (test_map != null);
+
+ // Check the advertised key and value types
+ assert (test_map.key_type == typeof (string));
+ assert (test_map.value_type == typeof (string));
+ }
+
public void test_has_key_size_is_empty () {
// Check the collection exists
assert (test_map != null);