Skip to content

Commit 623aefa

Browse files
committed
Added tests.
1 parent 51f689e commit 623aefa

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

.github/workflows/ubuntu.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,4 @@ jobs:
2424
- name: Use make
2525
run: |
2626
make &&
27-
./build_filter -V -f xor8 -o filter.bin sample.txt &&
28-
./build_filter -V -f binaryfuse8 -o filter.bin sample.txt &&
29-
./build_filter -V -f binaryfuse16 -o filter.bin sample.txt &&
30-
./build_filter -V -f bloom12 -o filter.bin sample.txt
27+
make test

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,8 @@ query_filter: src/query_filter.cpp src/hexutil.h dependencies/xor_singleheader/
1010
build_filter: src/build_filter.cpp dependencies/fastfilter_cpp/src/xorfilter/xorfilter.h dependencies/fastfilter_cpp/src/xorfilter/xorfilter_plus.h src/hexutil.h dependencies/xor_singleheader/include/xorfilter.h
1111
c++ -O3 -o build_filter src/build_filter.cpp -std=c++11 -Wall -Idependencies/fastfilter_cpp/src -Idependencies
1212

13+
test: build_filter query_filter
14+
./build_filter -V -f xor8 -o filter.bin sample.txt && ./query_filter filter.bin 7C4A8D09CA3762AF | grep "Probably in the set" && ./build_filter -V -f binaryfuse8 -o filter.bin sample.txt && ./query_filter filter.bin 7C4A8D09CA3762AF | grep "Probably in the set" && ./build_filter -V -f binaryfuse16 -o filter.bin sample.txt && ./query_filter filter.bin 7C4A8D09CA3762AF | grep "Probably in the set" && ./build_filter -V -f bloom12 -o filter.bin sample.txt && ./query_filter filter.bin 7C4A8D09CA3762AF | grep "Probably in the set" && echo "SUCCESS" || (echo "Failure. There is a bug."| exit -1)
15+
1316
clean:
1417
rm -f build_filter query_filter

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ Processing time 58.000 microseconds.
8888
Expected number of queries per second: 17241.379
8989
```
9090
91+
After building the code with `make`, we recommend testing the code with `make test`.
9192
9293
9394
## Performance comparisons

0 commit comments

Comments
 (0)