Skip to content

Add coverage tests for much of solc-expressions#89

Closed
plotchy wants to merge 7 commits intomasterfrom
plotchy/coverage
Closed

Add coverage tests for much of solc-expressions#89
plotchy wants to merge 7 commits intomasterfrom
plotchy/coverage

Conversation

@plotchy
Copy link
Copy Markdown
Contributor

@plotchy plotchy commented Jul 20, 2024

No description provided.

Comment on lines -334 to -342
fn range_eval(
&self,
arena: &mut RangeArena<Elem<Concrete>>,
_ctx: ContextNode,
lhs_cvar: ContextVarNode,
rhs_cvar: ContextVarNode,
op: RangeOp,
) -> Result<SolcRange, GraphError> {
if let Some(lhs_range) = lhs_cvar.ref_range(self)? {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is unused trait fn

Comment on lines -474 to -507
fn update_array_min_if_length(
&mut self,
arena: &mut RangeArena<Elem<Concrete>>,
ctx: ContextNode,
loc: Loc,
maybe_length: ContextVarNode,
) -> Result<(), ExprErr> {
if let Some(backing_arr) = maybe_length.len_var_to_array(self).into_expr_err(loc)? {
let next_arr = self.advance_var_in_ctx(
backing_arr.latest_version_or_inherited_in_ctx(ctx, self),
loc,
ctx,
)?;
let new_len = Elem::from(backing_arr)
.get_length()
.max(maybe_length.into());
let min = Elem::from(backing_arr).set_length(new_len);
next_arr
.set_range_min(self, arena, min)
.into_expr_err(loc)?;
}
Ok(())
}

fn update_array_max_if_length(
&mut self,
arena: &mut RangeArena<Elem<Concrete>>,
ctx: ContextNode,
loc: Loc,
maybe_length: ContextVarNode,
) -> Result<(), ExprErr> {
if let Some(backing_arr) = maybe_length.len_var_to_array(self).into_expr_err(loc)? {
let next_arr = self.advance_var_in_ctx(
backing_arr.latest_version_or_inherited_in_ctx(ctx, self),
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unused array trait fns

@plotchy
Copy link
Copy Markdown
Contributor Author

plotchy commented Jul 22, 2024

merged into #88

@plotchy plotchy closed this Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant