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

Do a test coverage #20

Open
dr-orlovsky opened this issue Jun 29, 2021 · 3 comments
Open

Do a test coverage #20

dr-orlovsky opened this issue Jun 29, 2021 · 3 comments
Labels
epic Epic task good first issue Good for newcomers help wanted Extra attention is needed *security* Issues affecting safety/security (include undefined behaviours) test Test implementation or failures
Milestone

Comments

@dr-orlovsky
Copy link
Member

No description provided.

@dr-orlovsky dr-orlovsky added good first issue Good for newcomers help wanted Extra attention is needed *security* Issues affecting safety/security (include undefined behaviours) epic Epic task test Test implementation or failures labels Jun 29, 2021
@dr-orlovsky dr-orlovsky modified the milestones: ALU, API 1.0.0 Jun 29, 2021
@josediegorobles
Copy link
Contributor

Hi, this issue is about start writing test? There are some guidlines for this?

@dr-orlovsky
Copy link
Member Author

Yes, the issue is about starting doing at least some tests (any are better than none) and there is no guideline other than official rust testing guidelines https://doc.rust-lang.org/book/ch11-00-testing.html

@josediegorobles
Copy link
Contributor

Hi, I'm starting with numbers.rs because I can see easier what to test.

I'm started with this:

fn asserting_layouts_kinds() {
let signed_integer_layout = Layout::Integer(IntLayout::signed(33));
assert!(signed_integer_layout.is_signed_int());
assert!(!signed_integer_layout.is_unsigned_int());
assert!(!signed_integer_layout.is_float());

    let unsigned_integer_layout = Layout::Integer(IntLayout::unsigned(33));
    assert!(unsigned_integer_layout.is_unsigned_int());
    assert!(!unsigned_integer_layout.is_signed_int());
    assert!(!unsigned_integer_layout.is_float());
}

It's reasonable to test it? I test all kinds of layout and checks (isfloat, is_signed_integer) in one test and make another test?

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
epic Epic task good first issue Good for newcomers help wanted Extra attention is needed *security* Issues affecting safety/security (include undefined behaviours) test Test implementation or failures
Projects
None yet
Development

No branches or pull requests

2 participants