-
Notifications
You must be signed in to change notification settings - Fork 72
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
Fix logic error in c4coll_isIndexTrained #2078
Conversation
It was universally returning true. Also remove the warnings check from the VS test since it makes no sense anymore and is really hard to in the isTrained test now that "untrained" is a warning. Add in a test for the C API to make sure it works correctly.
Build failed in PR validation. |
Code Coverage Results:
|
CBL-5906 |
Yes, I didn't know there was a ticket for that. I added those checks in. |
I disagree about removing the warnings check; I think it's useful. And I have a separate PR where I fixed the tests by correctly setting the number of expected warnings. Could you take that out of this PR, and we can decide whether or not to do it? |
Needing to know how many warnings are logged in order for a test to succeed is really quite obnoxious though. If I take it out of here I need a system of incrementing the expected warnings count by the number of sections since the check only resets at the end of the test....or something like that I can't remember but SECTION seems to mess with it. |
Maybe this test is not as bad as it seems with it? It seems to pass locally now.
Or maybe I'm hallucinating? I seem to have put the increment in the correct place this time and the test is ok with it. |
It was universally returning true. Also remove the warnings check from the VS test since it makes no sense anymore and is really hard to in the isTrained test now that "untrained" is a warning. Add in a test for the C API to make sure it works correctly.