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

bug: Make --test argument also check unittests #174

Open
wawel37 opened this issue Jan 8, 2025 · 0 comments
Open

bug: Make --test argument also check unittests #174

wawel37 opened this issue Jan 8, 2025 · 0 comments

Comments

@wawel37
Copy link
Member

wawel37 commented Jan 8, 2025

Currenctly when we put the

pub fn f1() -> u32 {
  1
}

#[cfg(test)]
mod tests {
    use hello_world::f1;
    #[test]
    fn invisible_to_linter() {
        let x = true;
        if false == x {
            println!("x is false");
        }
        assert_eq!(1, f1());
    }
}

inside the lib.cairo, linter won't catch the false == x problem inside the invisible_to_linter.

When we create /tests/test1.cairo integration test, linter catches it with no problem.

@wawel37 wawel37 converted this from a draft issue Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

1 participant