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

Adding context.getvarfrominput and context.getvar #803

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

sebastianrof2
Copy link

@SethDusek, Ready for review.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 12688397824

Details

  • 42 of 57 (73.68%) changed or added relevant lines in 3 files are covered.
  • 8 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.07%) to 78.524%

Changes Missing Coverage Covered Lines Changed/Added Lines %
ergotree-interpreter/src/eval/scontext.rs 22 37 59.46%
Files with Coverage Reduction New Missed Lines %
ergotree-ir/src/serialization/types.rs 8 81.12%
Totals Coverage Status
Change from base Build 12650379227: 0.07%
Covered Lines: 11148
Relevant Lines: 14197

💛 - Coveralls

match ctx.extension.values.get(&var_id) {
None => Ok(Value::Opt(Box::new(None))),
Some(v) if v.tpe == *expected_type => Ok(Value::Opt(Box::new(Some(v.v.clone().into())))),
Some(_) => Err(EvalError::UnexpectedValue(
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should return None

)));
}

match ctx.extension.values.get(&var_id) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is supposed to get from input_index's context extension

proptest! {
#![proptest_config(ProptestConfig::with_cases(64))]

#[test]
Copy link
Collaborator

Choose a reason for hiding this comment

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

rustfmt doesn't work inside proptest macros unfortunately, can you manually fix some of the indent issues?

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.

3 participants