summaryrefslogtreecommitdiff
path: root/tests/lib/cxxcompat.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/cxxcompat.c')
-rw-r--r--tests/lib/cxxcompat.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/lib/cxxcompat.c b/tests/lib/cxxcompat.c
index 48fa0ec8a9..6624de7386 100644
--- a/tests/lib/cxxcompat.c
+++ b/tests/lib/cxxcompat.c
@@ -17,6 +17,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#define test__cplusplus
+
#include "lib/zebra.h"
#include "lib/agg_table.h"
@@ -107,6 +109,17 @@
#include "lib/zassert.h"
#include "lib/zclient.h"
+PREDECL_RBTREE_UNIQ(footree)
+struct foo {
+ int dummy;
+ struct footree_item item;
+};
+static int foocmp(const struct foo *a, const struct foo *b)
+{
+ return memcmp(&a->dummy, &b->dummy, sizeof(a->dummy));
+}
+DECLARE_RBTREE_UNIQ(footree, struct foo, item, foocmp)
+
int main(int argc, char **argv)
{
return 0;