add stream restrictions test

This commit is contained in:
DieMyst
2021-11-15 16:15:29 +03:00
parent 8c494d0cc6
commit 3ac764440f
50 changed files with 501 additions and 351 deletions

View File

@ -3,7 +3,7 @@
* This file is auto-generated. Do not edit manually: changes may be erased.
* Generated by Aqua compiler: https://github.com/fluencelabs/aqua/.
* If you find any bugs, please write an issue on GitHub: https://github.com/fluencelabs/aqua/issues
* Aqua version: 0.4.1-SNAPSHOT
* Aqua version: 0.5.0-SNAPSHOT
*
*/
import { Fluence, FluencePeer } from '@fluencelabs/fluence';
@ -31,10 +31,15 @@ export function toOpt(...args: any) {
(call %init_peer_id% ("getDataSrv" "-relay-") [] -relay-)
(call %init_peer_id% ("getDataSrv" "s") [] s)
)
(ap s $str)
(new $str
(seq
(ap s $str)
(call %init_peer_id% ("op" "identity") [$str] str-fix)
)
)
)
(xor
(call %init_peer_id% ("callbackSrv" "response") [$str])
(call %init_peer_id% ("callbackSrv" "response") [str-fix])
(call %init_peer_id% ("errorHandlingSrv" "error") [%last_error% 1])
)
)
@ -85,20 +90,24 @@ export function accumRes(...args: any) {
(seq
(seq
(seq
(seq
(call %init_peer_id% ("getDataSrv" "-relay-") [] -relay-)
(new $str
(seq
(call %init_peer_id% ("getDataSrv" "-relay-") [] -relay-)
(ap "a" $str)
(call %init_peer_id% ("op" "identity") [$str] str-fix)
)
(call %init_peer_id% ("op" "identity") [$str] push-to-stream-10)
)
(ap push-to-stream-10 $res_accum)
)
(ap "b" $str0)
(ap str-fix $res_accum)
)
(new $str0
(seq
(ap "b" $str0)
(call %init_peer_id% ("op" "identity") [$str0] str-fix0)
)
)
(call %init_peer_id% ("op" "identity") [$str0] push-to-stream-20)
)
(ap push-to-stream-20 $res_accum)
(ap str-fix0 $res_accum)
)
(call %init_peer_id% ("op" "identity") [[]] push-to-stream-12)
)