Mercurial > urweb
annotate tests/test.c @ 766:df09c95085f8
More FFI compiler options
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sat, 02 May 2009 12:10:43 -0400 |
parents | a28982de5645 |
children | eac1974924bb |
rev | line source |
---|---|
adamc@765 | 1 #include <stdio.h> |
adamc@765 | 2 |
adamc@764 | 3 #include "../include/urweb.h" |
adamc@764 | 4 |
adamc@764 | 5 typedef uw_Basis_string uw_Test_t; |
adamc@764 | 6 |
adamc@764 | 7 uw_Test_t uw_Test_create(uw_context ctx, uw_Basis_string s) { |
adamc@764 | 8 return s; |
adamc@764 | 9 } |
adamc@764 | 10 |
adamc@764 | 11 uw_Basis_string uw_Test_out(uw_context ctx, uw_Test_t s) { |
adamc@764 | 12 return s; |
adamc@764 | 13 } |
adamc@764 | 14 |
adamc@764 | 15 uw_Test_t uw_Test_frob(uw_context ctx, uw_Test_t s1, uw_Basis_string s2) { |
adamc@764 | 16 return uw_Basis_strcat(ctx, s1, s2); |
adamc@764 | 17 } |
adamc@765 | 18 |
adamc@765 | 19 uw_Basis_unit uw_Test_print(uw_context ctx) { |
adamc@765 | 20 printf("Hi there!\n"); |
adamc@765 | 21 return uw_unit_v; |
adamc@765 | 22 } |
adamc@766 | 23 |
adamc@766 | 24 uw_Basis_unit uw_Test_foo(uw_context ctx) { |
adamc@766 | 25 printf("FOO!\n"); |
adamc@766 | 26 return uw_unit_v; |
adamc@766 | 27 } |