-
Notifications
You must be signed in to change notification settings - Fork 109
add-some-unit-tests #95
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
base: master
Are you sure you want to change the base?
Conversation
|
@jerryjiangabc |
guimingTang
left a comment
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.
Thanks for contributing to the test cases! AndFilterTest already exists under com.twitter.graphjet.algorithms.filter. Could you merge the new test cases with the existing tests?
|
@guimingTang |
| } | ||
|
|
||
| @Test | ||
| public void testFilterResultReturningFalseOne() { |
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 test is almost equivalent to testNoFilter() where the socialProof array and resultNode values are changed. Can we reuse the existing setup and merge them under the same test function?
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.
Done.
| } | ||
|
|
||
| @Test | ||
| public void testFilterResultReturningFalseTwo() { |
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.
s/testFilterResultReturningFalseTwo()/testWithRecentTweetFilter()
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.
Renamed method.
I consider your comment requesting to change the name of the method.
|
|
||
| @Test | ||
| public void testFilterResultReturningFalseTwo() { | ||
| List<ResultFilter> linkedList = new LinkedList<ResultFilter>(); |
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.
Variables should generally be named by its designed purpose, i.e. in this case the var linkedList should be called something like "filters"
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.
Done.
| StatsReceiver statsReceiver = new NullStatsReceiver(); | ||
| RecentTweetFilter recentTweetFilter = new RecentTweetFilter(2147483639L, statsReceiver); | ||
| linkedList.add(recentTweetFilter); | ||
| ANDFilters aNDFilters = new ANDFilters(linkedList, statsReceiver); |
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.
s/aNDFilters/andFilters
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.
Done.
| RecentTweetFilter recentTweetFilter = new RecentTweetFilter(2147483639L, statsReceiver); | ||
| linkedList.add(recentTweetFilter); | ||
| ANDFilters aNDFilters = new ANDFilters(linkedList, statsReceiver); | ||
| SmallArrayBasedLongToDoubleMap[] smallArrayBasedLongToDoubleMapArray = new SmallArrayBasedLongToDoubleMap[5]; |
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.
s/smallArrayBasedLongToDoubleMapArray/socialProofs
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.
Done.
| * @see SalsaRequestBuilder | ||
| **/ | ||
| public class SalsaRequestBuilderTest { | ||
| @Test |
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.
The GraphJet codebase adopts a 2-space convention. Could you trim the spacing in this file?
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.
Done.
|
@guimingTang |
|
Obviously, accidentally closed this pull request after approving but before merging. |
Added new Unit Tests to increase code coverage.