コード例 #1
0
ファイル: test_symTable.py プロジェクト: Tedworthy/ATLAST
 def test_addGlobal_at_Global(self):
   table = SymTable()
   table.addGlobal(1,"Joe")
   assert_equal(table._data[1], "Joe")
コード例 #2
0
ファイル: test_symTable.py プロジェクト: Tedworthy/ATLAST
 def test_addGlobal_at_Local(self):
   table = SymTable()
   childTable = SymTable(table)
   childTable.addGlobal(1,"Joe")
   assert_equal(table._data[1], "Joe")
   assert("Joe" not in childTable._data.values())
コード例 #3
0
ファイル: test_symTable.py プロジェクト: Tedworthy/ATLAST
 def test_retrievals_global(self):
   table = SymTable()
   childTable = SymTable(table)
   childTable.addGlobal(1,"Joe")
   assert_equal(childTable.lookup(1), "Joe")