#Don't understand test output

19 messages · Page 1 of 1 (latest)

late tundra
#

Im making a class that has to pass some tests, and im currently doing two tests that makes no sense they pass and I wonder why
Like the defined date is 2/1/2017, and comparing it with day 1 gives true, when it should give false and at the same time when comparing 2 with 7 gives false

steep bronzeBOT
#

This post has been reserved for your question.

Hey @late tundra! Please use /close or the Close Post button above when your problem is solved. 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.

eternal cosmos
#

Maybe your other constructor is wrong

#

It's weird how you're trying to show as little as possible so we couldn't possibly have information that would be relevant to what's happening to you

late tundra
#

like i think thats everything that should be interacting with the test

late tundra
eternal cosmos
#

The one with 3 params. Also possibly whatever you use to get variable today

eternal cosmos
late tundra
eternal cosmos
#

Okay, so.... I guess it's not wrong, so much as you don't understand constructors?

#

You're saying the defined date is 2/1/2017. Why are you saying that? Where is the date defined as that?

late tundra
#

nvm i saw the problem, sorry for bothering

#

i thought that the constructor Date() with the 3 params was the one i was using to compare, but thats one for a different test

#

i noticed the one i was using was the today

#

that was defined