Warning: session_start(): open(/var/lib/php/sessions/sess_5afptm63r8gkt99ohite654lnc, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
svoid test_tok_eventFunctions() {
// no args
testTranspilationFunction tok_eventFunctions(
"event blubb;", [[
transient L onBlubb;
selfType onBlubb(Runnable r) { onBlubb = syncAddOrCreate(onBlubb, r); this; }
void blubb() { pcallFAll(onBlubb); }
]]);
// with args
testTranspilationFunction tok_eventFunctions(
"event newX(X x);", [[
transient L> onNewX;
selfType onNewX(IVF1 f) { onNewX = syncAddOrCreate(onNewX, f); this; }
void newX(X x) { pcallFAll(onNewX, x); }
]]);
// "on" prefix handled correctly
testTranspilationFunction tok_eventFunctions(
"event onBlubb;", [[
transient L onBlubb;
selfType onBlubb(Runnable r) { onBlubb = syncAddOrCreate(onBlubb, r); this; }
void blubb() { pcallFAll(onBlubb); }
]]);
// "fire" prefix handled correctly
testTranspilationFunction tok_eventFunctions(
"event fireBlubb;", [[
transient L onBlubb;
selfType onBlubb(Runnable r) { onBlubb = syncAddOrCreate(onBlubb, r); this; }
void fireBlubb() { pcallFAll(onBlubb); }
]]);
}