Skip to content

Commit

Permalink
Integrate Example from README into Tests (#50)
Browse files Browse the repository at this point in the history
Closes #51
  • Loading branch information
ksew1 authored Sep 10, 2024
1 parent 2d51480 commit 9782ee2
Show file tree
Hide file tree
Showing 42 changed files with 357 additions and 199,525 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ jobs:
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84
- uses: hrishikesh-kadam/setup-lcov@v1
- uses: software-mansion/setup-scarb@v1
- uses: foundry-rs/setup-snfoundry@v3
- run: cargo test --release

rustfmt:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ target
.idea
.snfoundry_cache
.spr.yml
Scarb.lock
.DS_Store
2 changes: 2 additions & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
starknet-foundry 0.30.0
scarb 2.8.1
6 changes: 5 additions & 1 deletion crates/cairo-coverage/src/input/sierra_to_cairo_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,13 @@ fn find_statement_origin(
code_locations
.iter()
.zip(function_names)
// TODO(#55)
// TODO: We should probably filter by path to user project not by path to cache
// TODO: Can get this from source_sierra_path in call trace
.find(|((file_location, _), _)| !file_location.contains("com.swmansion.scarb"))
.find(|((file_location, _), _)| {
!file_location.contains("com.swmansion.scarb")
&& !file_location.contains(".cache/scarb")
})
.map(
|((file_location, line_range), function_name)| StatementOrigin {
function_name: function_name.to_owned(),
Expand Down
Binary file removed crates/cairo-coverage/tests/.DS_Store
Binary file not shown.
Binary file removed crates/cairo-coverage/tests/data/.DS_Store
Binary file not shown.

This file was deleted.

Loading

0 comments on commit 9782ee2

Please sign in to comment.