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