-
Notifications
You must be signed in to change notification settings - Fork 486
Add goldenBundle
and goldenBundle'
test functions
#7057
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
cpu: 597469 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See this comment https://github.com/IntersectMBO/plutus/pull/7057/files#r2057934202 |
||
mem: 2006 | ||
size: 19 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
(let | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See this comment https://github.com/IntersectMBO/plutus/pull/7057/files#r2057938509 |
||
data Unit | Unit_match where | ||
Unit : Unit | ||
data Bool | Bool_match where | ||
True : Bool | ||
False : Bool | ||
data (Tuple2 :: * -> * -> *) a b | Tuple2_match where | ||
Tuple2 : a -> b -> Tuple2 a b | ||
in | ||
\(ds : (\a -> data) integer) -> | ||
Tuple2_match | ||
{integer} | ||
{list data} | ||
((let | ||
b = list data | ||
in | ||
\(tup : pair integer b) -> | ||
Tuple2 | ||
{integer} | ||
{b} | ||
(fstPair {integer} {b} tup) | ||
(sndPair {integer} {b} tup)) | ||
(unConstrData ds)) | ||
{integer} | ||
(\(ds : integer) (ds : list data) -> | ||
Bool_match | ||
(ifThenElse {Bool} (equalsInteger 0 ds) True False) | ||
{all dead. integer} | ||
(/\dead -> unIData (headList {data} ds)) | ||
(/\dead -> | ||
Tuple2_match | ||
{integer} | ||
{list data} | ||
((let | ||
b = list data | ||
in | ||
\(tup : pair integer b) -> | ||
Tuple2 | ||
{integer} | ||
{b} | ||
(fstPair {integer} {b} tup) | ||
(sndPair {integer} {b} tup)) | ||
(unConstrData ds)) | ||
{integer} | ||
(\(ds : integer) (ds : list data) -> | ||
Bool_match | ||
(ifThenElse {Bool} (equalsInteger 1 ds) True False) | ||
{all dead. integer} | ||
(/\dead -> 1) | ||
(/\dead -> | ||
let | ||
!defaultBody : integer = error {integer} | ||
in | ||
Unit_match (error {Unit}) {integer} defaultBody) | ||
{all dead. dead})) | ||
{all dead. dead})) | ||
(Constr 0 [I 1]) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
(program | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See this comment https://github.com/IntersectMBO/plutus/pull/7057/files#r2057938509 |
||
1.1.0 | ||
((\ds -> | ||
case | ||
((\tup -> | ||
constr 0 | ||
[(force (force fstPair) tup), (force (force sndPair) tup)]) | ||
(unConstrData ds)) | ||
[ (\ds ds -> | ||
force | ||
(force ifThenElse | ||
(equalsInteger 0 ds) | ||
(delay (unIData (force headList ds))) | ||
(delay | ||
(case | ||
((\tup -> | ||
constr 0 | ||
[ (force (force fstPair) tup) | ||
, (force (force sndPair) tup) ]) | ||
(unConstrData ds)) | ||
[ (\ds ds -> | ||
force | ||
(force ifThenElse | ||
(equalsInteger 1 ds) | ||
(delay 1) | ||
(delay | ||
((\cse -> case cse [cse]) | ||
error)))) ])))) ]) | ||
(Constr 0 [I 1]))) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
(con integer -2469135780) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See this comment https://github.com/IntersectMBO/plutus/pull/7057/files#r2057929435 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
\(d-1579 : data) -> | ||
\(d : data) -> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See this comment https://github.com/IntersectMBO/plutus/pull/7057/files#r2057916196 |
||
let | ||
!nt-1580 : list data = tailList {data} (unListData d-1579) | ||
!s-1581 : integer = unIData (headList {data} nt-1580) | ||
!nt-1582 : list data | ||
= tailList {data} (tailList {data} (tailList {data} nt-1580)) | ||
!s-1583 : integer = unIData (headList {data} nt-1582) | ||
!s-1584 : integer = unIData (headList {data} (tailList {data} nt-1582)) | ||
!nt : list data = tailList {data} (unListData d) | ||
!s : integer = unIData (headList {data} nt) | ||
!nt : list data = tailList {data} (tailList {data} (tailList {data} nt)) | ||
!s : integer = unIData (headList {data} nt) | ||
!s : integer = unIData (headList {data} (tailList {data} nt)) | ||
in | ||
addInteger (addInteger s-1581 s-1583) s-1584 | ||
addInteger (addInteger s s) s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This causes the following file renames:
But the contents stayed the same