test: Demo24 增加更多测试用例
This commit is contained in:
parent
8eda4fcbce
commit
b033d53d28
@ -1,21 +1,24 @@
|
|||||||
module: Main
|
module: Main
|
||||||
import: ModuleA,os
|
import: ModuleA,os
|
||||||
|
globals:
|
||||||
|
declare const c: int = 10
|
||||||
function: main
|
function: main
|
||||||
returns: void
|
returns: void
|
||||||
body:
|
body:
|
||||||
declare a: byte = ModuleA.sum(1b,2b)
|
declare a: int = ModuleA.sum(c,2)
|
||||||
|
os.print(a)
|
||||||
end body
|
end body
|
||||||
end function
|
end function
|
||||||
end module
|
end module
|
||||||
|
|
||||||
module: ModuleA
|
module: ModuleA
|
||||||
globals:
|
globals:
|
||||||
declare a: byte = 10b
|
declare const a: int = 10
|
||||||
function: sum
|
function: sum
|
||||||
params:
|
params:
|
||||||
declare a: byte
|
declare a: int
|
||||||
declare b: byte
|
declare b: int
|
||||||
returns: byte
|
returns: int
|
||||||
body:
|
body:
|
||||||
return a + b
|
return a + b
|
||||||
end body
|
end body
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user