Add Current.x reference page to doc tests
This commit is contained in:
parent
9daabd0abf
commit
936418615e
@ -11,17 +11,17 @@ Get the balance for the contract.
|
|||||||
|
|
||||||
<!--PascaLIGO-->
|
<!--PascaLIGO-->
|
||||||
```pascaligo
|
```pascaligo
|
||||||
function main (const p : unit; const s: tez) : list(operation) * storage is
|
function main (const p : unit; const s: tez) : list(operation) * tez is
|
||||||
((nil : list(operation)), balance)
|
((nil : list(operation)), balance)
|
||||||
```
|
```
|
||||||
<!--CameLIGO-->
|
<!--CameLIGO-->
|
||||||
```cameligo
|
```cameligo
|
||||||
let main (p, s : unit * storage) =
|
let main (p, s : unit * tez) =
|
||||||
([] : operation list), balance
|
([] : operation list), balance
|
||||||
```
|
```
|
||||||
<!--ReasonLIGO-->
|
<!--ReasonLIGO-->
|
||||||
```reasonligo
|
```reasonligo
|
||||||
let main = (p: unit, storage) => ([]: list(operation), balance);
|
let main = ((p,s): (unit, tez)) => ([]: list(operation), balance);
|
||||||
```
|
```
|
||||||
|
|
||||||
<!--END_DOCUSAURUS_CODE_TABS-->
|
<!--END_DOCUSAURUS_CODE_TABS-->
|
||||||
@ -293,25 +293,22 @@ Cause the contract to fail with an error message.
|
|||||||
|
|
||||||
<!--PascaLIGO-->
|
<!--PascaLIGO-->
|
||||||
```pascaligo
|
```pascaligo
|
||||||
function main (const p : param; const s : unit) : list(operation) * unit is
|
function main (const p : int; const s : unit) : list(operation) * unit is
|
||||||
block {
|
block {
|
||||||
case p of
|
if p > 10 then failwith("fail") else skip;
|
||||||
| Zero (n) -> if n > 0n then failwith("fail") else skip
|
|
||||||
| Pos (n) -> if n > 0n then skip else failwith("fail")
|
|
||||||
end
|
|
||||||
}
|
}
|
||||||
with ((nil : list(operation)), s)
|
with ((nil : list(operation)), s)
|
||||||
```
|
```
|
||||||
|
|
||||||
<!--CameLIGO-->
|
<!--CameLIGO-->
|
||||||
```cameligo
|
```cameligo
|
||||||
let main (p: unit) storage =
|
let main (p,s: unit * unit) =
|
||||||
if true then failwith "This contract always fails" else ()
|
if true then failwith "This contract always fails" else ()
|
||||||
```
|
```
|
||||||
|
|
||||||
<!--ReasonLIGO-->
|
<!--ReasonLIGO-->
|
||||||
```reasonligo
|
```reasonligo
|
||||||
let main = (p: unit, storage) =>
|
let main = ((p,s): (unit, unit)) =>
|
||||||
if (true) {
|
if (true) {
|
||||||
failwith("This contract always fails");
|
failwith("This contract always fails");
|
||||||
} else {
|
} else {
|
||||||
|
@ -128,6 +128,7 @@ let md_files = [
|
|||||||
"/gitlab-pages/docs/reference/big_map.md";
|
"/gitlab-pages/docs/reference/big_map.md";
|
||||||
"/gitlab-pages/docs/reference/string.md";
|
"/gitlab-pages/docs/reference/string.md";
|
||||||
"/gitlab-pages/docs/reference/crypto.md";
|
"/gitlab-pages/docs/reference/crypto.md";
|
||||||
|
"/gitlab-pages/docs/reference/current.md";
|
||||||
]
|
]
|
||||||
|
|
||||||
let md_root = "../../gitlab-pages/docs/language-basics/"
|
let md_root = "../../gitlab-pages/docs/language-basics/"
|
||||||
|
Loading…
Reference in New Issue
Block a user