-
-
Notifications
You must be signed in to change notification settings - Fork 71
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 negative filter tests #425
Conversation
trustfall_core/test_data/tests/valid_queries/fold_count_filter_eq.graphql.ron
Outdated
Show resolved
Hide resolved
@@ -0,0 +1,19 @@ | |||
TestGraphQLQuery ( | |||
// We use a negative number as a filter to ensure that we properly handle the negative number case in get_max_fold_count_limit. |
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.
A few issues here:
- This line is too long. We don't currently have a linter set up, but please try to keep lines below 100 chars in all files to make sure they are readable.
- The comment references implementation details that may change and that ultimately aren't important. The test ensures that comparisons with negative numbers on count work in general, and would catch any failures even if they aren't in
get_max_fold_count_limit()
. I wouldn't name that function or any other implementation details here. get_max_fold_count_limit()
is code and a function. Please try to always put code in backticks and have function names followed by()
to show they are functions.
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.
I spruced up the comments in the tests to look like this:
// Ensure that we properly handle negative numbers in a `not_one_of` filter on a folded edge's count.
I believe this is the longest one, and it's 101 characters including //
so I think that's fine for now. I removed any mentions to internals in tests, good call.
Co-authored-by: Predrag Gruevski <[email protected]>
…ustfall into add-negative-filter-tests
Co-authored-by: Predrag Gruevski <[email protected]>
No description provided.