@@ -33,53 +33,53 @@ int main()
3333 antiprompts.build (tokenizer, {" abc" , " bcd" }, {" bca" , " x" });
3434
3535 assert_equal (antiprompts.findSingleTokenMatch (' x' ), {
36- .pos = 0 ,
37- .pattern = " x" ,
38- .is_partial = false ,
39- .matchLength = 1 ,
40- .is_grammar_trigger = true ,
36+ /* .pos = */ 0 ,
37+ /* .pattern = */ " x" ,
38+ /* .is_partial = */ false ,
39+ /* .matchLength = */ 1 ,
40+ /* .is_grammar_trigger = */ true ,
4141 });
4242 assert_equal (antiprompts.findSingleTokenMatch (' a' ), {
43- .pos = std::string::npos,
44- .pattern = " " ,
45- .is_partial = false ,
46- .matchLength = 0 ,
47- .is_grammar_trigger = false ,
43+ /* .pos = */ std::string::npos,
44+ /* .pattern = */ " " ,
45+ /* .is_partial = */ false ,
46+ /* .matchLength = */ 0 ,
47+ /* .is_grammar_trigger = */ false ,
4848 });
4949 assert_equal (antiprompts.findFirstMatch (" ab" , 0 ), {
50- .pos = 1 ,
51- .pattern = " " ,
52- .is_partial = true ,
53- .matchLength = 2 ,
54- .is_grammar_trigger = false ,
50+ /* .pos = */ 1 ,
51+ /* .pattern = */ " " ,
52+ /* .is_partial = */ true ,
53+ /* .matchLength = */ 2 ,
54+ /* .is_grammar_trigger = */ false ,
5555 });
5656 assert_equal (antiprompts.findFirstMatch (" abc" , 0 ), {
57- .pos = 1 ,
58- .pattern = " abc" ,
59- .is_partial = false ,
60- .matchLength = 3 ,
61- .is_grammar_trigger = false ,
57+ /* .pos = */ 1 ,
58+ /* .pattern = */ " abc" ,
59+ /* .is_partial = */ false ,
60+ /* .matchLength = */ 3 ,
61+ /* .is_grammar_trigger = */ false ,
6262 });
6363 assert_equal (antiprompts.findFirstMatch (" bc" , 0 ), {
64- .pos = 1 ,
65- .pattern = " " ,
66- .is_partial = true ,
67- .matchLength = 2 ,
68- .is_grammar_trigger = false ,
64+ /* .pos = */ 1 ,
65+ /* .pattern = */ " " ,
66+ /* .is_partial = */ true ,
67+ /* .matchLength = */ 2 ,
68+ /* .is_grammar_trigger = */ false ,
6969 });
7070 assert_equal (antiprompts.findFirstMatch (" bcd" , 0 ), {
71- .pos = 1 ,
72- .pattern = " bcd" ,
73- .is_partial = false ,
74- .matchLength = 3 ,
75- .is_grammar_trigger = false ,
71+ /* .pos = */ 1 ,
72+ /* .pattern = */ " bcd" ,
73+ /* .is_partial = */ false ,
74+ /* .matchLength = */ 3 ,
75+ /* .is_grammar_trigger = */ false ,
7676 });
7777 assert_equal (antiprompts.findFirstMatch (" bca" , 0 ), {
78- .pos = 1 ,
79- .pattern = " bca" ,
80- .is_partial = false ,
81- .matchLength = 3 ,
82- .is_grammar_trigger = true ,
78+ /* .pos = */ 1 ,
79+ /* .pattern = */ " bca" ,
80+ /* .is_partial = */ false ,
81+ /* .matchLength = */ 3 ,
82+ /* .is_grammar_trigger = */ true ,
8383 });
8484 printf (" OK\n " );
8585 // llama_antiprompts::MatchResult{0, "a", .is_partial = false, . 1, false});
0 commit comments