8000 Feature/test syntax new by collinc97 · Pull Request #43 · ProvableHQ/leo · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Feature/test syntax new #43

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

Merged
merged 9 commits into from
Jun 6, 2020
Merged

Feature/test syntax new #43

merged 9 commits into from
Jun 6, 2020

Conversation

collinc97
Copy link
Collaborator

Changes

function main(a: u32) -> u32 {
    return a
}

test function expect_pass() {
  let a = 1u32;

  let res = main(a);

  assert_eq!(res, 1u32);
}

test function expect_fail() {
  assert_eq!(1u8, 0u8);
}
leo test
 INFO  leo  Running 2 tests
 INFO  leo  test language::expect_pass passed. Constraint system satisfied: true
ERROR  leo  test language::expect_fail errored: Assertion 1u8 == 0u8 failed
  • implements basic testing syntax
  • new leo test command
  • test output logged to console

@collinc97 collinc97 added the feature A new feature. label Jun 5, 2020
@collinc97 collinc97 self-assigned this Jun 5, 2020
@collinc97 collinc97 added this to the Leo Developer Preview I milestone Jun 5, 2020
@collinc97 collinc97 requested a review from howardwu June 6, 2020 00:42
@collinc97 collinc97 merged commit e985027 into master Jun 6, 2020
@collinc97 collinc97 deleted the feature/test-syntax-new branch June 6, 2020 02:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0