pike.git / lib / modules / Calendar.pmod / testsuite.in

version» Context lines:

pike.git/lib/modules/Calendar.pmod/testsuite.in:1:   START_MARKER - dnl $Id: testsuite.in,v 1.23 2009/03/11 16:02:53 nilsson Exp $ + dnl $Id: testsuite.in,v 1.24 2009/08/19 10:54:27 grubba Exp $      dnl NOTE:   dnl *every* time the Calendar tests have failed, it's not the   dnl Calendar module that had any errors. Please don't commit   dnl your Pike until you've got Calendar to compile again. /Mirar      test_true(Calendar.Day())      test_eq([[Calendar.Austrian.Day(2500000)->month_day()]],31)   test_eq([[Calendar.Coptic.Day(2500000)->month_day()]],25);
pike.git/lib/modules/Calendar.pmod/testsuite.in:81:         dnl From verify.pike   define(test_WDIFF,[[   test_true( $1->week_no() == $2->week_no() )   test_true( $1->week() == $2->week() )   test_true( $1->week()->year() == $2->week()->year() )   ]])   define(test_day,[[   test_do([[ +  // werror("Testing day %O\n", $1);    sscanf($1,"%d-%d-%d %s %dw%d",    int y,int m,int d,string wd,int wy,int w);    add_constant("d1", Calendar.ISO.Day(y,m,d));    add_constant("d2", Calendar.ISO.dwim_day(y+"-"+m+"-"+d));    add_constant("d3", Calendar.ISO.Week(wy,w)->day(wd));   ]])   test_true( objectp(d1) )   test_true( objectp(d2) )   test_true( objectp(d3) )   test_true( d1==d2 )
pike.git/lib/modules/Calendar.pmod/testsuite.in:147:    return k->second(1)!=k->second(2);   ]], 1)      test_eq([[Calendar.ISO.Day (2007, 12, 31)->week()->month_day()]], 31);   test_any([[    object d = Calendar.ISO.Day (2007, 12, 01);    d->week_day();    return d->range (d)->week()->year_no();   ]], 2007)    + dnl From Xuesong Guo <peterpan@wukong.com> + test_eq([[((Calendar.dwim_day("20090501")+1)+1)]], +  [[(Calendar.dwim_day("20090501")+2)]]) +    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)      test_eq([[Calendar.ISO.Year(2007)->year()->year_no()]], 2007)   test_eq([[Calendar.ISO.Year(2007)->year(1)->year_no()]], 2007)   test_eq([[Calendar.ISO.Year(2007)->year(-1)->year_no()]], 2007)   test_eq([[Calendar.ISO.Year(2007)->set_size(2)->year()->year_no()]], 2007)   test_eq([[Calendar.ISO.Year(2007)->set_size(2)->year(1)->year_no()]], 2007)   test_eq([[Calendar.ISO.Year(2007)->set_size(2)->year(2)->year_no()]], 2008)