]> granicus.if.org Git - libevent/commitdiff
Unit test for event_get_struct_event_size()
authorNick Mathewson <nickm@torproject.org>
Mon, 21 Jun 2010 16:23:32 +0000 (12:23 -0400)
committerNick Mathewson <nickm@torproject.org>
Mon, 21 Jun 2010 16:23:32 +0000 (12:23 -0400)
test/regress.c

index 3d4404eea19fda723637e5c1d9c629f2d4d26281..dacda068e9e61327508c5bf0915132880dbe62b1 100644 (file)
@@ -2167,6 +2167,14 @@ end:
 #undef MANY
 }
 
+static void
+test_struct_event_size(void *arg)
+{
+       tt_int_op(event_get_struct_event_size(), <=, sizeof(struct event));
+end:
+       ;
+}
+
 struct testcase_t main_testcases[] = {
        /* Some converted-over tests */
        { "methods", test_methods, TT_FORK, NULL, NULL },
@@ -2212,6 +2220,8 @@ struct testcase_t main_testcases[] = {
        { "mm_functions", test_mm_functions, TT_FORK, NULL, NULL },
        BASIC(many_events, TT_ISOLATED),
 
+       { "struct_event_size", test_struct_event_size, 0, NULL, NULL },
+
 #ifndef WIN32
        LEGACY(fork, TT_ISOLATED),
 #endif