X-Git-Url: https://pd.if.org/git/?p=pdclib;a=blobdiff_plain;f=opt%2Fnothread%2Ftss_get.c;h=531368f937d3d7f4e18e0cc8f2c5ce861d843701;hp=3e9917b83c3b508fee8c211ed9f0e06732f3e154;hb=da0f3f353d417fed71f358a48d5d5394145e460d;hpb=5155ca96295a12b4857fc0e6a9629cc43a9a85fa diff --git a/opt/nothread/tss_get.c b/opt/nothread/tss_get.c index 3e9917b..531368f 100644 --- a/opt/nothread/tss_get.c +++ b/opt/nothread/tss_get.c @@ -1,24 +1,30 @@ +#ifndef REGTEST #include void *tss_get(tss_t key) { return key.value; } +#endif #ifdef TEST -#include <_PDCLIB_test.h> +#include "_PDCLIB_test.h" +#ifndef REGTEST static tss_t key; static char v; +#endif int main( void ) { +#ifndef REGTEST TESTCASE(tss_create(&key, NULL) == thrd_success); TESTCASE(tss_get(key) == NULL); TESTCASE(tss_set(key, &v) == thrd_success); TESTCASE(tss_get(key) == &v); tss_delete(key); +#endif return TEST_RESULTS; } -#endif \ No newline at end of file +#endif