Navigation Menu

Skip to content

Commit

Permalink
test: follow estimate algorithm change
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Apr 9, 2015
1 parent 4a257a5 commit d94c81b
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions test/query_optimizer/suite/test_estimate_size.rb
Expand Up @@ -32,14 +32,14 @@ def setup
end

def test_no_record
assert_equal(0, estimate_size("message @ 'Groonga'"))
assert_equal(0, estimate_size("message @ 'roonga'"))
end

def test_have_record
@logs.add(:message => "Groonga is fast")
@logs.add(:message => "Rroonga is fast")
@logs.add(:message => "Mroonga is fast")
assert_equal(6, estimate_size("message @ 'Groonga'"))
assert_equal(6, estimate_size("message @ 'roonga'"))
end
end

Expand Down Expand Up @@ -281,7 +281,7 @@ def test_two
@logs.add(:timestamp => "2015-02-19 02:19:00")
@logs.add(:timestamp => "2015-02-19 02:19:00")

assert_equal(6, estimate_size("message @ 'Groonga' && " +
assert_equal(6, estimate_size("message @ 'roonga' && " +
"timestamp < '2015-02-19 02:19:00'"))
end

Expand All @@ -298,7 +298,7 @@ def test_three
@logs.add(:timestamp => "2015-02-19 02:19:00", :type => 3)
@logs.add(:timestamp => "2015-02-19 02:19:00", :type => 3)

assert_equal(5, estimate_size("message @ 'Groonga' && " +
assert_equal(5, estimate_size("message @ 'roonga' && " +
"timestamp < '2015-02-19 02:19:00' && " +
"type == 1"))
end
Expand Down Expand Up @@ -346,7 +346,7 @@ def test_two
@logs.add(:timestamp => "2015-02-19 02:19:00")
@logs.add(:timestamp => "2015-02-19 02:19:00")

assert_equal(1, estimate_size("message @ 'Groonga' &! " +
assert_equal(1, estimate_size("message @ 'roonga' &! " +
"timestamp < '2015-02-19 02:19:00'"))
end

Expand All @@ -363,7 +363,7 @@ def test_three
@logs.add(:timestamp => "2015-02-19 02:19:00", :type => 3)
@logs.add(:timestamp => "2015-02-19 02:19:00", :type => 3)

assert_equal(3, estimate_size("message @ 'Groonga' &! " +
assert_equal(3, estimate_size("message @ 'roonga' &! " +
"timestamp < '2015-02-19 02:19:00' &! " +
"type == 1"))
end
Expand Down Expand Up @@ -411,7 +411,7 @@ def test_two
@logs.add(:timestamp => "2015-02-19 02:19:00")
@logs.add(:timestamp => "2015-02-19 02:19:00")

assert_equal(8, estimate_size("message @ 'Groonga' || " +
assert_equal(8, estimate_size("message @ 'roonga' || " +
"timestamp < '2015-02-19 02:19:00'"))
end

Expand All @@ -428,7 +428,7 @@ def test_three
@logs.add(:timestamp => "2015-02-19 02:19:00", :type => 3)
@logs.add(:timestamp => "2015-02-19 02:19:00", :type => 3)

assert_equal(8, estimate_size("message @ 'Groonga' || " +
assert_equal(8, estimate_size("message @ 'roonga' || " +
"timestamp < '2015-02-19 02:19:00' || " +
"type == 1"))
end
Expand Down Expand Up @@ -479,11 +479,11 @@ def test_and_or
@logs.add(:timestamp => "2015-02-19 02:19:00", :type => 3)

assert_equal(6, estimate_size("(" +
"message @ 'Groonga' && " +
"message @ 'roonga' && " +
"timestamp < '2015-02-19 02:19:00'" +
") || " +
"(" +
"message @ 'Groonga' && " +
"message @ 'roonga' && " +
"timestamp < '2015-02-19 02:19:00' && " +
"type == 1" +
")"))
Expand Down

0 comments on commit d94c81b

Please sign in to comment.