nitg-s: fix abstract methods in extern classes and add test
[nit.git] / tests / test_ni_out.nit.c
1 /* This file is part of NIT ( http://www.nitlanguage.org ).
2 *
3 * Copyright 2011 Alexis Laferrière <alexis.laf@xymus.net>
4 *
5 * This file is free software, which comes along with NIT. This software is
6 * distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
7 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
8 * PARTICULAR PURPOSE. You can modify it is you want, provided this header
9 * is kept unaltered, and a notification of the changes is added.
10 * You are allowed to redistribute it and sell it, alone or is a part of
11 * another product.
12 */
13
14 #include "test_ni_out.nit.h"
15
16 /*
17 C implementation of simple::A::proc
18 */
19 void A_proc___impl( A recv )
20 {
21 printf( "proc\n" );
22 }
23
24 /*
25 C implementation of simple::A::function
26 */
27 bigint A_function___impl( A recv )
28 {
29 return 1;
30 }
31
32 /*
33 C implementation of simple::A::one
34 */
35 bigint A_one___impl( A recv, bigint x )
36 {
37 return x;
38 }
39
40 /*
41 C implementation of simple::A::two
42 */
43 bigint A_two___impl( A recv, bigint x, bigint y )
44 {
45 return x + y;
46 }
47
48 /*
49 C implementation of simple::A::three
50 */
51 bigint A_three___impl( A recv, bigint x, bigint y, bigint z )
52 {
53 return x + y - z;
54 }
55
56 /*
57 C implementation of simple::Object::in_object
58 */
59 Object Object_in_object___impl( Object recv, Object o )
60 {
61 return o;
62 }