<commit_before>require 'helper'
require 'prover'

class TestCaching < MiniTest::Unit::TestCase

describe "Caching Behavior of Partial Labels" do
	before do
		@prover = Prover.new(5,10,8)
	end

	describe "Prover should have empty partial label storage" do
		# @prover.partial_labels.wont_be_nil
	end

end # main describe

end # TestCaching<commit_msg>Basic tests for caching partial labels<commit_after>require 'helper'
require 'prover'

class TestCaching < MiniTest::Unit::TestCase

describe "Caching Behavior of Partial Labels" do
	before do
		@prover = Prover.new(5,10,8)
	end

	describe "Default Instantiation" do
		def test_partial_label_storage_exists
			@prover.partial_labels.wont_be_nil
		end

		def test_partial_label_storage_is_empty
			@prover.partial_labels.empty?
		end
	end # Default Instantiation

	describe "Calculating New Partial Labels" do
		def test_new_partial_labels_are_added_to_storage
			storage = @prover.partial_labels
			assert( storage.empty? )

			random_element = rand(@prover.universe_size_m)

			calculated_elements = @prover.get_update_path( @prover.get_leaf_index(random_element) )

			@prover.addElement( random_element )

			calculated_elements.each do |ele|
				assert( storage.include? ele )
			end


		end

	end # describe

end # main describe

end # TestCaching
{'fraction_non_alphanumeric': 0.07450076804915515, 'fraction_numerical': 0.006144393241167435, 'mean_word_length': 4.949771689497717, 'pattern_counts': {'":': 0, '<': 5, '<?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': '2318027', 'n_tokens_mistral': 480, 'n_tokens_neox': 424, 'n_words': 107}