diff options
Diffstat (limited to 'proofs/lfsc_checker/trie.cpp')
-rw-r--r-- | proofs/lfsc_checker/trie.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/proofs/lfsc_checker/trie.cpp b/proofs/lfsc_checker/trie.cpp new file mode 100644 index 000000000..fedb508b0 --- /dev/null +++ b/proofs/lfsc_checker/trie.cpp @@ -0,0 +1,24 @@ +#include "trie.h" +#include <iostream> + +class Simple : public Trie<int>::Cleaner { +public: + ~Simple() {} + void clean(int p) { + (void)p; + } +}; + +template <> +Trie<int>::Cleaner *Trie<int>::cleaner = new Simple; + +void unit_test_trie() { + Trie<int> t; + t.insert("a", 1); + t.insert("b", 2); + t.insert("abc", 3); + t.insert("b", 0); + std::cout << "a: " << t.get("a") << "\n"; + std::cout << "b: " << t.get("b") << "\n"; + std::cout << "abc: " << t.get("abc") << "\n"; +} |