-
Notifications
You must be signed in to change notification settings - Fork 4
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
Change find command to allow better searches #77
Change find command to allow better searches #77
Conversation
Codecov Report
@@ Coverage Diff @@
## master #77 +/- ##
============================================
- Coverage 74.46% 74.42% -0.05%
Complexity 424 424
============================================
Files 75 75
Lines 1253 1251 -2
Branches 125 125
============================================
- Hits 933 931 -2
Misses 273 273
Partials 47 47
Continue to review full report at Codecov.
|
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.
Just a few comments! But nice work here man, I love the new find
ux
@@ -20,22 +19,20 @@ | |||
* containsWordIgnoreCase("ABc def", "DEF") == true |
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.
Let's update the javadocs too 😁
* - middle word in sentence | ||
* - matches first word in ModuleCode | ||
* - last word in ModuleCode | ||
* - middle word in ModuleCode |
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.
Should we add "matches part of any word in ModuleCode" too? Since now we support it
* - any word | ||
* - word containing symbols/numbers | ||
* - word with leading/trailing spaces | ||
* | ||
* Valid equivalence partitions for sentence: | ||
* Valid equivalence partitions for ModuleCode: | ||
* - empty string | ||
* - one word | ||
* - multiple words |
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.
Do you think we should remove "multiple words" ah? I feel like it might be an irrelevant equivalence class now that we use a .contains()
check
Removing it will also match the new test cases below since we're removing the old tests involving multiple words
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.
yup agree!
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! (apart from minor comments)
* - any word | ||
* - word containing symbols/numbers | ||
* - word with leading/trailing spaces | ||
* | ||
* Valid equivalence partitions for sentence: | ||
* Valid equivalence partitions for ModuleCode: | ||
* - empty string | ||
* - one word | ||
* - multiple words |
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.
yup agree!
* - query word matches part of a sentence word | ||
* - sentence word matches part of the query word | ||
* - ModuleCode word matches part of the CharSequence |
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.
Is this part supposed to return true now? now that we changed the find command to .contains()
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 👍
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!
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!
Minor nit:
ModuleCode
so that when user entersadd c/cs2103t cr/4
, the module code displayed in the GUI would be displayed as "CS2103T", for standardisation purposesCloses #76