Commit Graph
8 Commits
Author SHA1 Message Date
Tom Tromey efe063d40a Bug 1334276 - add Printf unit tests; r=froydnj
Add unit tests for Printf.  Code coverage now at 90%.  Doing better is
difficult due to the large number of assertions and failure cases, and
because some remaining untested code implements behavior undefined by
the spec, for example "%0s".

MozReview-Commit-ID: FenOur7bOt2
2017-05-08 13:49:48 -06:00
Tom Tromey 9bf3f9e7e5 Bug 1334276 - remove dead code from Printf.cpp; r=froydnj
This removes some "#if 0"s, and some related code that is also obviously
dead.

MozReview-Commit-ID: 1vEPohvdpw8
2017-05-08 11:05:27 -06:00
Tom Tromey 9f8218f3dd Bug 1350097 - handle very long floating point output in cvt_f; r=froydnj
Bug 1350097 points out a case where the assertion in cvt_f, added in
https://bugzilla.mozilla.org/show_bug.cgi?id=1060419#c127, triggers.
Before this addition, code calling this printf variant would end up just
printing something invalid, as the truncated value would be emitted.
This patch increases the buffer size to be sufficient for DBL_MAX.

MozReview-Commit-ID: AVphURGa6jL
2017-03-24 08:18:51 -06:00
Tom Ritter b9ad25b1e6 Bug 1344809 Move function definition to cpp to fix mingw 'definition is marked dllimport' error r=froydnj
MozReview-Commit-ID: 8iAaa3FXvDq
2017-03-13 11:51:10 -05:00
Tom Tromey b003a546ae Bug 1341880 - do not emit trailing \0 in PrintfState; r=glandium
MozReview-Commit-ID: 2di7CsDCWLF
2017-02-27 13:29:54 -07:00
Tom Tromey 88962ee4cb Bug 1060419 - use result of SprintfLiteral in Printf.cpp; r=froydnj
MozReview-Commit-ID: HSHAeKVu6PU
2017-01-05 08:15:48 -07:00
Tom Tromey 45573b7188 Bug 1060419 - add %S and %ls support to Smprintf; r=froydnj
MozReview-Commit-ID: CQMZCkCOXDV
2017-01-19 15:56:09 -07:00
Tom Tromey ce453db158 Bug 1060419 - move Smprintf et al to mozglue, r=froydnj
MozReview-Commit-ID: 4U23r6JhLls
2017-01-13 10:25:59 -07:00