Exemplo n.º 1
0
        public void AddTest()
        {
            NativeMultiValueMap <NativeString, int> map = new NativeMultiValueMap <NativeString, int>(3);

            map.Add("Even", 2);
            map.Add("Even", 4);
            map.Add("Even", 6);
            map.Add("Odd", 1);
            map.Add("Odd", 3);

            Assert.AreEqual(5, map.Length);
            Assert.AreEqual(3, map.Slots);

            map.Add("Primes", 1);
            map.Add("Primes", 3);
            map.Add("Primes", 5);
            map.Add("TheAnswer", 42);

            Assert.AreEqual(9, map.Length);
            Assert.AreEqual(6, map.Slots);
            map.DisposeMapAndKeys();
        }
Exemplo n.º 2
0
        public void AddTest1()
        {
            NativeMultiValueMap <NativeString, int> map = new NativeMultiValueMap <NativeString, int>(3);

            map.Add("Even", stackalloc int[] { 2, 4, 6 });