public void FlexDictonaryTest()
        {
            Func<FlexDictionary<string, FlexDictionary<string, int>>> cf = () =>
            {
                return new FlexDictionary<string, FlexDictionary<string, int>>(
                    () => { return new FlexDictionary<string, int>(() => { return 0; }); }
                    );
            };

            var fd = new FlexDictionary<string, FlexDictionary<string, FlexDictionary<string, int>>>(cf);

            Assert.AreEqual(0, fd["1"]["2"]["3"]);

            fd["1"]["2"]["3"] = 4;

            Assert.AreEqual(4, fd["1"]["2"]["3"]);

            fd["something"]["2"]["3"] = 10;
            Assert.AreEqual(10, fd["something"]["2"]["3"]);
        }
Example #2
0
        public void FlexDictonaryTest()
        {
            Func <FlexDictionary <string, FlexDictionary <string, int> > > cf = () =>
            {
                return(new FlexDictionary <string, FlexDictionary <string, int> >(
                           () => { return new FlexDictionary <string, int>(() => { return 0; }); }
                           ));
            };

            var fd = new FlexDictionary <string, FlexDictionary <string, FlexDictionary <string, int> > >(cf);

            Assert.AreEqual(0, fd["1"]["2"]["3"]);

            fd["1"]["2"]["3"] = 4;

            Assert.AreEqual(4, fd["1"]["2"]["3"]);

            fd["something"]["2"]["3"] = 10;
            Assert.AreEqual(10, fd["something"]["2"]["3"]);
        }