comparison tests/rpchan.ur @ 2064:3dd041b00087

Extend ScriptCheck to take RPCs into account
author Adam Chlipala <adam@chlipala.net>
date Sun, 24 Aug 2014 11:43:49 -0400
parents
children
comparison
equal deleted inserted replaced
2063:83bdb52962c9 2064:3dd041b00087
1 fun remote () =
2 ch <- channel;
3 send ch "Hello World!";
4 return ch
5
6 fun remoter () =
7 ch <- channel;
8 send ch "Hello World!";
9 return <xml><active code={spawn (s <- recv ch; alert s); return <xml/>}/></xml>
10
11 fun main () =
12 x <- source <xml/>;
13 return <xml><body>
14 <button onclick={fn _ => ch <- rpc (remote ()); s <- recv ch; alert s}>TEST</button>
15 <button onclick={fn _ => y <- rpc (remoter ()); set x y}>TESTER</button>
16 <hr/>
17 <dyn signal={signal x}/>
18 </body></xml>