Add support for long long and more tests for unsigned long long. https://github.com/vitaut/format/issues/9

This commit is contained in:
Victor Zverovich
2013-11-22 07:45:43 -08:00
parent a4e72b4db2
commit 56f12b737c
3 changed files with 78 additions and 2 deletions
+8
View File
@@ -537,6 +537,11 @@ void fmt::BasicFormatter<Char>::DoFormat() {
case ULONG:
value = precision_arg.ulong_value;
break;
case LONG_LONG:
if (precision_arg.long_long_value < 0)
ReportError(s, "negative precision in format");
value = precision_arg.long_long_value;
break;
case ULONG_LONG:
value = precision_arg.ulong_long_value;
break;
@@ -581,6 +586,9 @@ void fmt::BasicFormatter<Char>::DoFormat() {
case ULONG:
writer.FormatInt(arg.ulong_value, spec);
break;
case LONG_LONG:
writer.FormatInt(arg.long_long_value, spec);
break;
case ULONG_LONG:
writer.FormatInt(arg.ulong_long_value, spec);
break;