Skip to content

Commit

Permalink
Merge pull request #4 from AdrienChampion/master
Browse files Browse the repository at this point in the history
major fixes in `MustFail` + doc update + rmed all logging from techelson lib
  • Loading branch information
AdrienChampion authored Mar 1, 2019
2 parents 73d7bdf + 4dac830 commit fa2901c
Show file tree
Hide file tree
Showing 33 changed files with 953 additions and 435 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ A test execution engine for Michelson smart contracts.

# Documentation

The user documentation is hosted here: [liquidity-lang.org/techelson/doc]. You can also access the bleeding edge version on [the main repo's git page]. Finally, there is a blog post by Techelson's main developer on how to use Techelson with [Liquidity]: [adrienchampion.github.io/blog].
The user documentation is hosted here [the main repository's github pages]. Finally, there is a blog post by Techelson's main developer on how to use Techelson with [Liquidity]: [adrienchampion.github.io/blog].

# Features

Expand Down Expand Up @@ -65,7 +65,6 @@ For example
[opam installed]: https://opam.ocaml.org/doc/Install.html
[dune]: https://github.com/ocaml/dune
[mdbook]: https://github.com/rust-lang-nursery/mdBook
[liquidity-lang.org/techelson/doc]: http://www.liquidity-lang.org/techelson/doc
[Liquidity]: http://www.liquidity-lang.org/
[adrienchampion.github.io/blog]: https://adrienchampion.github.io/blog/tezos/techelson/with_liquidity/index.html
[the main repo's git page]: https://ocamlpro.github.io/techelson/user_doc
[adrienchampion.github.io/blog]: https://adrienchampion.github.io/blog
[the main repository's github pages]: https://adrienchampion.github.io/blog/tezos/techelson/with_liquidity/index.html
7 changes: 3 additions & 4 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ A test execution engine for Michelson smart contracts.

# Documentation

The user documentation is hosted here: [liquidity-lang.org/techelson/doc]. You can also access the bleeding edge version on [the main repo's git page]. Finally, there is a blog post by Techelson's main developer on how to use Techelson with [Liquidity]: [adrienchampion.github.io/blog].
The user documentation is hosted here [the main repository's github pages]. Finally, there is a blog post by Techelson's main developer on how to use Techelson with [Liquidity]: [adrienchampion.github.io/blog].

# Features

Expand Down Expand Up @@ -65,7 +65,6 @@ For example
[opam installed]: https://opam.ocaml.org/doc/Install.html
[dune]: https://github.com/ocaml/dune
[mdbook]: https://github.com/rust-lang-nursery/mdBook
[liquidity-lang.org/techelson/doc]: http://www.liquidity-lang.org/techelson/doc
[Liquidity]: http://www.liquidity-lang.org/
[adrienchampion.github.io/blog]: https://adrienchampion.github.io/blog/tezos/techelson/with_liquidity/index.html
[the main repo's git page]: https://ocamlpro.github.io/techelson/user_doc
[adrienchampion.github.io/blog]: https://adrienchampion.github.io/blog
[the main repository's github pages]: https://adrienchampion.github.io/blog/tezos/techelson/with_liquidity/index.html
100 changes: 14 additions & 86 deletions docs/user_doc/print.html
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,6 @@ <h1 class="menu-title">Techelson User Documentation</h1>
running TRANSFER[uid:2] address[0]@Transfer -&gt; address[1]@main 13utz True
=&gt; live contracts: SimpleExample (23utz) address[1]@main

=&gt; live contracts: SimpleExample (23utz) address[1]@main

running test script...
stack:
Expand Down Expand Up @@ -1129,24 +1128,6 @@ <h1 class="menu-title">Techelson User Documentation</h1>

applying operation CREATE[uid:2] (@address[3]@admins, &quot;sha512:@contract_manager&quot;, None, false, true, 0utz) &quot;Admins&quot;
live contracts: none
=&gt; live contracts: Admins (0utz) address[3]@admins
applying operation CREATE[uid:1] (@address[2]@new_admin, &quot;sha512:@new_admin_manager&quot;, None, true, true, 0utz)
{
storage unit ;
parameter unit ;
code ...;
}
live contracts: Admins (0utz) address[3]@admins
=&gt; live contracts: &lt;anonymous&gt; (0utz) address[2]@new_admin
Admins (0utz) address[3]@admins
applying operation CREATE[uid:0] (@address[1]@root, &quot;sha512:@root_manager&quot;, None, true, true, 0utz)
{
storage unit ;
parameter unit ;
code ...;
}
live contracts: &lt;anonymous&gt; (0utz) address[2]@new_admin
Admins (0utz) address[3]@admins
=&gt; live contracts: &lt;anonymous&gt; (0utz) address[2]@new_admin
Admins (0utz) address[3]@admins
&lt;anonymous&gt; (0utz) address[1]@root
Expand Down Expand Up @@ -1266,24 +1247,6 @@ <h1 class="menu-title">Techelson User Documentation</h1>

applying operation CREATE[uid:2] (@address[3]@admins, &quot;sha512:@contract_manager&quot;, None, false, true, 0utz) &quot;Admins&quot;
live contracts: none
=&gt; live contracts: Admins (0utz) address[3]@admins
applying operation CREATE[uid:1] (@address[2]@new_admin, &quot;sha512:@new_admin_manager&quot;, None, true, true, 0utz)
{
storage unit ;
parameter unit ;
code ...;
}
live contracts: Admins (0utz) address[3]@admins
=&gt; live contracts: &lt;anonymous&gt; (0utz) address[2]@new_admin
Admins (0utz) address[3]@admins
applying operation CREATE[uid:0] (@address[1]@root, &quot;sha512:@root_manager&quot;, None, true, true, 0utz)
{
storage unit ;
parameter unit ;
code ...;
}
live contracts: &lt;anonymous&gt; (0utz) address[2]@new_admin
Admins (0utz) address[3]@admins
=&gt; live contracts: &lt;anonymous&gt; (0utz) address[2]@new_admin
Admins (0utz) address[3]@admins
&lt;anonymous&gt; (0utz) address[1]@root
Expand Down Expand Up @@ -1319,13 +1282,20 @@ <h1 class="menu-title">Techelson User Documentation</h1>
Admins (0utz) address[3]@admins
&lt;anonymous&gt; (0utz) address[1]@root

=&gt; live contracts: &lt;anonymous&gt; (0utz) address[2]@new_admin
Admins (0utz) address[3]@admins
&lt;anonymous&gt; (0utz) address[1]@root
failure confirmed on test operation
MUST_FAIL[uid:4] _ (TRANSFER[uid:3] address[0]@MustFail -&gt; address[3]@admins 0utz (&quot;root&quot;, (&quot;new_admin&quot;, address[2]@new_admin)))
while running operation TRANSFER[uid:3] address[0]@MustFail -&gt; address[3]@admins 0utz (&quot;root&quot;, (&quot;new_admin&quot;, address[2]@new_admin))
failed with value &quot;illegal access to admin account&quot; : string

running test script...
Done running test `MustFail`

</code></pre>
<p>Notice that Techelson lets you know the failure is confirmed:</p>
<pre><code>failure confirmed on test operation
MUST_FAIL[uid:4] _ (TRANSFER[uid:3] address[0]@MustFail -&gt; address[3]@admins 0utz (&quot;root&quot;, (&quot;new_admin&quot;, address[2]@new_admin)))
while running operation TRANSFER[uid:3] address[0]@MustFail -&gt; address[3]@admins 0utz (&quot;root&quot;, (&quot;new_admin&quot;, address[2]@new_admin))
failed with value &quot;illegal access to admin account&quot; : string
</code></pre>
<a class="header" href="#more-precise-failure-testing" id="more-precise-failure-testing"><h2>(More) Precise Failure Testing</h2></a>
<p>Now, <code>MUST_FAIL</code> (as it is used here) succeeds if the transfer ends in a <em>tezos protocol</em> failure.
Expand All @@ -1351,24 +1321,6 @@ <h1 class="menu-title">Techelson User Documentation</h1>

applying operation CREATE[uid:2] (@address[3]@admins, &quot;sha512:@contract_manager&quot;, None, false, true, 0utz) &quot;Admins&quot;
live contracts: none
=&gt; live contracts: Admins (0utz) address[3]@admins
applying operation CREATE[uid:1] (@address[2]@new_admin, &quot;sha512:@new_admin_manager&quot;, None, true, true, 0utz)
{
storage unit ;
parameter unit ;
code ...;
}
live contracts: Admins (0utz) address[3]@admins
=&gt; live contracts: &lt;anonymous&gt; (0utz) address[2]@new_admin
Admins (0utz) address[3]@admins
applying operation CREATE[uid:0] (@address[1]@root, &quot;sha512:@root_manager&quot;, None, true, true, 0utz)
{
storage unit ;
parameter unit ;
code ...;
}
live contracts: &lt;anonymous&gt; (0utz) address[2]@new_admin
Admins (0utz) address[3]@admins
=&gt; live contracts: &lt;anonymous&gt; (0utz) address[2]@new_admin
Admins (0utz) address[3]@admins
&lt;anonymous&gt; (0utz) address[1]@root
Expand Down Expand Up @@ -1405,9 +1357,10 @@ <h1 class="menu-title">Techelson User Documentation</h1>
Admins (0utz) address[3]@admins
&lt;anonymous&gt; (0utz) address[1]@root

=&gt; live contracts: &lt;anonymous&gt; (0utz) address[2]@new_admin
Admins (0utz) address[3]@admins
&lt;anonymous&gt; (0utz) address[1]@root
failure confirmed on test operation
MUST_FAIL[uid:4] &quot;illegal access to admin account&quot; : string (TRANSFER[uid:3] address[0]@PreciseMustFail -&gt; address[3]@admins 0utz (&quot;root&quot;, (&quot;new_admin&quot;, address[2]@new_admin)))
while running operation TRANSFER[uid:3] address[0]@PreciseMustFail -&gt; address[3]@admins 0utz (&quot;root&quot;, (&quot;new_admin&quot;, address[2]@new_admin))
failed with value &quot;illegal access to admin account&quot; : string

running test script...
Done running test `PreciseMustFail`
Expand Down Expand Up @@ -1492,24 +1445,6 @@ <h1 class="menu-title">Techelson User Documentation</h1>

applying operation CREATE[uid:2] (@address[3]@admins, &quot;sha512:@contract_manager&quot;, None, false, true, 0utz) &quot;Admins&quot;
live contracts: none
=&gt; live contracts: Admins (0utz) address[3]@admins
applying operation CREATE[uid:1] (@address[2]@new_admin, &quot;sha512:@new_admin_manager&quot;, None, true, true, 0utz)
{
storage unit ;
parameter unit ;
code ...;
}
live contracts: Admins (0utz) address[3]@admins
=&gt; live contracts: &lt;anonymous&gt; (0utz) address[2]@new_admin
Admins (0utz) address[3]@admins
applying operation CREATE[uid:0] (@address[1]@root, &quot;sha512:@root_manager&quot;, None, true, true, 0utz)
{
storage unit ;
parameter unit ;
code ...;
}
live contracts: &lt;anonymous&gt; (0utz) address[2]@new_admin
Admins (0utz) address[3]@admins
=&gt; live contracts: &lt;anonymous&gt; (0utz) address[2]@new_admin
Admins (0utz) address[3]@admins
&lt;anonymous&gt; (0utz) address[1]@root
Expand Down Expand Up @@ -1577,9 +1512,6 @@ <h1 class="menu-title">Techelson User Documentation</h1>
Admins (0utz) address[3]@admins
&lt;anonymous&gt; (0utz) address[1]@root

=&gt; live contracts: &lt;anonymous&gt; (0utz) address[2]@new_admin
Admins (0utz) address[3]@admins
&lt;anonymous&gt; (0utz) address[1]@root

running test script...
Done running test `SetSource`
Expand Down Expand Up @@ -1636,7 +1568,6 @@ <h1 class="menu-title">Techelson User Documentation</h1>
running TRANSFER[uid:1] address[0]@SimpleExampleTest1 -&gt; address[1] 120584798270008utz True
=&gt; live contracts: SimpleExample (759142736525198utz) address[1]

=&gt; live contracts: SimpleExample (759142736525198utz) address[1]

running test script...
Done running test `SimpleExampleTest1`
Expand Down Expand Up @@ -1888,7 +1819,6 @@ <h1 class="menu-title">Techelson User Documentation</h1>
running TRANSFER[uid:1] address[0]@SimpleExampleTest1 -&gt; address[1] 120584798270008utz True
=&gt; live contracts: SimpleExample (759142736525198utz) address[1]

=&gt; live contracts: SimpleExample (759142736525198utz) address[1]

running test script...
Done running test `SimpleExampleTest1`
Expand All @@ -1908,7 +1838,6 @@ <h1 class="menu-title">Techelson User Documentation</h1>
running TRANSFER[uid:1] address[2]@SimpleExampleTest2 -&gt; address[3] 520090578679187utz True
=&gt; live contracts: SimpleExample (810126422944596utz) address[3]

=&gt; live contracts: SimpleExample (810126422944596utz) address[3]

running test script...

Expand All @@ -1918,7 +1847,6 @@ <h1 class="menu-title">Techelson User Documentation</h1>
running TRANSFER[uid:2] address[2]@SimpleExampleTest2 -&gt; address[3] 845034275504874utz False
=&gt; live contracts: SimpleExample (1655160698449470utz) address[3]

=&gt; live contracts: SimpleExample (1655160698449470utz) address[3]

running test script...
Done running test `SimpleExampleTest2`
Expand Down
3 changes: 0 additions & 3 deletions docs/user_doc/quick_ref/usage.html
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ <h1 class="menu-title">Techelson User Documentation</h1>
running TRANSFER[uid:1] address[0]@SimpleExampleTest1 -&gt; address[1] 120584798270008utz True
=&gt; live contracts: SimpleExample (759142736525198utz) address[1]

=&gt; live contracts: SimpleExample (759142736525198utz) address[1]

running test script...
Done running test `SimpleExampleTest1`
Expand All @@ -218,7 +217,6 @@ <h1 class="menu-title">Techelson User Documentation</h1>
running TRANSFER[uid:1] address[2]@SimpleExampleTest2 -&gt; address[3] 520090578679187utz True
=&gt; live contracts: SimpleExample (810126422944596utz) address[3]

=&gt; live contracts: SimpleExample (810126422944596utz) address[3]

running test script...

Expand All @@ -228,7 +226,6 @@ <h1 class="menu-title">Techelson User Documentation</h1>
running TRANSFER[uid:2] address[2]@SimpleExampleTest2 -&gt; address[3] 845034275504874utz False
=&gt; live contracts: SimpleExample (1655160698449470utz) address[3]

=&gt; live contracts: SimpleExample (1655160698449470utz) address[3]

running test script...
Done running test `SimpleExampleTest2`
Expand Down
2 changes: 1 addition & 1 deletion docs/user_doc/searchindex.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/user_doc/searchindex.json

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion docs/user_doc/testgen/example.html
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@ <h1 class="menu-title">Techelson User Documentation</h1>
running TRANSFER[uid:1] address[0]@SimpleExampleTest1 -&gt; address[1] 120584798270008utz True
=&gt; live contracts: SimpleExample (759142736525198utz) address[1]

=&gt; live contracts: SimpleExample (759142736525198utz) address[1]

running test script...
Done running test `SimpleExampleTest1`
Expand Down
Loading

0 comments on commit fa2901c

Please sign in to comment.