stacks-network / clarity-wasm

`clar2wasm` is a compiler for generating WebAssembly from Clarity.
GNU General Public License v3.0
12 stars 9 forks source link

add crosscheck tests for filter function #388

Open csgui opened 2 months ago

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 86.93%. Comparing base (3cac25c) to head (acbc62f).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #388 +/- ## ========================================== - Coverage 86.94% 86.93% -0.02% ========================================== Files 43 43 Lines 18232 18232 Branches 18232 18232 ========================================== - Hits 15852 15850 -2 - Misses 1044 1046 +2 Partials 1336 1336 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

Acaccia commented 1 month ago

I pushed the branch workaround to the repo. Feel free to merge it to yours, or refactor from it.

There are a few things to consider though:

  1. THIS IS A POC! It's incomplete and it's tailored to the specific example in the foo test in regression.rs.
  2. When I check for the function argument type, I only considered FixedFunction , we should consider the rest.
  3. We need to add in TypeMap in stacks-core a method to update an expression.
  4. The function does not apply to parents expressions: we need an adaptation of WasmGenerator::set_expr_type to make sure that the new type propagates bottom-up.