Mercurial > urweb
diff tests/test.c @ 771:eac1974924bb
FFI transactionals
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sat, 02 May 2009 18:41:21 -0400 |
parents | df09c95085f8 |
children |
line wrap: on
line diff
--- a/tests/test.c Sat May 02 18:20:15 2009 -0400 +++ b/tests/test.c Sat May 02 18:41:21 2009 -0400 @@ -25,3 +25,18 @@ printf("FOO!\n"); return uw_unit_v; } + +static void commit(void *data) { + printf("Commit: %s\n", data); +} +static void rollback(void *data) { + printf("Rollback: %s\n", data); +} +static void free(void *data) { + printf("Free: %s\n", data); +} + +uw_Basis_unit uw_Test_transactional(uw_context ctx) { + uw_register_transactional(ctx, "Beppo", commit, rollback, free); + return uw_unit_v; +}