Skip to content

Commit

Permalink
Fix list_domains(repo::IPCInstancesRepo) bug concerning missing -
Browse files Browse the repository at this point in the history
… after year (#5)

* Add test for loading domains retreieved with `list_domains(IPCInstancesRepo)`

* Fix `list_domains(repo::IPCInstancesRepo)` bug concerning missing `-` after year
  • Loading branch information
ReubenJ authored Dec 8, 2023
1 parent ccfb337 commit c8f8c47
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/ipc_instances_repo.jl
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ function list_collections(repo::IPCInstancesRepo)
end

function list_domains(repo::IPCInstancesRepo)
domains = reduce(vcat, (c .* list_domains(repo, c)
domains = reduce(vcat, (c * "-" .* list_domains(repo, c)
for c in list_collections(repo)))
return domains
end
Expand Down
3 changes: 3 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ using PlanningDomains: clear_cache!, clear_all_caches!
end

@testset "IPC Instances repository" begin
domain_names = list_domains(IPCInstancesRepo)
@test !isempty(domain_names)
domain = load_domain(IPCInstancesRepo, domain_names[1])
collection_names = list_collections(IPCInstancesRepo)
@test !isempty(collection_names)
domain_names = list_domains(IPCInstancesRepo)
Expand Down

0 comments on commit c8f8c47

Please sign in to comment.