Add Current.x reference page to doc tests

This commit is contained in:
John David Pressman 2020-02-25 05:26:04 -08:00
parent 9daabd0abf
commit 936418615e
2 changed files with 8 additions and 10 deletions

View File

@ -11,17 +11,17 @@ Get the balance for the contract.
<!--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)
```
<!--CameLIGO-->
```cameligo
let main (p, s : unit * storage) =
let main (p, s : unit * tez) =
([] : operation list), balance
```
<!--ReasonLIGO-->
```reasonligo
let main = (p: unit, storage) => ([]: list(operation), balance);
let main = ((p,s): (unit, tez)) => ([]: list(operation), balance);
```
<!--END_DOCUSAURUS_CODE_TABS-->
@ -293,25 +293,22 @@ Cause the contract to fail with an error message.
<!--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 {
case p of
| Zero (n) -> if n > 0n then failwith("fail") else skip
| Pos (n) -> if n > 0n then skip else failwith("fail")
end
if p > 10 then failwith("fail") else skip;
}
with ((nil : list(operation)), s)
```
<!--CameLIGO-->
```cameligo
let main (p: unit) storage =
let main (p,s: unit * unit) =
if true then failwith "This contract always fails" else ()
```
<!--ReasonLIGO-->
```reasonligo
let main = (p: unit, storage) =>
let main = ((p,s): (unit, unit)) =>
if (true) {
failwith("This contract always fails");
} else {

View File

@ -128,6 +128,7 @@ let md_files = [
"/gitlab-pages/docs/reference/big_map.md";
"/gitlab-pages/docs/reference/string.md";
"/gitlab-pages/docs/reference/crypto.md";
"/gitlab-pages/docs/reference/current.md";
]
let md_root = "../../gitlab-pages/docs/language-basics/"