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 test UAIFileTest.preamble failure for some locales #3802
Fix test UAIFileTest.preamble failure for some locales #3802
Conversation
@luisffranca hey! Thanks for submitting this patch. @vigsterkr Travis fails with a style check related to original code. Do we merge it? |
Should we update the clang-format style file for this? @geektoni |
@iglesias We could force clang-format to align escaped newlines as far left (or far right) as possible. |
@geektoni I don't have strong feelings about the location of the trailing ''s; though it looks indeed nice all aligned. Regarding the indentation between the first line with the macro signature and the following lines, I think it would be better to have everything with the same level of indentation since I believe that is more consistent with the current codebase. |
@iglesias I don't know if there is an option to prevent indentation inside macro definitions (apart from using I don't think we will be able to configure clang-format to respect exactly all Shogun code conventions. There will surely be things we cannot force. |
@iglesias I've done some research and apparently it is not possible to format
Since the clang-format purpose is to free devs from thinking about code formatting, I would proceed with option 3. I agree that it will change the codebase standard, but in the long run, I think it will be worth it. |
I agree with you, @geektoni. I think 3 is the most suitable option as well. |
Hi @luisffranca! As you can read, one of the Travis tests failed because of some code style issues. To fix that error please give a look to the Travis log below and you'll see the commands you have to run: https://travis-ci.org/shogun-toolbox/shogun/jobs/227279295#L524 Make sure to have After doing that, update the PR here and you're done. 🎉 |
72eca6e
to
6fcaee7
Compare
Hi @geektoni! Thanks for your help. I've updated the PR and now the tests should work! |
The unit test UAIFileTest.preamble failed for locales with other decimal delimiters, such as "pt_BR.utf8". Some functions, like strtod(), use the "C" locale and the test failed when they were called with a different one.
This is fixed by using the "C" locale in CUAIFile::get_vector().