]> git.proxmox.com Git - ceph.git/blob - ceph/src/jaegertracing/thrift/test/c_glib/src/thrift_test_handler.c
buildsys: switch source download to quincy
[ceph.git] / ceph / src / jaegertracing / thrift / test / c_glib / src / thrift_test_handler.c
1 /*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19
20 #include <inttypes.h>
21 #include <string.h>
22 #include <unistd.h>
23
24 #include <thrift/c_glib/thrift.h>
25 #include <thrift/c_glib/thrift_application_exception.h>
26
27 #include "thrift_test_handler.h"
28
29 /* A handler that implements the TTestThriftTestIf interface */
30
31 G_DEFINE_TYPE (ThriftTestHandler,
32 thrift_test_handler,
33 T_TEST_TYPE_THRIFT_TEST_HANDLER)
34
35 gboolean
36 thrift_test_handler_test_void (TTestThriftTestIf *iface,
37 GError **error)
38 {
39 THRIFT_UNUSED_VAR (iface);
40 THRIFT_UNUSED_VAR (error);
41
42 printf ("testVoid()\n");
43
44 return TRUE;
45 }
46
47 gboolean
48 thrift_test_handler_test_string (TTestThriftTestIf *iface,
49 gchar **_return,
50 const gchar *thing,
51 GError **error)
52 {
53 THRIFT_UNUSED_VAR (iface);
54 THRIFT_UNUSED_VAR (error);
55
56 printf ("testString(\"%s\")\n", thing);
57 *_return = g_strdup (thing);
58
59 return TRUE;
60 }
61
62 gboolean
63 thrift_test_handler_test_bool (TTestThriftTestIf *iface,
64 gboolean *_return,
65 const gboolean thing,
66 GError **error)
67 {
68 THRIFT_UNUSED_VAR (iface);
69 THRIFT_UNUSED_VAR (error);
70
71 printf ("testBool(%s)\n", thing ? "true" : "false");
72 *_return = thing;
73
74 return TRUE;
75 }
76
77 gboolean
78 thrift_test_handler_test_byte (TTestThriftTestIf *iface,
79 gint8 *_return,
80 const gint8 thing,
81 GError **error)
82 {
83 THRIFT_UNUSED_VAR (iface);
84 THRIFT_UNUSED_VAR (error);
85
86 printf ("testByte(%d)\n", (gint)thing);
87 *_return = thing;
88
89 return TRUE;
90 }
91
92 gboolean
93 thrift_test_handler_test_i32 (TTestThriftTestIf *iface,
94 gint32 *_return,
95 const gint32 thing,
96 GError **error)
97 {
98 THRIFT_UNUSED_VAR (iface);
99 THRIFT_UNUSED_VAR (error);
100
101 printf ("testI32(%d)\n", thing);
102 *_return = thing;
103
104 return TRUE;
105 }
106
107 gboolean
108 thrift_test_handler_test_i64 (TTestThriftTestIf *iface,
109 gint64 *_return,
110 const gint64 thing,
111 GError **error)
112 {
113 THRIFT_UNUSED_VAR (iface);
114 THRIFT_UNUSED_VAR (error);
115
116 printf ("testI64(%" PRId64 ")\n", thing);
117 *_return = thing;
118
119 return TRUE;
120 }
121
122 gboolean
123 thrift_test_handler_test_double (TTestThriftTestIf *iface,
124 gdouble *_return,
125 const gdouble thing,
126 GError **error)
127 {
128 THRIFT_UNUSED_VAR (iface);
129 THRIFT_UNUSED_VAR (error);
130
131 printf ("testDouble(%f)\n", thing);
132 *_return = thing;
133
134 return TRUE;
135 }
136
137 gboolean
138 thrift_test_handler_test_binary (TTestThriftTestIf *iface,
139 GByteArray ** _return,
140 const GByteArray * thing,
141 GError **error)
142 {
143 THRIFT_UNUSED_VAR (iface);
144 THRIFT_UNUSED_VAR (error);
145
146 printf ("testBinary()\n"); // TODO: hex output
147 g_byte_array_ref((GByteArray *)thing);
148 *_return = (GByteArray *)thing;
149
150 return TRUE;
151 }
152
153 gboolean
154 thrift_test_handler_test_struct (TTestThriftTestIf *iface,
155 TTestXtruct **_return,
156 const TTestXtruct *thing,
157 GError **error)
158 {
159 gchar *string_thing = NULL;
160 gint byte_thing;
161 gint i32_thing;
162 gint64 i64_thing;
163
164 THRIFT_UNUSED_VAR (iface);
165 THRIFT_UNUSED_VAR (error);
166
167 g_object_get ((TTestXtruct *)thing,
168 "string_thing", &string_thing,
169 "byte_thing", &byte_thing,
170 "i32_thing", &i32_thing,
171 "i64_thing", &i64_thing,
172 NULL);
173
174 printf ("testStruct({\"%s\", %d, %d, %" PRId64 "})\n",
175 string_thing,
176 (gint)byte_thing,
177 i32_thing,
178 i64_thing);
179
180 g_object_set (*_return,
181 "string_thing", string_thing,
182 "byte_thing", byte_thing,
183 "i32_thing", i32_thing,
184 "i64_thing", i64_thing,
185 NULL);
186
187 if (string_thing != NULL)
188 g_free (string_thing);
189
190 return TRUE;
191 }
192
193 gboolean
194 thrift_test_handler_test_nest (TTestThriftTestIf *iface,
195 TTestXtruct2 **_return,
196 const TTestXtruct2 *thing,
197 GError **error)
198 {
199 gchar *inner_string_thing = NULL;
200 gint byte_thing, inner_byte_thing;
201 gint i32_thing, inner_i32_thing;
202 gint64 inner_i64_thing;
203 TTestXtruct *struct_thing;
204
205 THRIFT_UNUSED_VAR (iface);
206 THRIFT_UNUSED_VAR (error);
207
208 g_object_get ((TTestXtruct2 *)thing,
209 "byte_thing", &byte_thing,
210 "struct_thing", &struct_thing,
211 "i32_thing", &i32_thing,
212 NULL);
213 g_object_get (struct_thing,
214 "string_thing", &inner_string_thing,
215 "byte_thing", &inner_byte_thing,
216 "i32_thing", &inner_i32_thing,
217 "i64_thing", &inner_i64_thing,
218 NULL);
219
220 printf ("testNest({%d, {\"%s\", %d, %d, %" PRId64 "}, %d})\n",
221 byte_thing,
222 inner_string_thing,
223 inner_byte_thing,
224 inner_i32_thing,
225 inner_i64_thing,
226 i32_thing);
227
228 g_object_set (*_return,
229 "byte_thing", byte_thing,
230 "struct_thing", struct_thing,
231 "i32_thing", i32_thing,
232 NULL);
233
234 if (inner_string_thing != NULL)
235 g_free (inner_string_thing);
236 g_object_unref (struct_thing);
237
238 return TRUE;
239 }
240
241 gboolean
242 thrift_test_handler_test_map (TTestThriftTestIf *iface,
243 GHashTable **_return,
244 const GHashTable *thing,
245 GError **error)
246 {
247 GHashTableIter hash_table_iter;
248 gpointer key;
249 gpointer value;
250 gboolean first = TRUE;
251
252 THRIFT_UNUSED_VAR (iface);
253 THRIFT_UNUSED_VAR (error);
254
255 printf ("testMap({");
256 g_hash_table_iter_init (&hash_table_iter, (GHashTable *)thing);
257 while (g_hash_table_iter_next (&hash_table_iter,
258 &key,
259 &value)) {
260 gint32 *new_key;
261 gint32 *new_value;
262
263 if (first)
264 first = FALSE;
265 else
266 printf (", ");
267
268 printf ("%d => %d", *(gint32 *)key, *(gint32 *)value);
269
270 new_key = g_malloc (sizeof *new_key);
271 *new_key = *(gint32 *)key;
272 new_value = g_malloc (sizeof *new_value);
273 *new_value = *(gint32 *)value;
274 g_hash_table_insert (*_return, new_key, new_value);
275 }
276 printf ("})\n");
277
278 return TRUE;
279 }
280
281 gboolean
282 thrift_test_handler_test_string_map (TTestThriftTestIf *iface,
283 GHashTable **_return,
284 const GHashTable *thing,
285 GError **error)
286 {
287 GHashTableIter hash_table_iter;
288 gpointer key;
289 gpointer value;
290 gboolean first = TRUE;
291
292 THRIFT_UNUSED_VAR (iface);
293 THRIFT_UNUSED_VAR (error);
294
295 printf ("testStringMap({");
296 g_hash_table_iter_init (&hash_table_iter, (GHashTable *)thing);
297 while (g_hash_table_iter_next (&hash_table_iter,
298 &key,
299 &value)) {
300 gchar *new_key;
301 gchar *new_value;
302
303 if (first)
304 first = FALSE;
305 else
306 printf (", ");
307
308 printf ("%s => %s", (gchar *)key, (gchar *)value);
309
310 new_key = g_strdup ((gchar *)key);
311 new_value = g_strdup ((gchar *)value);
312 g_hash_table_insert (*_return, new_key, new_value);
313 }
314 printf ("})\n");
315
316 return TRUE;
317 }
318
319 gboolean
320 thrift_test_handler_test_set (TTestThriftTestIf *iface,
321 GHashTable **_return,
322 const GHashTable *thing,
323 GError **error)
324 {
325 GHashTableIter hash_table_iter;
326 gpointer key;
327 gboolean first = TRUE;
328
329 THRIFT_UNUSED_VAR (iface);
330 THRIFT_UNUSED_VAR (error);
331
332 printf ("testSet({");
333 g_hash_table_iter_init (&hash_table_iter, (GHashTable *)thing);
334 while (g_hash_table_iter_next (&hash_table_iter,
335 &key,
336 NULL)) {
337 gint32 *new_key;
338
339 if (first)
340 first = FALSE;
341 else
342 printf (", ");
343
344 printf ("%d", *(gint32 *)key);
345
346 new_key = g_malloc (sizeof *new_key);
347 *new_key = *(gint32 *)key;
348 g_hash_table_insert (*_return, new_key, NULL);
349 }
350 printf ("})\n");
351
352 return TRUE;
353 }
354
355 gboolean
356 thrift_test_handler_test_list (TTestThriftTestIf *iface,
357 GArray **_return,
358 const GArray *thing,
359 GError **error)
360 {
361 guint i;
362 gboolean first = TRUE;
363
364 THRIFT_UNUSED_VAR (iface);
365 THRIFT_UNUSED_VAR (error);
366
367 printf ("testList({");
368 for (i = 0; i < thing->len; i += 1) {
369 gint32 value;
370 gint32 *new_value;
371
372 if (first)
373 first = FALSE;
374 else
375 printf (", ");
376
377 value = g_array_index (thing, gint32, i);
378 printf ("%d", value);
379
380 new_value = g_malloc (sizeof *new_value);
381 *new_value = value;
382 g_array_append_val (*_return, *new_value);
383 }
384 printf ("})\n");
385
386 return TRUE;
387 }
388
389 gboolean
390 thrift_test_handler_test_enum (TTestThriftTestIf *iface,
391 TTestNumberz *_return,
392 const TTestNumberz thing,
393 GError **error)
394 {
395 THRIFT_UNUSED_VAR (iface);
396 THRIFT_UNUSED_VAR (error);
397
398 printf ("testEnum(%d)\n", thing);
399 *_return = thing;
400
401 return TRUE;
402 }
403
404 gboolean
405 thrift_test_handler_test_typedef (TTestThriftTestIf *iface,
406 TTestUserId *_return,
407 const TTestUserId thing,
408 GError **error)
409 {
410 THRIFT_UNUSED_VAR (iface);
411 THRIFT_UNUSED_VAR (error);
412
413 printf ("testTypedef(%" PRId64 ")\n", thing);
414 *_return = thing;
415
416 return TRUE;
417 }
418
419 gboolean
420 thrift_test_handler_test_map_map (TTestThriftTestIf *iface,
421 GHashTable **_return,
422 const gint32 hello,
423 GError **error)
424 {
425 GHashTable *positive;
426 GHashTable *negative;
427 gint32 *key;
428 gint32 *value;
429 guint i;
430
431 THRIFT_UNUSED_VAR (iface);
432 THRIFT_UNUSED_VAR (error);
433
434 printf ("testMapMap(%d)\n", hello);
435
436 positive = g_hash_table_new_full (g_int_hash,
437 g_int_equal,
438 g_free,
439 g_free);
440 negative = g_hash_table_new_full (g_int_hash,
441 g_int_equal,
442 g_free,
443 g_free);
444
445 for (i = 1; i < 5; i += 1) {
446 key = g_malloc (sizeof *key);
447 value = g_malloc (sizeof *value);
448 *key = i;
449 *value = i;
450 g_hash_table_insert (positive, key, value);
451
452 key = g_malloc (sizeof *key);
453 value = g_malloc (sizeof *value);
454 *key = -i;
455 *value = -i;
456 g_hash_table_insert (negative, key, value);
457 }
458
459 key = g_malloc (sizeof *key);
460 *key = 4;
461 g_hash_table_insert (*_return, key, positive);
462
463 key = g_malloc (sizeof *key);
464 *key = -4;
465 g_hash_table_insert (*_return, key, negative);
466
467 return TRUE;
468 }
469
470 gboolean
471 thrift_test_handler_test_insanity (TTestThriftTestIf *iface,
472 GHashTable **_return,
473 const TTestInsanity *argument,
474 GError **error)
475 {
476 TTestXtruct *xtruct_in;
477
478 gchar *string_thing = NULL;
479 gint byte_thing;
480 gint i32_thing;
481 gint64 i64_thing;
482
483 GPtrArray *xtructs;
484
485 TTestInsanity *looney;
486
487 GHashTable *user_map;
488 GHashTable *first_map;
489 GHashTable *second_map;
490
491 GHashTableIter hash_table_iter;
492 GHashTableIter inner_hash_table_iter;
493 GHashTableIter user_map_iter;
494
495 gpointer key;
496 gpointer value;
497
498 TTestUserId *user_id;
499
500 guint i;
501
502 THRIFT_UNUSED_VAR (iface);
503 THRIFT_UNUSED_VAR (error);
504
505 printf ("testInsanity()\n");
506
507 first_map = g_hash_table_new_full (g_direct_hash,
508 g_direct_equal,
509 NULL,
510 g_object_unref);
511 second_map = g_hash_table_new_full (g_direct_hash,
512 g_direct_equal,
513 NULL,
514 g_object_unref);
515
516 g_hash_table_insert (first_map,
517 GINT_TO_POINTER (T_TEST_NUMBERZ_TWO),
518 (gpointer)argument);
519 g_hash_table_insert (first_map,
520 GINT_TO_POINTER (T_TEST_NUMBERZ_THREE),
521 (gpointer)argument);
522
523 /* Increment argument's ref count by two because first_map now holds
524 two references to it and the caller is not aware we have made any
525 additional references to argument. (That is, caller owns argument
526 and will unref it explicitly in addition to unref-ing *_return.)
527
528 We do this instead of creating a copy of argument in order to mimic
529 the C++ implementation (and since, frankly, the world needs less
530 argument, not more). */
531 g_object_ref ((gpointer)argument);
532 g_object_ref ((gpointer)argument);
533
534 looney = g_object_new (T_TEST_TYPE_INSANITY, NULL);
535 g_hash_table_insert (second_map,
536 GINT_TO_POINTER (T_TEST_NUMBERZ_SIX),
537 looney);
538
539 user_id = g_malloc (sizeof *user_id);
540 *user_id = 1;
541 g_hash_table_insert (*_return, user_id, first_map);
542
543 user_id = g_malloc (sizeof *user_id);
544 *user_id = 2;
545 g_hash_table_insert (*_return, user_id, second_map);
546
547 printf ("return");
548 printf (" = {");
549 g_hash_table_iter_init (&hash_table_iter, *_return);
550 while (g_hash_table_iter_next (&hash_table_iter,
551 &key,
552 &value)) {
553 printf ("%" PRId64 " => {", *(TTestUserId *)key);
554
555 g_hash_table_iter_init (&inner_hash_table_iter,
556 (GHashTable *)value);
557 while (g_hash_table_iter_next (&inner_hash_table_iter,
558 &key,
559 &value)) {
560 printf ("%d => {", (TTestNumberz)key);
561
562 g_object_get ((TTestInsanity *)value,
563 "userMap", &user_map,
564 "xtructs", &xtructs,
565 NULL);
566
567 printf ("{");
568 g_hash_table_iter_init (&user_map_iter, user_map);
569 while (g_hash_table_iter_next (&user_map_iter,
570 &key,
571 &value)) {
572 printf ("%d => %" PRId64 ", ",
573 (TTestNumberz)key,
574 *(TTestUserId *)value);
575 }
576 printf ("}, ");
577 g_hash_table_unref (user_map);
578
579 printf ("{");
580 for (i = 0; i < xtructs->len; ++i) {
581 xtruct_in = g_ptr_array_index (xtructs, i);
582 g_object_get (xtruct_in,
583 "string_thing", &string_thing,
584 "byte_thing", &byte_thing,
585 "i32_thing", &i32_thing,
586 "i64_thing", &i64_thing,
587 NULL);
588
589 printf ("{\"%s\", %d, %d, %" PRId64 "}, ",
590 string_thing,
591 byte_thing,
592 i32_thing,
593 i64_thing);
594 }
595 printf ("}");
596 g_ptr_array_unref (xtructs);
597
598 printf ("}, ");
599 }
600 printf ("}, ");
601 }
602 printf ("}\n");
603
604 return TRUE;
605 }
606
607 gboolean
608 thrift_test_handler_test_multi (TTestThriftTestIf *iface,
609 TTestXtruct **_return,
610 const gint8 arg0,
611 const gint32 arg1,
612 const gint64 arg2,
613 const GHashTable *arg3,
614 const TTestNumberz arg4,
615 const TTestUserId arg5,
616 GError **error)
617 {
618 THRIFT_UNUSED_VAR (iface);
619 THRIFT_UNUSED_VAR (error);
620 THRIFT_UNUSED_VAR (arg3);
621 THRIFT_UNUSED_VAR (arg4);
622 THRIFT_UNUSED_VAR (arg5);
623
624 printf ("testMulti()\n");
625
626 g_object_set (*_return,
627 "string_thing", g_strdup ("Hello2"),
628 "byte_thing", arg0,
629 "i32_thing", arg1,
630 "i64_thing", arg2,
631 NULL);
632
633 return TRUE;
634 }
635
636 gboolean
637 thrift_test_handler_test_exception (TTestThriftTestIf *iface,
638 const gchar *arg,
639 TTestXception **err1,
640 GError **error)
641 {
642 THRIFT_UNUSED_VAR (iface);
643
644 TTestXtruct *xtruct;
645 gboolean result;
646
647 printf ("testException(%s)\n", arg);
648
649 /* Unlike argument objects, exception objects are not pre-created */
650 g_assert (*err1 == NULL);
651
652 if (strncmp (arg, "Xception", 9) == 0) {
653 /* "Throw" a custom exception: Set the corresponding exception
654 argument, set *error to NULL and return FALSE */
655 *err1 = g_object_new (T_TEST_TYPE_XCEPTION,
656 "errorCode", 1001,
657 "message", g_strdup (arg),
658 NULL);
659 *error = NULL;
660 result = FALSE;
661 }
662 else if (strncmp (arg, "TException", 11) == 0) {
663 /* "Throw" a generic TException (ThriftApplicationException): Set
664 all exception arguments to NULL, set *error and return FALSE */
665 *err1 = NULL;
666 g_set_error (error,
667 thrift_application_exception_error_quark (),
668 THRIFT_APPLICATION_EXCEPTION_ERROR_UNKNOWN,
669 "Default TException.");
670 result = FALSE;
671 }
672 else {
673 *err1 = NULL;
674 *error = NULL;
675
676 /* This code is duplicated from the C++ test suite, though it
677 appears to serve no purpose */
678 xtruct = g_object_new (T_TEST_TYPE_XTRUCT,
679 "string_thing", g_strdup (arg),
680 NULL);
681 g_object_unref (xtruct);
682
683 result = TRUE;
684 }
685
686 return result;
687 }
688
689 gboolean
690 thrift_test_handler_test_multi_exception (TTestThriftTestIf *iface,
691 TTestXtruct **_return,
692 const gchar *arg0,
693 const gchar *arg1,
694 TTestXception **err1,
695 TTestXception2 **err2,
696 GError **error)
697 {
698 THRIFT_UNUSED_VAR (iface);
699 THRIFT_UNUSED_VAR (error);
700
701 TTestXtruct *struct_thing;
702 gboolean result;
703
704 printf ("testMultiException(%s, %s)\n", arg0, arg1);
705
706 g_assert (*err1 == NULL);
707 g_assert (*err2 == NULL);
708
709 if (strncmp (arg0, "Xception", 8) == 0 && strlen(arg0) == 8) {
710 *err1 = g_object_new (T_TEST_TYPE_XCEPTION,
711 "errorCode", 1001,
712 "message", g_strdup ("This is an Xception"),
713 NULL);
714 result = FALSE;
715 }
716 else if (strncmp (arg0, "Xception2", 9) == 0) {
717 *err2 = g_object_new (T_TEST_TYPE_XCEPTION2,
718 "errorCode", 2002,
719 NULL);
720
721 g_object_get (*err2,
722 "struct_thing", &struct_thing,
723 NULL);
724 g_object_set (struct_thing,
725 "string_thing", g_strdup ("This is an Xception2"),
726 NULL);
727 g_object_set (*err2,
728 "struct_thing", struct_thing,
729 NULL);
730 g_object_unref (struct_thing);
731
732 result = FALSE;
733 }
734 else {
735 g_object_set (*_return,
736 "string_thing", g_strdup (arg1),
737 NULL);
738 result = TRUE;
739 }
740
741 return result;
742 }
743
744 gboolean
745 thrift_test_handler_test_oneway (TTestThriftTestIf *iface,
746 const gint32 secondsToSleep,
747 GError **error)
748 {
749 THRIFT_UNUSED_VAR (iface);
750 THRIFT_UNUSED_VAR (error);
751
752 printf ("testOneway(%d): Sleeping...\n", secondsToSleep);
753 sleep (secondsToSleep);
754 printf ("testOneway(%d): done sleeping!\n", secondsToSleep);
755
756 return TRUE;
757 }
758
759 static void
760 thrift_test_handler_init (ThriftTestHandler *self)
761 {
762 THRIFT_UNUSED_VAR (self);
763 }
764
765 static void
766 thrift_test_handler_class_init (ThriftTestHandlerClass *klass)
767 {
768 TTestThriftTestHandlerClass *base_class =
769 T_TEST_THRIFT_TEST_HANDLER_CLASS (klass);
770
771 base_class->test_void =
772 klass->test_void =
773 thrift_test_handler_test_void;
774 base_class->test_string =
775 klass->test_string =
776 thrift_test_handler_test_string;
777 base_class->test_bool =
778 klass->test_bool =
779 thrift_test_handler_test_bool;
780 base_class->test_byte =
781 klass->test_byte =
782 thrift_test_handler_test_byte;
783 base_class->test_i32 =
784 klass->test_i32 =
785 thrift_test_handler_test_i32;
786 base_class->test_i64 =
787 klass->test_i64 =
788 thrift_test_handler_test_i64;
789 base_class->test_double =
790 klass->test_double =
791 thrift_test_handler_test_double;
792 base_class->test_binary =
793 klass->test_binary =
794 thrift_test_handler_test_binary;
795 base_class->test_struct =
796 klass->test_struct =
797 thrift_test_handler_test_struct;
798 base_class->test_nest =
799 klass->test_nest =
800 thrift_test_handler_test_nest;
801 base_class->test_map =
802 klass->test_map =
803 thrift_test_handler_test_map;
804 base_class->test_string_map =
805 klass->test_string_map =
806 thrift_test_handler_test_string_map;
807 base_class->test_set =
808 klass->test_set =
809 thrift_test_handler_test_set;
810 base_class->test_list =
811 klass->test_list =
812 thrift_test_handler_test_list;
813 base_class->test_enum =
814 klass->test_enum =
815 thrift_test_handler_test_enum;
816 base_class->test_typedef =
817 klass->test_typedef =
818 thrift_test_handler_test_typedef;
819 base_class->test_map_map =
820 klass->test_map_map =
821 thrift_test_handler_test_map_map;
822 base_class->test_insanity =
823 klass->test_insanity =
824 thrift_test_handler_test_insanity;
825 base_class->test_multi =
826 klass->test_multi =
827 thrift_test_handler_test_multi;
828 base_class->test_exception =
829 klass->test_exception =
830 thrift_test_handler_test_exception;
831 base_class->test_multi_exception =
832 klass->test_multi_exception =
833 thrift_test_handler_test_multi_exception;
834 base_class->test_oneway =
835 klass->test_oneway =
836 thrift_test_handler_test_oneway;
837 }