[lttng-dev] Regarding Bug #633 - utils_parse_size_suffix suffers from several problems
Thibault, Daniel
Daniel.Thibault at drdc-rddc.gc.ca
Wed Apr 9 09:42:39 EDT 2014
----------------------------------------------------------------------
Date: Tue, 8 Apr 2014 22:09:36 -0700
From: Sandeep K Chaudhary <babbusandy2006 at gmail.com>
To: David Goulet <dgoulet at efficios.com>
Cc: "lttng-dev at lists.lttng.org" <lttng-dev at lists.lttng.org>
> Here is the diff for changes made to the unit test. Please have a look.
----------------------------------------------------------------------
I would suggest these additional valid and invalid test cases:
Valid:
{ "00", 0 },
{ "0k", 0 },
{ "0K", 0 },
{ "0M", 0 },
{ "0G", 0 },
{ "00k", 0 },
{ "00K", 0 },
{ "00M", 0 },
{ "00G", 0 },
{ "0x0", 0 },
{ "0X0", 0 },
{ "0x0k", 0 },
{ "0X0K", 0 },
{ "0x0M", 0 },
{ "0X0G", 0 },
{ "0x40C", 1036 },
{ "0X40D", 1037 },
{ "0X40G", 68719476736 },
{ "0300k", 196608 },
{ "0300K", 196608 },
{ "030M", 25165824 },
{ "020G", 17179869184 },
{ "0xa0k", 163840 },
{ "0xa0K", 163840 },
{ "0XA0M", 167772160 },
{ "0xA0G", 171798691840 },
Invalid:
" ", "x0", "0xx0", "07kK", "0xk", "0XM", "0xG", "0x0MM", "0X0GG", "0a", "0B"
Daniel U. Thibault
Protection des systèmes et contremesures (PSC) | Systems Protection & Countermeasures (SPC)
Cyber sécurité pour les missions essentielles (CME) | Mission Critical Cyber Security (MCCS)
R & D pour la défense Canada - Valcartier (RDDC Valcartier) | Defence R&D Canada - Valcartier (DRDC Valcartier)
2459 route de la Bravoure
Québec QC G3J 1X5
CANADA
Vox : (418) 844-4000 x4245
Fax : (418) 844-4538
NAC : 918V QSDJ <http://www.travelgis.com/map.asp?addr=918V%20QSDJ>
Gouvernement du Canada | Government of Canada
<http://www.valcartier.drdc-rddc.gc.ca/>
More information about the lttng-dev
mailing list