File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -184,6 +184,18 @@ TEST(IECStrToLL, WithUnits) {
184184 units[" Ti" ] = 40 ;
185185 units[" Pi" ] = 50 ;
186186 units[" Ei" ] = 60 ;
187+ units[" KB" ] = 10 ;
188+ units[" MB" ] = 20 ;
189+ units[" GB" ] = 30 ;
190+ units[" TB" ] = 40 ;
191+ units[" PB" ] = 50 ;
192+ units[" EB" ] = 60 ;
193+ units[" KiB" ] = 10 ;
194+ units[" MiB" ] = 20 ;
195+ units[" GiB" ] = 30 ;
196+ units[" TiB" ] = 40 ;
197+ units[" PiB" ] = 50 ;
198+ units[" EiB" ] = 60 ;
187199
188200 for (std::map<std::string,int >::iterator p = units.begin ();
189201 p != units.end (); ++p) {
@@ -257,6 +269,21 @@ TEST(StrictIECCast, Error) {
257269 (void )strict_iec_cast<int >(" 1T" , &err);
258270 ASSERT_NE (err, " " );
259271 }
272+ {
273+ std::string err;
274+ (void )strict_iec_cast<int64_t >(" 1GT" , &err);
275+ ASSERT_NE (err, " " );
276+ }
277+ {
278+ std::string err;
279+ (void )strict_iec_cast<int64_t >(" 1TG" , &err);
280+ ASSERT_NE (err, " " );
281+ }
282+ {
283+ std::string err;
284+ (void )strict_iec_cast<int64_t >(" 1KD" , &err);
285+ ASSERT_NE (err, " " );
286+ }
260287 {
261288 std::string err;
262289 (void )strict_iec_cast<int64_t >(" 2E" , &err);
You can’t perform that action at this time.
0 commit comments