<commit_before>package bytesize

import (
	"testing"
)

func Test_Overflow(t *testing.T) {
	b, err := Parse("1797693134862315708145274237317043567981000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000B")
	if err == nil || b != 0 {
		t.Fatal("Max float64 test did not fail")
	}
}

var formatTable = []struct {
	Bytes  float64
	Format string
	Result string
}{
	{1, "byte", "1 B"},
	{1024, "kb", "1 KB"},
	{1099511627776, "GB", "1024 GB"},
	{1125899906842624, "GB", "1048576 GB"},
}

func Test_Format(t *testing.T) {
	for _, v := range formatTable {<commit_msg>Add test for failed Format() unit<commit_after>package bytesize

import (
	"testing"
)

func Test_Overflow(t *testing.T) {
	b, err := Parse("1797693134862315708145274237317043567981000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000B")
	if err == nil || b != 0 {
		t.Fatal("Max float64 test did not fail")
	}
}

var formatTable = []struct {
	Bytes  float64
	Format string
	Result string
}{
	{1, "byte", "1 B"},
	{1024, "kb", "1 KB"},
	{1099511627776, "GB", "1024 GB"},
	{1125899906842624, "GB", "1048576 GB"},
	{1125899906842624, "potato", "Unrecognized unit: potato"},
}

func Test_Format(t *testing.T) {
	for _, v := range formatTable {
{'fraction_non_alphanumeric': 0.11138310893512852, 'fraction_numerical': 0.4528763769889841, 'mean_word_length': 7.341836734693878, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4288568', 'n_tokens_mistral': 1100, 'n_tokens_neox': 456, 'n_words': 116}