Skip to content

Commit 16597dd

Browse files
committed
Removing warnings and simplifying test to be less extreme.
1 parent 490d06f commit 16597dd

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

tests/test-grammar-integration.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -218,16 +218,16 @@ static void test_chained_ambiguity() {
218218
llama_grammar* grammar = llama_grammar_init(
219219
grammar_rules.data(), grammar_rules.size(), parsed_grammar.symbol_ids.at("root"));
220220

221-
std::string input = "1aa2aa3aa4aa5";
221+
std::string input = "1aa2aa3aa4";
222222

223223
auto decoded = decode_utf8(input, {});
224224

225225
const auto & code_points = decoded.first;
226226

227-
size_t cnt = 0;
227+
//size_t cnt = 0;
228228
for (auto it = code_points.begin(), end = code_points.end() - 1; it != end; ++it) {
229229
//fprintf(stderr, "Parsing character %zu ('%c'), stack size %zu\n", cnt, input[cnt], grammar->stacks.size());
230-
++cnt;
230+
//++cnt;
231231

232232
auto prev_stacks = grammar->stacks;
233233
grammar->stacks = llama_grammar_accept(grammar->rules, grammar->stacks, *it);
@@ -268,16 +268,16 @@ static void test_chained_ambiguity_grouped() {
268268
llama_grammar* grammar = llama_grammar_init(
269269
grammar_rules.data(), grammar_rules.size(), parsed_grammar.symbol_ids.at("root"));
270270

271-
std::string input = "1aa2aa3aa4aa5";
271+
std::string input = "1aa2aa3aa4";
272272

273273
auto decoded = decode_utf8(input, {});
274274

275275
const auto & code_points = decoded.first;
276276

277-
size_t cnt = 0;
277+
//size_t cnt = 0;
278278
for (auto it = code_points.begin(), end = code_points.end() - 1; it != end; ++it) {
279279
//fprintf(stderr, "Parsing character %zu ('%c'), stack size %zu\n", cnt, input[cnt], grammar->stacks.size());
280-
++cnt;
280+
//++cnt;
281281

282282
auto prev_stacks = grammar->stacks;
283283
grammar->stacks = llama_grammar_accept(grammar->rules, grammar->stacks, *it);

0 commit comments

Comments
 (0)