Branch: Tag:

2010-12-20

2010-12-20 12:13:54 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Calendar: Fix evaluation order for `+().

Thanks to Marc Dirix <marc@dirix.nu> for the testcase.

1:   START_MARKER - dnl $Id: testsuite.in,v 1.25 2010/03/02 11:51:09 grubba Exp $ + dnl $Id$      dnl NOTE:   dnl *every* time the Calendar tests have failed, it's not the
159:   test_eq([[((Calendar.dwim_day("20090501")+1)+1)]],    [[(Calendar.dwim_day("20090501")+2)]])    + dnl From Marc Dirix <marc@dirix.nu> + test_any([[ +  object d = Calendar.Day(); +  object m = Calendar.Minute()*60; +  object r = d + d; +  return (r + m)->minute(); + ]], [[ (Calendar.Day() + Calendar.Day() + Calendar.Minute()*60)->minute() ]]) +    test_eq([[(Calendar.ISO.Week (2007, 52) + 1)->year_no()]], 2008)      test_eq([[Calendar.ISO.Week (2007, 1)->distance (Calendar.ISO.Week (2008, 1))->number_of_weeks()]], 52)