From 9867aa08b2566800f81c8b2cdeff7372b2bb8c5b Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 26 Jul 2007 08:30:11 +0000 Subject: Implement std::map[key] = value interface. git-svn-id: http://svn.drobilla.net/lad/raul@632 a436a847-0d15-0410-975c-d299462d15a1 --- tests/table_test.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/table_test.cpp b/tests/table_test.cpp index 06bf489..3ed3c7e 100644 --- a/tests/table_test.cpp +++ b/tests/table_test.cpp @@ -16,6 +16,9 @@ main() t.insert(make_pair(val, val)); } + t[20] = 20; + t[21] = 21; + for (Table::const_iterator i = t.begin(); i != t.end(); ++i) cout << i->first << " "; cout << endl; @@ -72,8 +75,14 @@ main() st.insert(make_pair("apple", "core")); st.insert(make_pair("candy", "cane")); st.insert(make_pair("banana", "peel")); + //st["alpha"] = "zero"; + //st["zeta"] = "one"; - st.erase("apple"); + st.erase("banana"); + + for (Table::const_iterator i = t.begin(); i != t.end(); ++i) + cout << i->first << " "; + cout << endl; while (true) { Table t; -- cgit v1.2.1