summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-07-26 08:30:11 +0000
committerDavid Robillard <d@drobilla.net>2007-07-26 08:30:11 +0000
commit9867aa08b2566800f81c8b2cdeff7372b2bb8c5b (patch)
tree3c9789b3ab40d11d73e76e16419c2b2ef43a0af3 /tests
parentffe8ccde2157ef802b7876cef9489904c02bcece (diff)
downloadraul-9867aa08b2566800f81c8b2cdeff7372b2bb8c5b.tar.gz
raul-9867aa08b2566800f81c8b2cdeff7372b2bb8c5b.tar.bz2
raul-9867aa08b2566800f81c8b2cdeff7372b2bb8c5b.zip
Implement std::map[key] = value interface.
git-svn-id: http://svn.drobilla.net/lad/raul@632 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'tests')
-rw-r--r--tests/table_test.cpp11
1 files changed, 10 insertions, 1 deletions
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<int,int>::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<int,int>::const_iterator i = t.begin(); i != t.end(); ++i)
+ cout << i->first << " ";
+ cout << endl;
while (true) {
Table<int, int> t;