-
Notifications
You must be signed in to change notification settings - Fork 94
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
Add assert_is() and assert_is_not() #34
Conversation
if a === b { | ||
Ok(()) | ||
} else { | ||
let a = debug_string(a) | ||
let b = debug_string(b) | ||
Err("assertion failed for `\(a) === \(b)`") | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is preferably @option.unless(a === b, fn() { ... })
, but crippled by the lack of test_import
in moon.pkg.json
, and/or a better handling of cyclic dependencies.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
test_import
will be added as soon as next week
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for your contribution!
Embarassingly,
I'll follow up with another PR after working hours. |
We should probably introduce a
!==
operator ... ?