Move test/slow/rx into test/slow/coeffects/rx
[hiphop-php.git] / hphp / test / slow / coeffects / rx / call_enforcement_pure.php
blobc1ac8958421189ce44042d95536e3948cb69ce11
1 <?hh
3 function non_rx($fn) {
4 if ($fn) $fn(null);
7 function rx_local($fn)[rx_local] {
8 if ($fn) $fn(null);
11 function rx_shallow($fn)[rx_shallow] {
12 if ($fn) $fn(null);
15 function rx($fn)[rx] {
16 if ($fn) $fn(null);
19 function pure($fn)[] {
20 if ($fn) $fn(null);
23 <<__EntryPoint>>
24 function main() {
25 $functions = vec['non_rx', 'rx_local', 'rx_shallow', 'rx', 'pure'];
26 foreach ($functions as $caller) {
27 foreach ($functions as $callee) {
28 try {
29 $caller($callee);
30 echo "$caller -> $callee: ok\n";
31 } catch (Exception $e) {
32 echo "$caller -> $callee: ".$e->getMessage()."\n";