Skip to content
This repository has been archived by the owner on Jun 27, 2023. It is now read-only.

Error message is hard to understand #327

Closed
adzimzf opened this issue Sep 4, 2019 · 5 comments
Closed

Error message is hard to understand #327

adzimzf opened this issue Sep 4, 2019 · 5 comments

Comments

@adzimzf
Copy link

adzimzf commented Sep 4, 2019

When the data type of expected result is different from the actual result, the error message needs to be more clear.

This error message a littel bit confusing when there's any changes on data type

--- FAIL: TestRechargeModule_updateEnquiryBill/order_status_is_success_and_delete_redis_is_success,_and_update_bill_fulfillment_is_success_and_update_bill_status_is_failed (0.00s)
        enquiry_handler.go:30: Unexpected call to *mock_lib.MockEnquiryLibInterface.UpdateBillFulfillment([123 1 1]) at ../mocks/mock_src/mock_lib/mock_enquiry.go:66 because: 
            Expected call at ../enquiry_handler_test.go:154 doesn't match the argument at index 2.
            Got: 1
            Want: is equal to 1

it would be nicer if the error message is more clear

if needed, I can create PR for this one

@codyoss
Copy link
Member

codyoss commented Oct 12, 2019

Hey @adzimzf what would make it more clear in your opinion?

@codyoss codyoss added status: needs more info This issue need more information from the author. type: feature request labels Oct 12, 2019
@adzimzf
Copy link
Author

adzimzf commented Oct 14, 2019

Hi @codyoss,
in my opinion, data type should mention in error message.
for instance, on the above sample I put, the difference is int and int64 but since the value is equal, the error message would be better if it's like Got: int(1), Want : is equal to int64(1).

or is there any better idea?

@codyoss
Copy link
Member

codyoss commented Oct 15, 2019

Thank you for your feedback. I will take your opinion into consideration as I ponder on this some more. Maybe we can get some more input from others in the community as well.

@codyoss codyoss added status: needs discussion proposal and removed status: needs more info This issue need more information from the author. labels Oct 15, 2019
@adzimzf
Copy link
Author

adzimzf commented Oct 16, 2019

Thanks @codyoss

@codyoss
Copy link
Member

codyoss commented Oct 18, 2019

Closing this as it seems to be a dup of #190 . Conversation for this will now happen there.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants