Skip to content
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

Fix ci/circleci: test-examples #3049

Merged
merged 1 commit into from
Oct 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions examples/vote/build/main.aleo
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ function propose:
assert.eq self.caller r0.proposer;
hash.bhp256 r0.title into r1 as field;
cast self.caller r1 r0 into r2 as Proposal.record;
async propose r1 into r3; output r2 as Proposal.record;
async propose r1 into r3;
output r2 as Proposal.record;
output r3 as vote.aleo/propose.future;

finalize propose:
Expand All @@ -51,7 +52,8 @@ function new_ticket:
input r0 as field.public;
input r1 as address.public;
cast r1 r0 into r2 as Ticket.record;
async new_ticket r0 into r3; output r2 as Ticket.record;
async new_ticket r0 into r3;
output r2 as Ticket.record;
output r3 as vote.aleo/new_ticket.future;

finalize new_ticket:
Expand All @@ -63,7 +65,8 @@ finalize new_ticket:

function agree:
input r0 as Ticket.record;
async agree r0.pid into r1; output r1 as vote.aleo/agree.future;
async agree r0.pid into r1;
output r1 as vote.aleo/agree.future;

finalize agree:
input r0 as field.public;
Expand All @@ -74,7 +77,8 @@ finalize agree:

function disagree:
input r0 as Ticket.record;
async disagree r0.pid into r1; output r1 as vote.aleo/disagree.future;
async disagree r0.pid into r1;
output r1 as vote.aleo/disagree.future;

finalize disagree:
input r0 as field.public;
Expand Down
2 changes: 1 addition & 1 deletion examples/vote/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ echo "
leo run propose "{
title: 2077160157502449938194577302446444field,
content: 1452374294790018907888397545906607852827800436field,
proposer: aleo1kkk52quhnxgn2nfrcd9jqk7c9x27c23f2wvw7fyzcze56yahvcgszgttu2
proposer: aleo1mgfq6g40l6zkhsm063n3uhr43qk5e0zsua5aszeq5080dsvlcvxsn0rrau
}" || exit

echo "
Expand Down
5 changes: 2 additions & 3 deletions tests/test-framework/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,8 @@ pub enum TestError {

impl fmt::Display for TestError {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let format_test = |test: &str| -> String {
if test.len() > 50 { String::new() } else { format!("\n\n{test}\n\n") }
};
let format_test =
|test: &str| -> String { if test.len() > 50 { String::new() } else { format!("\n\n{test}\n\n") } };
match self {
TestError::Panicked { test, index, error } => {
write!(f, "test #{}: {}encountered a rust panic:\n{}", index + 1, format_test(test), error)
Expand Down