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

feat: add eval regex and test #167

Merged
merged 1 commit into from
Nov 19, 2021
Merged

feat: add eval regex and test #167

merged 1 commit into from
Nov 19, 2021

Conversation

sheny1xuan
Copy link
Contributor

@sheny1xuan sheny1xuan commented Nov 17, 2021

Signed-off-by: stonex 1479765922@qq.com

Description

  • In adac model, we need test eavl() whether in the model matcher expression. Add a regex to test whether has eval.
  • ReplaceEvalWithMap replace the eval(tokens) by tokens value.
  • Add an unit test for HasEval() and ReplaceEvalWithMap().

@casbin-bot
Copy link
Member

@EmperorYP7 @divy9881 @noob20000405 please review

@hsluoyz
Copy link
Member

hsluoyz commented Nov 17, 2021

@EmperorYP7 plz review

Copy link
Member

@EmperorYP7 EmperorYP7 left a comment

Choose a reason for hiding this comment

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

Saving a few constructor calls might help. Rest everything LGTM.

casbin/util/eval.cpp Outdated Show resolved Hide resolved
casbin/util/util.h Outdated Show resolved Hide resolved
include/casbin/casbin_helpers.h Outdated Show resolved Hide resolved
Signed-off-by: stonex <1479765922@qq.com>
@sheny1xuan
Copy link
Contributor Author

sheny1xuan commented Nov 19, 2021

I think this pr can be merged now, and I will make a new pr base on this. @hsluoyz @EmperorYP7

@hsluoyz hsluoyz merged commit 64fc8dd into casbin:master Nov 19, 2021
@github-actions
Copy link

🎉 This PR is included in version 1.42.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants