Creating a Java Unit test vectoraddition

I made a java unit test (see comment) for a piece of code that adds two vectors of the same dimension but since v1 (in my test) isnt a double the test isnt working. Im confused as to what they did in the original and how to make the test
No description
11 Replies
JavaBot
JavaBot2y ago
This post has been reserved for your question.
Hey @mjstx! Please use /close or the Close Post button above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
mjstx
mjstxOP2y ago
No description
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
mjstx
mjstxOP2y ago
how would i do that last part? lika a short example
0x150
0x1502y ago
vektoraddition wants an array of doubles, not a Vector instance
mjstx
mjstxOP2y ago
ah ok, so basically the array holds the values of the "vector". How did you discern thouth that they were talking about an array and not actualy vectors here? That still is a bit hazy to me
0x150
0x1502y ago
No description
0x150
0x1502y ago
the method accepts 2 double arrays and returns a double array with the sum of both double[] is the double array type -> an array of doubles int[] would be an array of ints
mjstx
mjstxOP2y ago
Ahh alright 👍 thanks!
JavaBot
JavaBot2y ago
If you are finished with your post, please close it. If you are not, please ignore this message. Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.
JavaBot
JavaBot2y ago
Post Closed
This post has been closed by <@290070433984806912>.
Want results from more Discord servers?
Add your server