Skip to content

Latest commit

 

History

History
31 lines (23 loc) · 484 Bytes

README.md

File metadata and controls

31 lines (23 loc) · 484 Bytes

Testing cairo files

cargo run --bin cairo-test -- -p /path/to/file.cairo

We can use this command to run Cairo level tests.

Example

#[test]
fn test_assert_true() {
    // Asserts that true
    assert(true, 'assert(true)');
}

#[test]
#[should_panic]
fn test_assert_false() {
    assert(false, 'assert(false)');
}

Longer Example

Longer example can be found at Core Library Test.

cargo run --bin cairo-test -- -p corelib/