/* * dictionary_tests.cpp * * Created on: 23.01.2014 * Author: trifon */ #include #include "list_dictionary.cpp" #include "array_dictionary.cpp" #include "tree_dictionary.cpp" using namespace std; typedef TreeDictionary TestDictionary; void dictionaryTest() { TestDictionary d; d.add(3, 30); d.add(1, 10); d.add(5, 50); d.add(2, 20); d.add(4, 40); cout << d.keys() << endl; cout << *d.search(2) << endl; *d.search(2) = 25; cout << *d.search(2) << endl; int value; d.remove(2, value); cout << d.search(2) << endl; } int main() { dictionaryTest(); }