Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(111)

Issue 15521004: add more string -> unsigned number conversion unit tests (attempt 2) (Closed)

Created:
7 years, 7 months ago by Mostyn Bramley-Moore
Modified:
7 years, 6 months ago
CC:
chromium-reviews, erikwright+watch_chromium.org, jshin+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

add more string -> unsigned number conversion unit tests (attempt 2) Add unit tests for the following functions in base: StringToUint StringToUint64 StringToSizeT Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=206031

Patch Set 1 #

Patch Set 2 : attempt to fix "Google Chrome Linux" failure #

Total comments: 4

Patch Set 3 : test max value of size_t in StringToSizeT #

Patch Set 4 : use std::log10 instead of C log10 #

Patch Set 5 : avoid ambiguous call to overloaded log10 on windows #

Patch Set 6 : #

Patch Set 7 : rebase on master #

Patch Set 8 : allocate variable length test string on the heap #

Patch Set 9 : use base::snprintf since snprintf isn't available on windows #

Patch Set 10 : use %Iu for size_t on windows #

Patch Set 11 : use base/format_macros.h for a cross-platform size_t printf specifier #

Total comments: 2

Patch Set 12 : use StringPrintf instead of snprintf #

Patch Set 13 : remove std::string -> char * -> std::string roundtrip #

Unified diffs Side-by-side diffs Delta from patch set Stats (+206 lines, -1 line) Patch
M base/strings/string_number_conversions_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +206 lines, -1 line 0 comments Download

Messages

Total messages: 25 (0 generated)
Mostyn Bramley-Moore
This was committed in https://chromiumcodereview.appspot.com/14794002/ and reverted in https://codereview.chromium.org/15464016/ The first patchset is the originally ...
7 years, 7 months ago (2013-05-21 06:01:00 UTC) #1
Mostyn Bramley-Moore
The linux_rel_precise32 try job passed- I assume this is the closest to the "Google Chrome ...
7 years, 7 months ago (2013-05-21 12:45:58 UTC) #2
Vitaly Buka (NO REVIEWS)
So the only difference with reverted one is GG_INT64_C -> GG_UINT64_C lgtm, but I am ...
7 years, 7 months ago (2013-05-21 18:54:34 UTC) #3
Mostyn Bramley-Moore
On 2013/05/21 18:54:34, Vitaly Buka wrote: > So the only difference with reverted one is ...
7 years, 7 months ago (2013-05-21 19:00:25 UTC) #4
Mostyn Bramley-Moore
@jar: are you able to review this? Patchset 1 was committed in https://chromiumcodereview.appspot.com/14794002/ and then ...
7 years, 7 months ago (2013-05-23 23:29:12 UTC) #5
Mostyn Bramley-Moore
Ping. Brettw, jar: does this updated patch look OK?
7 years, 6 months ago (2013-06-04 21:51:50 UTC) #6
jar (doing other things)
LGTM with one nit below. https://codereview.chromium.org/15521004/diff/2001/base/strings/string_number_conversions_unittest.cc File base/strings/string_number_conversions_unittest.cc (right): https://codereview.chromium.org/15521004/diff/2001/base/strings/string_number_conversions_unittest.cc#newcode372 base/strings/string_number_conversions_unittest.cc:372: {"999999999999999999999999", std::numeric_limits<size_t>::max(), false}, nit: ...
7 years, 6 months ago (2013-06-04 22:15:46 UTC) #7
Mostyn Bramley-Moore
https://codereview.chromium.org/15521004/diff/2001/base/strings/string_number_conversions_unittest.cc File base/strings/string_number_conversions_unittest.cc (right): https://codereview.chromium.org/15521004/diff/2001/base/strings/string_number_conversions_unittest.cc#newcode372 base/strings/string_number_conversions_unittest.cc:372: {"999999999999999999999999", std::numeric_limits<size_t>::max(), false}, On 2013/06/04 22:15:46, jar wrote: > ...
7 years, 6 months ago (2013-06-04 23:08:56 UTC) #8
jar (doing other things)
https://codereview.chromium.org/15521004/diff/2001/base/strings/string_number_conversions_unittest.cc File base/strings/string_number_conversions_unittest.cc (right): https://codereview.chromium.org/15521004/diff/2001/base/strings/string_number_conversions_unittest.cc#newcode372 base/strings/string_number_conversions_unittest.cc:372: {"999999999999999999999999", std::numeric_limits<size_t>::max(), false}, On 2013/06/04 23:08:56, Mostyn Bramley-Moore wrote: ...
7 years, 6 months ago (2013-06-04 23:46:16 UTC) #9
Mostyn Bramley-Moore
https://codereview.chromium.org/15521004/diff/2001/base/strings/string_number_conversions_unittest.cc File base/strings/string_number_conversions_unittest.cc (right): https://codereview.chromium.org/15521004/diff/2001/base/strings/string_number_conversions_unittest.cc#newcode372 base/strings/string_number_conversions_unittest.cc:372: {"999999999999999999999999", std::numeric_limits<size_t>::max(), false}, On 2013/06/04 23:46:16, jar wrote: > ...
7 years, 6 months ago (2013-06-05 14:55:00 UTC) #10
jar (doing other things)
lgtm
7 years, 6 months ago (2013-06-06 16:00:00 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mostynb@opera.com/15521004/13001
7 years, 6 months ago (2013-06-06 20:52:21 UTC) #12
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 6 months ago (2013-06-06 21:18:59 UTC) #13
Mostyn Bramley-Moore
I don't have android toolchains setup locally, but I think switching from C log10 to ...
7 years, 6 months ago (2013-06-06 21:32:41 UTC) #14
jar (doing other things)
On 2013/06/06 21:32:41, Mostyn Bramley-Moore wrote: > I don't have android toolchains setup locally, but ...
7 years, 6 months ago (2013-06-10 03:45:49 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mostynb@opera.com/15521004/21002
7 years, 6 months ago (2013-06-10 06:27:37 UTC) #16
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 6 months ago (2013-06-10 06:43:13 UTC) #17
Mostyn Bramley-Moore
Patchset 5 should avoid the ambiguous overloaded call. Does this look OK to resubmit (I ...
7 years, 6 months ago (2013-06-10 06:50:01 UTC) #18
Mostyn Bramley-Moore
@jar: after some messing around (I don't have easy access to a windows development machine), ...
7 years, 6 months ago (2013-06-11 06:32:49 UTC) #19
jar (doing other things)
nit below... still LGTM https://codereview.chromium.org/15521004/diff/74002/base/strings/string_number_conversions_unittest.cc File base/strings/string_number_conversions_unittest.cc (right): https://codereview.chromium.org/15521004/diff/74002/base/strings/string_number_conversions_unittest.cc#newcode346 base/strings/string_number_conversions_unittest.cc:346: base::snprintf(size_t_max_cstr, cstr_len, "%" PRIuS, size_t_max); ...
7 years, 6 months ago (2013-06-12 18:24:27 UTC) #20
Mostyn Bramley-Moore
https://codereview.chromium.org/15521004/diff/74002/base/strings/string_number_conversions_unittest.cc File base/strings/string_number_conversions_unittest.cc (right): https://codereview.chromium.org/15521004/diff/74002/base/strings/string_number_conversions_unittest.cc#newcode346 base/strings/string_number_conversions_unittest.cc:346: base::snprintf(size_t_max_cstr, cstr_len, "%" PRIuS, size_t_max); On 2013/06/12 18:24:27, jar ...
7 years, 6 months ago (2013-06-12 20:29:16 UTC) #21
Mostyn Bramley-Moore
Hmm, and we don't need c_str() - the input is std::string already.
7 years, 6 months ago (2013-06-12 20:33:53 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mostynb@opera.com/15521004/96001
7 years, 6 months ago (2013-06-12 21:33:57 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/mostynb@opera.com/15521004/96001
7 years, 6 months ago (2013-06-13 02:27:37 UTC) #24
commit-bot: I haz the power
7 years, 6 months ago (2013-06-13 09:04:39 UTC) #25
Message was sent while issue was closed.
Change committed as 206031

Powered by Google App Engine
This is Rietveld 408576698