pdf-devel
[Top][All Lists]
Advanced

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

[pdf-devel] pdf-time new tests and bugfixes


From: Łukasz Spintzyk
Subject: [pdf-devel] pdf-time new tests and bugfixes
Date: Tue, 16 Jun 2009 11:23:35 +0200

Hi

I am sending another portion of tests for pdf-time module.
In file pdf-time-new-tests.tar.gz are files with new tests.
pdf-time-tests.patch fixes some errors reported by Brad Hards (Thanks)

pdf-time.patch  fixes bugs in src/base/pdf-time.c and src/base/pdf-time-string.c so failing tests pass now.
That changes are:
Bug fixes in pdf_time.c :


pdf_time_calendar_add_months:
         line 288 "-" -> "+" fixed

pdf_time_get_cal:
        for 1259625600 seconds returned pdf_time_t was "1970-11-31", schould be "1970-12-01" --> fixed in pdf_time.c lines 242-251

pdf_time_span_from_cal_span:
         lines 1152 and 1158  Was pdf_time_destroy(base_time) schould be pdf_time_destroy(new_time) -->  fixed

pdf_time_add_cal_span_with_base:
         line 1211 and 1287 The same condition in if()
         (pdf_time_span_from_cal_span(&span_time_2, p_span2, base_time) == PDF_OK) -->
                                                                 (pdf_time_span_from_cal_span(&span_time_1, p_span1, base_time)
        -->fixed

pdf_time_callendar_add_days:
         lines 352-366 Function substracts good now. --> fixed



Bug fixes in pdf_time-string.c :

pdf_time_to_string_iso8601:
         line 847 offset_minutes was expressed in seconds --> fixed
pdf_time_to_string_pdf:
         line 675 offset_minutes was expressed in seconds --> fixed
pdf_time_to_string_generalized_asn1:
         line 796 offset_minutes was expressed in seconds --> fixed

Currently there are two failing tests
base/time/pdf-time-from-string.c:471:F:pdf_time_from_string:pdf_time_from_string_006:0: Failure 'status != PDF_OK' occured
base/time/pdf-time-span-negate.c:113:F:pdf_time_span_negate:pdf_time_span_negate_003:0: Failure 'status != PDF_ERROR' occured

First of them is problem with trailing apostrophe, problem is fixed in another thread.
And second problem is passing Null pointers as parameters to some functions of pdf_time module. In my opinion it is pointless bacause if someone forget to create object then it is not initialized to NULL so it isn't any protection of uninitialized variables.


Patch pdf-types.patch fixes bug in pdf-i64-div and pdf-i64-mod. Bad type of m variable casued a overload error in for loop.
Error accured when we dividing 1/86400
pdf_i64_mod:
line 836 pdf_u32_t m -> pdf_i32_t m
pdf_i64_div line570 pdf_u32_t m -> pdf_i32_t m  fixed


BTW I have sended a pdf-stm-flush test 6 February 2009. It isn't applyed yet.
You were waiting for my papers, and in result you forgot to commit it.

That is all :)
Thanks
Łukasz Spintzyk

Attachment: pdf-time-tests.patch
Description: Text Data

Attachment: pdf-time-new-tests.tar.gz
Description: GNU Zip compressed data

Attachment: pdf-time.patch
Description: Text Data

Attachment: pdf-types.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]