Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Indentation UTs should not use ROOT locale when they test violation/error message #4003
taken from #3993 (comment)
We can see the messages have totally different postfixes.
I have logged what information the
To sum up, I haven't found another way to do the assertion without
This was referenced
Mar 14, 2017
So problem is test was written in no localization consideration.
so looks like whole problems is due to "getExpectedMessage" method that generate message in English base on some number and string value.
@rnveach , am I miss something ? please share you ideas on this.
Actually I have tried it in some early commits of #3993 , smth like:
The messages we need to concern about are
The messages are smth like
We need to find a way to parse the token type of it if we want to drop
@Luolc , Correct me if I am wrong ...
@rnveach , please step in , may be am wrong in some of the points.
@Luolc Sorry, it has been a while since I had to look at this test since I made it.
@romani He is correct. We are missing the 3rd message property, the token type, to fully produce the violation message.
All messages have the indexes in order, but we shouldn't be relying on this as it could change in the future.
The problem isn't with we are dealing with too many messages.
We are already doing this.
The only way to relax this is to remove 3-way input validation completely.
Here are my thoughts on how to fix this:
Edit: updated for @romani's comments.
We will not think about the future of what messages will be. It will probably become a requirement for this check that message properties be in numerical order for this check for testing.
So this is what we should do with the issue.
referenced this issue
Mar 16, 2017
@rnveach Yes, sounds good. Thanks.