Commit 01927f2f authored by yiwenshao's avatar yiwenshao

add test_search

parent 07ea0102
/*hgd is needed by OPE*/
#pragma once
#include <NTL/ZZ.h>
#include <crypto/prng.hh>
......
......@@ -8,6 +8,7 @@
#include <NTL/ZZ.h>
#include <crypto/bn.hh>
/*generate random somthing*/
class PRNG {
public:
template<class T>
......
#include <vector>
#include "util/errstream.hh"
#include "crypto/search.hh"
static void
test_search(){
search_priv s("my key");
auto cl = s.transform({"hello", "world", "hello", "testing", "test"});
throw_c(s.match(cl, s.wordkey("hello")));
throw_c(!s.match(cl, s.wordkey("Hello")));
throw_c(s.match(cl, s.wordkey("world")));
}
int main(){
test_search();
return 0;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment