<commit_before>package pdf

import "testing"

func TestTestFile (t *testing.T) {
	f := NewFile("/tmp/foo.pdf")
	f.Close()
}
<commit_msg>Add File.AddObject() and File.DeleteObject() to unit test.<commit_after>package pdf

import "testing"

func TestTestFile (t *testing.T) {
	f := NewFile("/tmp/foo.pdf")
	obj1 := f.AddObject (NewNumeric(3.14))
	obj2 := f.AddObject (NewNumeric(2.718))
	f.DeleteObject (obj1)
	f.AddObject (NewNumeric(3))
	f.DeleteObject (obj2)
	f.Close()
}

{'fraction_non_alphanumeric': 0.16913319238900634, 'fraction_numerical': 0.02536997885835095, 'mean_word_length': 4.780487804878049, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, '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': '7173104', 'n_tokens_mistral': 191, 'n_tokens_neox': 187, 'n_words': 40}