Skip to content

Commit 4a6486c

Browse files
committed
wip
1 parent efd6f52 commit 4a6486c

4 files changed

Lines changed: 203 additions & 74 deletions

File tree

src_extra/c4/yml/extra/event_handler_ints.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ int32_t estimate_num_events_ints(csubstr src)
2424
case '*':
2525
case '<':
2626
case '!':
27+
case '\n':
2728
count += 3;
2829
break;
2930
// we assume these ones are followed by a string
@@ -34,7 +35,6 @@ int32_t estimate_num_events_ints(csubstr src)
3435
// these are one-int events
3536
case ']':
3637
case '}':
37-
case '\n':
3838
count += 1;
3939
break;
4040
}

src_extra/c4/yml/extra/string.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ struct string
8585

8686
public:
8787

88+
const char* data() const noexcept { return m_str; }
8889
id_type size() const noexcept { return m_size; }
8990
id_type capacity() const noexcept { return m_capacity; }
9091

test/CMakeLists.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -181,14 +181,14 @@ if(RYML_TEST_TOOLS)
181181
endif()
182182
endfunction()
183183
ryml_get_target_exe(ryml-yaml-events RYML_TGT_EVENTS)
184-
ryml_add_event_tool_test(success_tree TRUE "-t" "{foo: bar, baz: [exactly]}")
185-
ryml_add_event_tool_test(success_evts TRUE "" "{{this: is, a: keymap}: [seq,val]}")
186-
ryml_add_event_tool_test(fail_squo_tree FALSE "-t" "foo: 'bar")
187-
ryml_add_event_tool_test(fail_squo_evts FALSE "" "foo: 'bar")
188-
ryml_add_event_tool_test(fail_dquo_tree FALSE "-t" "foo: \"bar")
189-
ryml_add_event_tool_test(fail_dquo_evts FALSE "" "foo: \"bar")
190-
ryml_add_event_tool_test(fail_seq1_tree FALSE "-t" "[ a, b, c ] ]")
191-
ryml_add_event_tool_test(fail_seq2_evts FALSE "" "[ [a, b, c ]")
184+
ryml_add_event_tool_test(success_tree TRUE "tst" "{foo: bar, baz: [exactly]}")
185+
ryml_add_event_tool_test(success_evts TRUE "tss" "{{this: is, a: keymap}: [seq,val]}")
186+
ryml_add_event_tool_test(fail_squo_tree FALSE "tst" "foo: 'bar")
187+
ryml_add_event_tool_test(fail_squo_evts FALSE "tss" "foo: 'bar")
188+
ryml_add_event_tool_test(fail_dquo_tree FALSE "tst" "foo: \"bar")
189+
ryml_add_event_tool_test(fail_dquo_evts FALSE "tss" "foo: \"bar")
190+
ryml_add_event_tool_test(fail_seq1_tree FALSE "tst" "[ a, b, c ] ]")
191+
ryml_add_event_tool_test(fail_seq2_evts FALSE "tss" "[ [a, b, c ]")
192192
endif()
193193

194194

0 commit comments

Comments
 (0)