public void RemoveFromBranchWithLeafKeyEqualToArgumentShouldStayAnotherChild() { IImmutableIntMap <string> left = this.empty.Add(5, "hello"); IImmutableIntMap <string> branch = left.Add(7, "there"); IImmutableIntMap <string> node1 = branch.Remove(7); Assert.That(node1, Is.SameAs(left)); IImmutableIntMap <string> node2 = branch.Remove(5); Assert.That(node2 is LeafNode <string>); Assert.That((node2 as LeafNode <string>).Key, Is.EqualTo(7)); Assert.That((node2 as LeafNode <string>).Value, Is.EqualTo("there")); }
public void AddCallOnThis(APC pc) { this.call_on_this_map = this.call_on_this_map.Add(pc.Block.Index, true); }
public APCMap(Subroutine parent) { this.block_map = new Dictionary <int, T> [parent.BlockCount]; this.call_on_this_map = ImmutableIntMap <bool> .Empty(); }
private ImmutableMap(IImmutableIntMap <Sequence <Pair <K, V> > > map, int count, Sequence <K> keys) { this.keys = keys; this.count = count; this.immutable_int_map = map; }
private ImmutableMap(IImmutableIntMap <LispList <Pair <K, V> > > map, int count, LispList <K> keys) { this.keys = keys; this.count = count; this.immutable_int_map = map; }
private ImmutableIntKeyMap(IImmutableIntMap <Pair <K, V> > map, Func <K, int> converter) { this.immutable_int_map = map; this.keyConverter = converter; }