From c74367d82c1c7bec393548d2e5014c794333822f Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Tue, 16 Oct 2018 17:25:40 +0200 Subject: urlfilter: Add FilterTree class FilterTree is a class that holds filter rules, sorted by the domain they are to be applied on. The rules are to follow FilterLeaf as interface. - Add a hostlist rule format to FilterTree. - Add a test for hostlist format. --- test/CMakeLists.txt | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'test/CMakeLists.txt') diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 4302ab2..6b740d7 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -3,10 +3,19 @@ set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) add_executable(AdBlockTest - urlfilter/adblocktest.cpp - urlfilter/adblocktest.h + adblock/adblocktest.cpp + adblock/adblocktest.h ) target_include_directories(AdBlockTest PRIVATE ../lib/urlfilter) - target_link_libraries(AdBlockTest Qt5::Test urlfilter) + +add_executable(HostlistTest + hostlist/hostlisttest.cpp + hostlist/hostlisttest.h +) +target_include_directories(HostlistTest PRIVATE ../lib/urlfilter/) +target_link_libraries(HostlistTest Qt5::Test urlfilter) + +add_test(NAME urlfilter-adblock COMMAND AdBlockTest WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}) +add_test(NAME urlfilter-hostlist COMMAND HostlistTest WORKING_DIRECTORY ${CMAKE_CURRENT_LIST_DIR}) -- cgit v1.2.1