Sha256: c97bec9dfb02ba8a02287ed07ba86dd9dd6aef08129814c1ff032e86544ff787
Contents?: true
Size: 543 Bytes
Versions: 15
Compression:
Stored size: 543 Bytes
Contents
require "#{File.dirname(__FILE__)}/../lib/gitrb" require 'pp' describe Gitrb::Trie do it "should add children" do trie = Gitrb::Trie.new 0.upto(100) do |i| trie.insert('a' * i, i) end trie.find('').key.should == '' trie.find('').value.should == 0 1.upto(100) do |i| trie.find('a' * i).key.should == 'a' trie.find('a' * i).value.should == i end end it "should split node" do trie = Gitrb::Trie.new trie.insert("abc", 1) trie.insert("ab", 2) trie.insert("ac", 3) end end
Version data entries
15 entries across 15 versions & 1 rubygems