change dataCallback to have two parameters: name and content
diff --git a/test/test_ccnx_wrapper.cc b/test/test_ccnx_wrapper.cc
index 1697386..1cd1394 100644
--- a/test/test_ccnx_wrapper.cc
+++ b/test/test_ccnx_wrapper.cc
@@ -39,9 +39,10 @@
}
struct TestStruct {
- string s_str;
- void set(string str) {
- s_str = str;
+ string s_str1, s_str2;
+ void set(string str1, string str2) {
+ s_str1 = str1;
+ s_str2 = str2;
}
};
@@ -54,8 +55,8 @@
TestStruct foo;
boost::function<void (string)> globalFunc = echo;
- boost::function<void (string)> memberFunc =
- bind1st(mem_fun(&TestStruct::set), &foo);
+ boost::function<void (string, string)> memberFunc =
+ bind(&TestStruct::set, &foo, _1, _2);
string prefix = "/ucla.edu";
ha.setInterestFilter(prefix, globalFunc);
@@ -77,7 +78,8 @@
// give time for ccnd to react
sleep(1);
- BOOST_CHECK_EQUAL(foo.s_str, data);
+ BOOST_CHECK_EQUAL(foo.s_str1, name);
+ BOOST_CHECK_EQUAL(foo.s_str2, data);
}