Example #1
0
    void test_DMconstants(){
        Julian jDate;
        Gregorian gDate;

        for(int i = 0;i<100;i++){
            jDate.add_year(1);
            gDate.add_year(1);
            TS_ASSERT_EQUALS(jDate.month_this_year(),12);
            TS_ASSERT_EQUALS(gDate.month_this_year(),12);
        }
        for(int i = 0;i<100;i++){
            jDate += 5;
            gDate += 5;
            TS_ASSERT_EQUALS(jDate.days_per_week(),7);
            TS_ASSERT_EQUALS(gDate.days_per_week(),7);
        }
    }