Amend NameAndTypeResolution expected messages#2624
Amend NameAndTypeResolution expected messages#2624axic merged 1 commit intoargotorg:developfrom izgzhen:amend-test-msg
Conversation
|
Thanks! A few tests fail, see here for a list: https://travis-ci.org/ethereum/solidity/jobs/256799732 |
|
Oh I see the probable reason. @izgzhen these aren't messages displayed to the user during testing, but the messages the compiler emits when compiling those code snippets. Our tests need to ensure we check that the right message was emitted by the compiler. |
|
Right ... so I think another half of the work is still missing right? |
|
If so, although not quite the "up-for-grab" level, I'll give a try to some of them at least 😆 |
|
@izgzhen so the idea is that you copy-paste the source code into a file, run |
|
Fixed, and for some cases, I found that no matter what I filled in, it is always okay (I filled in |
Are you sure the message doesn't contain a single letter It tries a text submatch. |
Well, it is interesting .. I'll try it again. Thanks! |
|
@axic Fixed, sorry that I was a bit busy these days thus I didn't carefully go through the existing code before diving into it. Thanks a lot for your patience |
|
Thanks! Is this still partially solving #2613 or does it change every message? |
Every originally |
|
Looks good to me. |
|
@chriseth please double check, but would be nice to merge soon |
| // Error: Identifier already declared. | ||
| // Error: Override changes function to modifier. | ||
| CHECK_ERROR_ALLOW_MULTI(text, DeclarationError, ""); | ||
| CHECK_ERROR_ALLOW_MULTI(text, DeclarationError, "Identifier already declared."); |
There was a problem hiding this comment.
Actually the real test case here is "Override changes function to modifier.".
| // Error: Identifier already declared. | ||
| // Error: Override changes modifier to function. | ||
| CHECK_ERROR_ALLOW_MULTI(text, DeclarationError, "Identifier already declared"); | ||
| CHECK_ERROR_ALLOW_MULTI(text, DeclarationError, "Identifier already declared."); |
There was a problem hiding this comment.
Actually the real test case here is "Override changes modifier to function."
| } | ||
| )"; | ||
| CHECK_ERROR_ALLOW_MULTI(text, DeclarationError, ""); | ||
| CHECK_ERROR_ALLOW_MULTI(text, DeclarationError, "Function with same name and arguments defined twice."); |
There was a problem hiding this comment.
The real test case here is "Only one fallback function is allowed."
|
@izgzhen sorry it took so long, but could you change the above three things? I'd like to get this merged asap. |
It is okay :) I've updated the code, hoping it works. |
|
Thanks! Seems like we need to improve our testing infrastructure to handle those properly, because it always takes the first error: Can you just revert those 3 to what you had and I'll address it in a separate PR? |
|
@izgzhen realised I can push to your branch and did the changes myself |
|
@izgzhen thanks! |
Fixes #2613.