mirror of
https://github.com/fluencelabs/aqua-playground
synced 2025-03-15 01:51:03 +00:00
make imports-exports tests more complex
This commit is contained in:
parent
462635fa71
commit
e3cc2bc230
@ -1,5 +1,7 @@
|
||||
module Export declares foobar, foo
|
||||
|
||||
import Op as Noop from "@fluencelabs/aqua-lib/builtin.aqua"
|
||||
|
||||
func bar() -> string:
|
||||
<- " I am MyFooBar bar"
|
||||
|
||||
@ -7,6 +9,7 @@ func foo() -> string:
|
||||
<- "I am MyFooBar foo"
|
||||
|
||||
func foobar() -> []string:
|
||||
Noop.noop()
|
||||
res: *string
|
||||
res <- foo()
|
||||
res <- bar()
|
||||
|
@ -1,5 +1,8 @@
|
||||
-- exports3.aqua
|
||||
module Export3 declares *
|
||||
|
||||
import Op as Noop from "@fluencelabs/aqua-lib/builtin.aqua"
|
||||
|
||||
func foo() -> string:
|
||||
Noop.noop()
|
||||
<- "I am MyFooBar foo"
|
@ -1,5 +1,7 @@
|
||||
module Exports declares some_string, MyExportSrv, EXPORT_CONST, some_random_func
|
||||
|
||||
import Op as Noop from "@fluencelabs/aqua-lib/builtin.aqua"
|
||||
|
||||
export some_string as string_from_lib
|
||||
export MyExportSrv
|
||||
|
||||
@ -9,6 +11,7 @@ service MyExportSrv("my_export_srv"):
|
||||
another_str() -> string
|
||||
|
||||
func some_string() -> string:
|
||||
Noop.noop()
|
||||
<- "some_string_func"
|
||||
|
||||
func some_random_func() -> string:
|
||||
|
@ -1,10 +1,12 @@
|
||||
-- imports3.aqua
|
||||
module Import3 declares *
|
||||
import Op as Noop from "@fluencelabs/aqua-lib/builtin.aqua"
|
||||
|
||||
export foo_wrapper
|
||||
|
||||
use "export3.aqua"
|
||||
|
||||
func foo_wrapper() -> string:
|
||||
Noop.noop()
|
||||
z <- Export3.foo()
|
||||
<- z
|
@ -2,17 +2,22 @@ import decl_foo, decl_bar from "declare.aqua"
|
||||
use DECLARE_CONST, SuperFoo, DECLARE_CONST2 as DC2 from "declare.aqua" as Declare
|
||||
import Op as Noop from "@fluencelabs/aqua-lib/builtin.aqua"
|
||||
import some_string, MyExportSrv, EXPORT_CONST from "exports.aqua"
|
||||
use "export3.aqua"
|
||||
|
||||
service StringService("string_service"):
|
||||
concat(a: string, b: string) -> string
|
||||
|
||||
func concat_foobars() -> string:
|
||||
Noop.noop()
|
||||
Export3.foo()
|
||||
res1 <- decl_foo()
|
||||
res2 <- decl_bar()
|
||||
res3 <- StringService.concat(res1, res2)
|
||||
res4 <- Declare.SuperFoo.small_foo()
|
||||
Noop.noop()
|
||||
res5 <- StringService.concat(res3, res4)
|
||||
res6 <- StringService.concat(res5, EXPORT_CONST)
|
||||
res7 <- StringService.concat(res6, Declare.DECLARE_CONST)
|
||||
Noop.noop()
|
||||
res8 <- StringService.concat(res7, Declare.DC2)
|
||||
<- res8
|
Loading…
x
Reference in New Issue
Block a user