Move GetBytesReadable to Core, add tests

This commit is contained in:
Matt Nadareski
2025-04-14 20:45:02 -04:00
parent 44f96e7ef0
commit d45f903d41
5 changed files with 86 additions and 59 deletions

View File

@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.IO;
using SabreTools.Core.Tools;
using SabreTools.DatFiles;
using SabreTools.DatItems;
using SabreTools.Hashing;
@@ -94,7 +95,7 @@ namespace SabreTools.Reports.Formats
{
string line = @"'" + stat.DisplayName + @"':
--------------------------------------------------
Uncompressed size: " + GetBytesReadable(stat!.TotalSize) + @"
Uncompressed size: " + NumberHelper.GetBytesReadable(stat!.TotalSize) + @"
Games found: " + stat.MachineCount + @"
Roms found: " + stat.GetItemCount(ItemType.Rom) + @"
Disks found: " + stat.GetItemCount(ItemType.Disk) + @"