summaryrefslogtreecommitdiff
path: root/proofs/lfsc_checker/trie.cpp
blob: fedb508b0c8cdb9e5eb0cedb9a75d81bc46d498e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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";
}
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback