Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 21 lines (16 sloc) 0.421 kB
595e9f0 @wmorgan rejigger tests to use /tmp and add many_key_test
authored
1 #!/usr/bin/env ruby
2
3 require 'test/unit'
4 require File.expand_path("../../lib/leveldb", __FILE__)
5 require 'fileutils'
6
7 class ManyKeyTest < Test::Unit::TestCase
8 DB_PATH = "/tmp/manykey.db"
9
10 def initialize(*a)
11 super
12 FileUtils.rm_rf DB_PATH
13 @db = LevelDB::DB.new DB_PATH
14 end
15
16 def test_get
17 100_000.times { |x| @db.put x.to_s, "abcdefghijklmnopqrstuvwxyz" }
18 assert_equal 100_000, @db.size
19 end
20 end
Something went wrong with that request. Please try again.