Skip to content

Commit 9a2cca8

Browse files
committed
removed test
1 parent a7f2105 commit 9a2cca8

File tree

2 files changed

+15
-27
lines changed

2 files changed

+15
-27
lines changed

common/chat.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2124,7 +2124,7 @@ static common_chat_params common_chat_params_init_qwen3_coder_xml(const common_c
21242124
param_rule += builder.add_schema(name + "-parameter-" + param_name, param_schema);
21252125
}
21262126

2127-
param_rule += " \"</parameter>\" space";
2127+
param_rule += "\"</parameter>\" space";
21282128

21292129
// Parameter is optional
21302130
if (required.find(param_name) == required.end()) {

tests/test-chat.cpp

Lines changed: 14 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1754,19 +1754,7 @@ static void test_template_output_parsers() {
17541754
{
17551755
printf("Testing Qwen3-Coder XML format - Error handling and edge cases\n");
17561756

1757-
// Test 1: Invalid XML - missing closing tag (should fall back to content)
1758-
common_chat_msg expected_invalid_xml;
1759-
expected_invalid_xml.role = "assistant";
1760-
expected_invalid_xml.content = "<tool_call><function=test>incomplete";
1761-
1762-
assert_msg_equals(
1763-
expected_invalid_xml,
1764-
common_chat_parse(
1765-
"<tool_call><function=test>incomplete",
1766-
/* is_partial= */ false,
1767-
{COMMON_CHAT_FORMAT_QWEN3_CODER_XML}));
1768-
1769-
// Test 2: No tool_call tags (should be treated as regular content)
1757+
// Test 1: No tool_call tags (should be treated as regular content)
17701758
common_chat_msg expected_no_tool_call;
17711759
expected_no_tool_call.role = "assistant";
17721760
expected_no_tool_call.content = "This is just regular text without any tool calls.";
@@ -1778,7 +1766,7 @@ static void test_template_output_parsers() {
17781766
/* is_partial= */ false,
17791767
{COMMON_CHAT_FORMAT_QWEN3_CODER_XML}));
17801768

1781-
// Test 3: Empty function name (should fall back to content)
1769+
// Test 2: Empty function name (should fall back to content)
17821770
common_chat_msg expected_empty_function;
17831771
expected_empty_function.role = "assistant";
17841772
expected_empty_function.content = "<tool_call><function=></function></tool_call>";
@@ -1790,7 +1778,7 @@ static void test_template_output_parsers() {
17901778
/* is_partial= */ false,
17911779
{COMMON_CHAT_FORMAT_QWEN3_CODER_XML}));
17921780

1793-
// Test 4: Malformed parameter tags (should still parse function but ignore malformed params)
1781+
// Test 3: Malformed parameter tags (should still parse function but ignore malformed params)
17941782
common_chat_msg expected_malformed_params;
17951783
expected_malformed_params.role = "assistant";
17961784
expected_malformed_params.tool_calls = {
@@ -1804,7 +1792,7 @@ static void test_template_output_parsers() {
18041792
/* is_partial= */ false,
18051793
{COMMON_CHAT_FORMAT_QWEN3_CODER_XML}));
18061794

1807-
// Test 5: Nested tool calls (should parse the first one)
1795+
// Test 4: Nested tool calls (should parse the first one)
18081796
common_chat_msg expected_nested;
18091797
expected_nested.role = "assistant";
18101798
expected_nested.tool_calls = {
@@ -1831,7 +1819,7 @@ static void test_template_output_parsers() {
18311819
/* is_partial= */ false,
18321820
{COMMON_CHAT_FORMAT_QWEN3_CODER_XML}));
18331821

1834-
// Test 6: Very deeply nested XML content in parameter
1822+
// Test 5: Very deeply nested XML content in parameter
18351823
common_chat_msg expected_deep_xml;
18361824
expected_deep_xml.role = "assistant";
18371825
expected_deep_xml.tool_calls = {
@@ -1851,7 +1839,7 @@ static void test_template_output_parsers() {
18511839
/* is_partial= */ false,
18521840
{COMMON_CHAT_FORMAT_QWEN3_CODER_XML}));
18531841

1854-
// Test 7: Parameter with only whitespace
1842+
// Test 6: Parameter with only whitespace
18551843
common_chat_msg expected_whitespace_param;
18561844
expected_whitespace_param.role = "assistant";
18571845
expected_whitespace_param.tool_calls = {
@@ -1871,7 +1859,7 @@ static void test_template_output_parsers() {
18711859
/* is_partial= */ false,
18721860
{COMMON_CHAT_FORMAT_QWEN3_CODER_XML}));
18731861

1874-
// Test 8: Parameter with tabs and mixed whitespace
1862+
// Test 7: Parameter with tabs and mixed whitespace
18751863
common_chat_msg expected_mixed_whitespace;
18761864
expected_mixed_whitespace.role = "assistant";
18771865
expected_mixed_whitespace.tool_calls = {
@@ -1893,7 +1881,7 @@ static void test_template_output_parsers() {
18931881
/* is_partial= */ false,
18941882
{COMMON_CHAT_FORMAT_QWEN3_CODER_XML}));
18951883

1896-
// Test 9: Control characters and special Unicode
1884+
// Test 8: Control characters and special Unicode
18971885
common_chat_msg expected_control_chars;
18981886
expected_control_chars.role = "assistant";
18991887
expected_control_chars.tool_calls = {
@@ -1913,7 +1901,7 @@ static void test_template_output_parsers() {
19131901
/* is_partial= */ false,
19141902
{COMMON_CHAT_FORMAT_QWEN3_CODER_XML}));
19151903

1916-
// Test 10: Emoji and extended Unicode characters
1904+
// Test 9: Emoji and extended Unicode characters
19171905
common_chat_msg expected_emoji;
19181906
expected_emoji.role = "assistant";
19191907
expected_emoji.tool_calls = {
@@ -1933,7 +1921,7 @@ static void test_template_output_parsers() {
19331921
/* is_partial= */ false,
19341922
{COMMON_CHAT_FORMAT_QWEN3_CODER_XML}));
19351923

1936-
// Test 11: Mathematical expressions and formulas
1924+
// Test 10: Mathematical expressions and formulas
19371925
common_chat_msg expected_math;
19381926
expected_math.role = "assistant";
19391927
expected_math.tool_calls = {
@@ -1953,7 +1941,7 @@ static void test_template_output_parsers() {
19531941
/* is_partial= */ false,
19541942
{COMMON_CHAT_FORMAT_QWEN3_CODER_XML}));
19551943

1956-
// Test 12: SQL injection-like content (should be safely escaped)
1944+
// Test 11: SQL injection-like content (should be safely escaped)
19571945
common_chat_msg expected_sql;
19581946
expected_sql.role = "assistant";
19591947
expected_sql.tool_calls = {
@@ -1973,7 +1961,7 @@ static void test_template_output_parsers() {
19731961
/* is_partial= */ false,
19741962
{COMMON_CHAT_FORMAT_QWEN3_CODER_XML}));
19751963

1976-
// Test 13: HTML/XML injection content
1964+
// Test 12: HTML/XML injection content
19771965
common_chat_msg expected_html;
19781966
expected_html.role = "assistant";
19791967
expected_html.tool_calls = {
@@ -1993,7 +1981,7 @@ static void test_template_output_parsers() {
19931981
/* is_partial= */ false,
19941982
{COMMON_CHAT_FORMAT_QWEN3_CODER_XML}));
19951983

1996-
// Test 14: Binary-like content (base64)
1984+
// Test 13: Binary-like content (base64)
19971985
common_chat_msg expected_binary;
19981986
expected_binary.role = "assistant";
19991987
expected_binary.tool_calls = {
@@ -2013,7 +2001,7 @@ static void test_template_output_parsers() {
20132001
/* is_partial= */ false,
20142002
{COMMON_CHAT_FORMAT_QWEN3_CODER_XML}));
20152003

2016-
// Test 15: Very large numbers (should be parsed as scientific notation)
2004+
// Test 14: Very large numbers (should be parsed as scientific notation)
20172005
common_chat_msg expected_large_numbers;
20182006
expected_large_numbers.role = "assistant";
20192007
expected_large_numbers.tool_calls = {

0 commit comments

Comments
 (0)