go icon indicating copy to clipboard operation
go copied to clipboard

Cars Assemble: Error in return value of test case

Open jewthon opened this issue 2 years ago • 10 comments

There is a problem in #2083 Problem : the expected return type in test case 14 and 15 is float but the testcase it is receiving is in int. Solution : I want to make correction is the test case return value

Please assign me this issue

jewthon avatar Mar 06 '22 15:03 jewthon

Hi!

Thanks for taking the time to write an issue.

Maybe I'm missing something, but I don't see the issue. Tests 14 and 15 for me are these ones:

https://github.com/exercism/go/blob/9ecfb014112598afd9f2d77c12e2ee46dc711d37/exercises/concept/cars-assemble/cars_assemble_test.go#L147-L156

This is in the TestCalculateCost function, that tests the CalculateCost function. carsCount and want are int and unint respectively:

https://github.com/exercism/go/blob/9ecfb014112598afd9f2d77c12e2ee46dc711d37/exercises/concept/cars-assemble/cars_assemble_test.go#L127-L131

Which are exactly the argument and return types CalculateCost expects:

https://github.com/exercism/go/blob/9ecfb014112598afd9f2d77c12e2ee46dc711d37/exercises/concept/cars-assemble/cars_assemble.go#L16-L18

Maybe you are referring to a different test case?

andrerfcsantos avatar Mar 06 '22 16:03 andrerfcsantos

Thanks for reaching me out . But even if I am including the codition in raw but still it is given error I can show you

On Sun, 6 Mar 2022 at 22:09, André Santos @.***> wrote:

Hi!

Thanks for taking the time to write an issue.

Maybe I'm missing something, but I don't see the issue. Tests 14 and 15 for me are these ones:

https://github.com/exercism/go/blob/9ecfb014112598afd9f2d77c12e2ee46dc711d37/exercises/concept/cars-assemble/cars_assemble_test.go#L147-L156

This is in the TestCalculateCost function, that tests the CalculateCost function. carsCount and want are int and unint respectively:

https://github.com/exercism/go/blob/9ecfb014112598afd9f2d77c12e2ee46dc711d37/exercises/concept/cars-assemble/cars_assemble_test.go#L127-L131

Which are exactly the argument and return types CalculateCost expects:

https://github.com/exercism/go/blob/9ecfb014112598afd9f2d77c12e2ee46dc711d37/exercises/concept/cars-assemble/cars_assemble.go#L16-L18

Maybe you are referring to a different test case?

— Reply to this email directly, view it on GitHub https://github.com/exercism/go/issues/2122#issuecomment-1059995652, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWGMRIPGXUA7KDAY57FPWOTU6TNVLANCNFSM5QBJCN2A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>

jewthon avatar Mar 06 '22 16:03 jewthon

If you are detecting the error in a particular solution, yes, please post the solution here.

andrerfcsantos avatar Mar 06 '22 17:03 andrerfcsantos

I need to think about where it is going wrong as whenever I give the same input for the particular problem it is giving me the same output as expected but when I am running in your site it is saying the outcome is different from expected ones . So please allocate me some time to go through the code on github.

On Sun, 6 Mar 2022 at 22:58, André Santos @.***> wrote:

If you are detecting the error in a particular solution, yes, please post the solution here.

— Reply to this email directly, view it on GitHub https://github.com/exercism/go/issues/2122#issuecomment-1060005221, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWGMRIO7DJCQUIKFM4BV5RLU6TTLTANCNFSM5QBJCN2A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>

jewthon avatar Mar 07 '22 04:03 jewthon

@jewthon Sure, no problem, take your time!

If you believe the problem might be with your solution, you can ask for mentoring and a mentor will help you see if there's anything wrong with your solution or are the tests that are potentially wrong.

If on the other hand you strongly believe the problem are the tests, you can post the problematic solution here and we can take a look.

It's also worth making sure you are running the last version of the exercise, otherwise the test code you see here on github and the one you have might also differ - when requesting mentoring, a mentor can also help you with this as they can download the files for your solution exactly as you have them.

andrerfcsantos avatar Mar 07 '22 09:03 andrerfcsantos

Thanks, I'll check it out.

On Mon, Mar 7, 2022, 2:49 PM André Santos @.***> wrote:

@jewthon https://github.com/jewthon Sure, no problem, take your time!

If you believe the problem might be with your solution, you can ask for mentoring and a mentor will help you see if there's anything wrong with your solution or are the tests that are potentially wrong.

If on the other hand you strongly believe the problem are the tests, you can post the problematic solution here and we can take a look.

— Reply to this email directly, view it on GitHub https://github.com/exercism/go/issues/2122#issuecomment-1060376193, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWGMRIKIIWVRTOYGEUQOI3TU6XCZTANCNFSM5QBJCN2A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

jewthon avatar Mar 07 '22 12:03 jewthon

@jewthon Any news on this?

andrerfcsantos avatar Mar 12 '22 11:03 andrerfcsantos

Not yet!

On Sat, Mar 12, 2022, 4:51 PM André Santos @.***> wrote:

@jewthon https://github.com/jewthon Any news on this?

— Reply to this email directly, view it on GitHub https://github.com/exercism/go/issues/2122#issuecomment-1065865199, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWGMRIL2PQAVVX5LFRJHABDU7R44BANCNFSM5QBJCN2A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

jewthon avatar Mar 12 '22 12:03 jewthon

@jewthon Did you start this exercise some months ago and then continued later on? There was a different version of this exercise before, maybe that is causing the issue.

junedev avatar Mar 15 '22 21:03 junedev

I also doubt that. I think this is the reason why I am getting error. Ok I got you

On Wed, Mar 16, 2022, 2:53 AM June @.***> wrote:

@jewthon https://github.com/jewthon Did you start this exercise some months ago and then continued later on? There was a different version of this exercise before, maybe that is causing the issue.

— Reply to this email directly, view it on GitHub https://github.com/exercism/go/issues/2122#issuecomment-1068486200, or unsubscribe https://github.com/notifications/unsubscribe-auth/AWGMRILLJ6DMRNKKA5N7FJLVAD5UJANCNFSM5QBJCN2A . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

jewthon avatar Mar 16 '22 02:03 jewthon