rroonga 1.0.8 → 1.0.9
Sign up to get free protection for your applications and to get access to all the features.
- data/NEWS.ja.rdoc +47 -0
- data/NEWS.rdoc +48 -0
- data/README.ja.rdoc +1 -0
- data/README.rdoc +1 -0
- data/Rakefile +32 -13
- data/benchmark/create-wikipedia-database.rb +212 -0
- data/benchmark/repeat-load.rb +213 -0
- data/benchmark/select.rb +1052 -0
- data/ext/groonga/mkmf.log +99 -0
- data/ext/groonga/rb-grn-column.c +57 -6
- data/ext/groonga/rb-grn-context.c +15 -9
- data/ext/groonga/rb-grn-expression.c +7 -7
- data/ext/groonga/{rb-grn-operation.c → rb-grn-operator.c} +89 -87
- data/ext/groonga/rb-grn-patricia-trie.c +5 -5
- data/ext/groonga/rb-grn-query.c +4 -4
- data/ext/groonga/rb-grn-table.c +16 -19
- data/ext/groonga/rb-grn.h +3 -3
- data/ext/groonga/rb-groonga.c +1 -1
- data/html/index.html +4 -4
- data/lib/groonga/context.rb +34 -0
- data/lib/groonga/expression-builder.rb +34 -2
- data/lib/groonga/record.rb +8 -6
- data/lib/groonga/schema.rb +40 -4
- data/rroonga-build.rb +2 -2
- data/test-unit/Rakefile +5 -18
- data/test-unit/html/classic.html +15 -0
- data/test-unit/html/index.html +13 -235
- data/test-unit/html/index.html.ja +15 -258
- data/test-unit/lib/test/unit.rb +1 -6
- data/test-unit/lib/test/unit/assertions.rb +11 -115
- data/test-unit/lib/test/unit/autorunner.rb +2 -5
- data/test-unit/lib/test/unit/collector/load.rb +1 -1
- data/test-unit/lib/test/unit/color-scheme.rb +2 -6
- data/test-unit/lib/test/unit/diff.rb +1 -17
- data/test-unit/lib/test/unit/testcase.rb +0 -7
- data/test-unit/lib/test/unit/testresult.rb +2 -34
- data/test-unit/lib/test/unit/ui/console/testrunner.rb +45 -9
- data/test-unit/lib/test/unit/ui/tap/testrunner.rb +12 -2
- data/test-unit/lib/test/unit/ui/testrunner.rb +0 -25
- data/test-unit/lib/test/unit/util/backtracefilter.rb +0 -1
- data/test-unit/lib/test/unit/version.rb +1 -1
- data/test-unit/test/test-color-scheme.rb +2 -4
- data/test-unit/test/test_assertions.rb +5 -51
- data/test/test-column.rb +31 -1
- data/test/test-context-select.rb +45 -14
- data/test/test-context.rb +36 -0
- data/test/test-database.rb +13 -0
- data/test/test-expression-builder.rb +32 -5
- data/test/test-record.rb +34 -1
- data/test/test-schema.rb +52 -2
- data/test/test-table-select-weight.rb +20 -1
- data/test/test-table.rb +58 -0
- metadata +13 -41
- data/test-unit-notify/Rakefile +0 -47
- data/test-unit-notify/lib/test/unit/notify.rb +0 -104
- data/test-unit/COPYING +0 -56
- data/test-unit/GPL +0 -340
- data/test-unit/PSFL +0 -271
- data/test-unit/html/bar.svg +0 -153
- data/test-unit/html/developer.svg +0 -469
- data/test-unit/html/favicon.ico +0 -0
- data/test-unit/html/favicon.svg +0 -82
- data/test-unit/html/heading-mark.svg +0 -393
- data/test-unit/html/install.svg +0 -636
- data/test-unit/html/logo.svg +0 -483
- data/test-unit/html/test-unit.css +0 -339
- data/test-unit/html/tutorial.svg +0 -559
- data/test-unit/lib/test/unit/util/output.rb +0 -31
- data/test-unit/test/ui/test_tap.rb +0 -33
- data/test-unit/test/util/test-output.rb +0 -11
@@ -1,31 +0,0 @@
|
|
1
|
-
module Test
|
2
|
-
module Unit
|
3
|
-
module Util
|
4
|
-
module Output
|
5
|
-
##
|
6
|
-
# Returns output for standard output and standard
|
7
|
-
# error as string.
|
8
|
-
#
|
9
|
-
# Example:
|
10
|
-
# capture_output do
|
11
|
-
# puts("stdout")
|
12
|
-
# warn("stderr")
|
13
|
-
# end # -> ["stdout\n", "stderr\n"]
|
14
|
-
def capture_output
|
15
|
-
require 'stringio'
|
16
|
-
|
17
|
-
output = StringIO.new
|
18
|
-
error = StringIO.new
|
19
|
-
stdout_save, stderr_save = $stdout, $stderr
|
20
|
-
$stdout, $stderr = output, error
|
21
|
-
begin
|
22
|
-
yield
|
23
|
-
[output.string, error.string]
|
24
|
-
ensure
|
25
|
-
$stdout, $stderr = stdout_save, stderr_save
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
@@ -1,33 +0,0 @@
|
|
1
|
-
require 'stringio'
|
2
|
-
require 'test/unit/ui/tap/testrunner'
|
3
|
-
|
4
|
-
class TestTap < Test::Unit::TestCase
|
5
|
-
def test_run
|
6
|
-
fail_line = nil
|
7
|
-
test_case = Class.new(Test::Unit::TestCase) do
|
8
|
-
def test_success
|
9
|
-
assert_equal(3, 1 + 2)
|
10
|
-
end
|
11
|
-
|
12
|
-
def test_fail; assert_equal(3, 1 - 2); end; fail_line = __LINE__
|
13
|
-
end
|
14
|
-
output = StringIO.new
|
15
|
-
runner = Test::Unit::UI::Tap::TestRunner.new(test_case.suite,
|
16
|
-
:output => output)
|
17
|
-
result = runner.start; start_line = __LINE__
|
18
|
-
assert_equal(<<-EOR, output.string.gsub(/[\d\.]+ seconds/, "0.001 seconds"))
|
19
|
-
1..2
|
20
|
-
not ok 1 - test_fail(): <3> expected but was
|
21
|
-
# Failure:
|
22
|
-
# test_fail()
|
23
|
-
# [#{__FILE__}:#{fail_line}:in `test_fail'
|
24
|
-
# #{__FILE__}:#{start_line}:in `test_run']:
|
25
|
-
# <3> expected but was
|
26
|
-
# <-1>.
|
27
|
-
ok 2 - test_success()
|
28
|
-
# Finished in 0.001 seconds.
|
29
|
-
# 2 tests, 2 assertions, 1 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications
|
30
|
-
EOR
|
31
|
-
assert_true(result.passed?)
|
32
|
-
end
|
33
|
-
end
|