Beispiel #1
0
        public void GetUndeclaredTest()
        {
            var table = new SymbolsTable();

            Assert.Equal(16, table.Get("Sym1"));
            Assert.Equal(17, table.Get("Sym2"));
            Assert.Equal(16, table.Get("Sym1"));
        }
Beispiel #2
0
        public void GetUndeclaredAndAddTest()
        {
            var table = new SymbolsTable();

            Assert.Equal(16, table.Get("Sym1"));
            table.Add("Sym1", 5);
            Assert.Equal(5, table.Get("Sym1"));
        }