annotate tests/test.c @ 1909:659d1f4e95bf
make dist: Use fewer wildcards
The remaining ones only work by accident:
http://www.gnu.org/software/automake/manual/html_node/Wildcards.html
and they have some practical problems too (we don?t really want to
distribute include/urweb/config.h or src/config.sml), but this is
enough for now to pass ?make distcheck? as long as we don?t run it
from a separate build directory.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
---
Makefile.am | 6 +++---
src/c/Makefile.am | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
author |
Anders Kaseorg <andersk@mit.edu> |
date |
Fri, 22 Nov 2013 09:36:14 -0500 |
parents |
eac1974924bb |
children |
|
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 }
|
adamc@771
|
28
|
adamc@771
|
29 static void commit(void *data) {
|
adamc@771
|
30 printf("Commit: %s\n", data);
|
adamc@771
|
31 }
|
adamc@771
|
32 static void rollback(void *data) {
|
adamc@771
|
33 printf("Rollback: %s\n", data);
|
adamc@771
|
34 }
|
adamc@771
|
35 static void free(void *data) {
|
adamc@771
|
36 printf("Free: %s\n", data);
|
adamc@771
|
37 }
|
adamc@771
|
38
|
adamc@771
|
39 uw_Basis_unit uw_Test_transactional(uw_context ctx) {
|
adamc@771
|
40 uw_register_transactional(ctx, "Beppo", commit, rollback, free);
|
adamc@771
|
41 return uw_unit_v;
|
adamc@771
|
42 }
|