[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Unit-Test fails


I prepared a unit-test for a Julian Day algorithm, where I compare the result with a reference value out of a book: Assert.Equals(JulianDay(Date(-1001, 8, 17, 21, 36, 0), 0), 1355671.4, "JD to be 1355671.4 on the 17.08.-1001 21:36:00 UTC")
The test fails with following output in the IDE-console:

not ok 14 - TestExamples.HJulianDate.121: JD to be 1355671.4 on the 17.08.-1001 21:36:00 UTC
  #
  # ------------- Expected -------------
  # 1355671.4
  #
  # ---------------- Got ---------------
  # 1355671.4
  # ------------------------------------
  #

Why is that? How can an Equals-test fail, when the displayed comparison values are obviously equal?

13 other unit tests of the same kind are OK.
Best regards
Claus


Follow-Ups:
Re: Unit-Test failsT Lee Davidson <t.lee.davidson@xxxxxxxxx>