This repository was archived by the owner on Jan 27, 2023. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -70,41 +70,6 @@ task :generate_ordered_string_test_cases do
7070 num_test_cases = 100
7171
7272 string_comparison_cases = ( 0 ..( num_test_cases - 1 ) ) . map do
73- # TODO: this only gives single-char strings of alpha chars for debugging
74- # why this test case doesn't work. This looks like a bug on the ruby side.
75- # The comparison logic using encrypted terms is busted.
76- # random_ascii_string = -> () do
77- # max_string_length = 10
78- # (0..0).map { (rand(26) + 97).chr }.join
79- # end
80-
81- # str_a = random_ascii_string.call
82- # terms_a = index.analyze(SecureRandom.uuid, {"title" => str_a})[:terms]
83-
84- # if terms_a.length != 1
85- # raise "Expected terms_a to have exactly one item. Had #{terms_a.length}"
86- # end
87-
88- # term_a = terms_a.first[:term]
89-
90- # str_b = random_ascii_string.call
91- # terms_b = index.analyze(SecureRandom.uuid, {"title" => str_b})[:terms]
92-
93- # if terms_b.length != 1
94- # raise "Expected terms_b to have exactly one item. Had #{terms_b.length}"
95- # end
96-
97- # term_b = terms_b.first[:term]
98-
99- # output = case term_a <=> term_b
100- # when -1
101- # "<"
102- # when 0
103- # "=="
104- # when 1
105- # ">"
106- # end
107-
10873 str_a = random_ascii_string . call
10974 terms_a = index . __send__ :orderise_string , str_a
11075
You can’t perform that action at this time.
0 commit comments