Skip to content
Snippets Groups Projects
Commit 6d7ef7d6 authored by benjamin.franksen's avatar benjamin.franksen
Browse files

added a test for using event flag in C function [amended for branch-2-2]

parent 7f40d4d4
No related branches found
No related tags found
No related merge requests found
...@@ -51,6 +51,7 @@ REGRESSION_TESTS_WITHOUT_DB += safeModeNotAssigned ...@@ -51,6 +51,7 @@ REGRESSION_TESTS_WITHOUT_DB += safeModeNotAssigned
REGRESSION_TESTS_WITHOUT_DB += safeMonitor REGRESSION_TESTS_WITHOUT_DB += safeMonitor
REGRESSION_TESTS_WITHOUT_DB += sizeof REGRESSION_TESTS_WITHOUT_DB += sizeof
REGRESSION_TESTS_WITHOUT_DB += userfunc REGRESSION_TESTS_WITHOUT_DB += userfunc
REGRESSION_TESTS_WITHOUT_DB += userfuncEf
REGRESSION_TESTS_REMOTE_ONLY += pvGetSync REGRESSION_TESTS_REMOTE_ONLY += pvGetSync
......
/*************************************************************************\
Copyright (c) 2010-2012 Helmholtz-Zentrum Berlin f. Materialien
und Energie GmbH, Germany (HZB)
This file is distributed subject to a Software License Agreement found
in the file LICENSE that is included with this distribution.
\*************************************************************************/
program userfuncEfTest
%%#include "../testSupport.h"
option +s;
evflag x;
%{
static void efSet_x(SS_ID ssId, EV_ID x)
{
seq_efSet(ssId, x);
}
}%
foreign pVar, ssId;
entry {
seq_test_init(2);
}
ss myss {
state check_not_set {
when (efTestAndClear(x)) {
testFail("argh, no timeout!");
} state set
when (delay(0.5)) {
testPass("cool, we came here");
} state set
}
state set {
when () {
efSet_x(ssId(), x);
} state check_set
}
state check_set {
when (efTestAndClear(x)) {
testPass("cool, we came here");
} exit
when (delay(0.5)) {
testFail("argh, timeout!");
} exit
}
}
exit {
seq_test_done();
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment