From e745f9df494eeb613a88a380fffa6ed319425c83 Mon Sep 17 00:00:00 2001 From: Nicolae Filat Date: Mon, 13 May 2024 12:48:12 +0200 Subject: [PATCH] Remove unused tests --- test/test_probe.jl | 64 ---------------------------------------------- 1 file changed, 64 deletions(-) diff --git a/test/test_probe.jl b/test/test_probe.jl index 7b10e4b..a9e8a7c 100644 --- a/test/test_probe.jl +++ b/test/test_probe.jl @@ -235,68 +235,4 @@ end @test output == received end end - # TODO: Refactor tests using probe function call - # function get_bank_and_runtime(examples, level_limit) - # # crate the probe iterator - # iterator = ProbeSearchIterator(grammar, :S, examples, mean_squared_error, level_limit = level_limit) - # # run iterator - # timer = @timed program, state = Base.iterate(iterator) - # bank = state.bank - # # inspect the bank's length for each size - # bank_lengths = [length(list_of_programs) for list_of_programs ∈ bank] - # @show bank_lengths - # return bank_lengths, program, timer.time - # end - - # @testset "Probe finds solution using enumeration in terms of probability" begin - - # examples_1_2_3 = [ - # IOExample(Dict(:arg => "a < 4 and a > 0"), "a 4 and a 0") # <- e0 with correct space - # # IOExample(Dict(:arg => "a < 4 and a > 0"), "a 4 and a 0") # <- e0 with incorrect space - # IOExample(Dict(:arg => ""), "open and close") # <- e1 - # IOExample(Dict(:arg => " to number"), "Change string to a number") - # ] - - - # bank, program, runtime = get_bank_and_runtime(examples_1_2_3, 38) - # @testset "Correct lengths" begin - # # Figure 9 from research paper (Bank index is offset by one because of julia indexing) - # @test bank[3] == 4 - # @test bank[9] == 15 - # @test bank[21] == 1272 - # end - - # @testset "Correct output and runtime" begin - - # @test !isnothing(program) # we found a solution - # @test runtime <= 5 - # end - # end - # @testset "Probe works when using sized based enumeration" begin - # examples_1_2 = [ - # # IOExample(Dict(:arg => "a < 4 and a > 0"), "a 4 and a 0") # <- e0 with correct space - # IOExample(Dict(:arg => "a < 4 and a > 0"), "a 4 and a 0") # <- e0 with incorrect space - # IOExample(Dict(:arg => ""), "open and close") # <- e1 - # ] - - # bank_lengths, program, runtime, = get_bank_and_runtime(examples_1_2, 10) - - # @testset "Correct lengths" begin - # # sized based assertions taken from the Probe Research paper Figure 7. - # println(bank_lengths) - # @test bank_lengths[1:5] == [0,4,0,9,6] - # @test bank_lengths[9:11] == [349,714,2048] - # end - - # #= Test the following claim for the research paper when using sized based enumeration - # "This - # modest change to the search algorithm yields surprising efficiency improvements: our size-based - # bottom-up synthesizer is able to solve the remove-angles-short benchmark in only one second" - # =# - # @testset "Correct output and runtime" begin - # # @test runtime <= 1 - # # @test !isnothing(program) # we found a solution - # end - # end - end \ No newline at end of file