<< | Index | >>
Failures and errors happens.
1) Failure: test_update_swissmedicjournal(ODDB::TestUpdater) [/home/masa/ywesee/oddb.org/test/test_util/updater.rb:548]: <Tue, 29 Mar 2011> expected but was <Mon, 28 Mar 2011>. 2) Failure: test_invoice_date_fachinfo(TestCompany) [/home/masa/ywesee/oddb.org/test/test_model/company.rb:133]: <#<Date: 4911973/2,0,2299161>> expected but was <#<Date: 4911971/2,0,2299161>>. 3) Failure: test_invoice_date_index(TestCompany) [/home/masa/ywesee/oddb.org/test/test_model/company.rb:142]: <#<Date: 4911973/2,0,2299161>> expected but was <#<Date: 4911971/2,0,2299161>>. 4) Failure: test_invoice_date_lookandfeel(TestCompany) [/home/masa/ywesee/oddb.org/test/test_model/company.rb:151]: <#<Date: 4911973/2,0,2299161>> expected but was <#<Date: 4911971/2,0,2299161>>. 5) Failure: test_invoice_date_patinfo(TestCompany) [/home/masa/ywesee/oddb.org/test/test_model/company.rb:124]: <#<Date: 4911973/2,0,2299161>> expected but was <#<Date: 4911971/2,0,2299161>>. 6) Failure: test_recent_items(ODDB::TestPatinfoInvoicer) [/home/masa/ywesee/oddb.org/test/test_plugin/patinfo_invoicer.rb:183]: <1> expected but was <2>.
Hypothesis
Test
require 'date' date = Date.new(2008,2,29) def _yearly_repetition(date) if(date) while(date < Date.today) date = date >> 12 end date end end print 'date.leap? = ', date.leap?, "\n" print 'date.to_s = ', date.to_s, "\n" print '(date >> 12).to_s = ', (date >> 12).to_s, "\n" print '_yearly_repetition(date).to_s = ', _yearly_repetition(date).to_s, "\n"
Result
date.leap? = true date.to_s = 2008-02-29 (date >> 12).to_s = 2009-02-28 _yearly_repetition(date).to_s = 2012-02-28
Test2
date = Date.new(2011,3,29) date = date << 1 date = date >> 12 p date.to_s date = Date.new(2011,3,29) date = date >> 11 p date.to_s
Result
"2012-02-28" "2012-02-29"
Test3
date = Date.new(2011,3,31) date = date >> 1 p date.to_s date = Date.new(2011,3,30) date = date >> 1 p date.to_s
Result
"2011-04-30" "2011-04-30"
Note
Commit
Total coverage: 78.94%
Commit