@@ -42,41 +42,41 @@ TEST_CASE("cbor_cursor reputon test")
4242 {
4343 cbor::cbor_bytes_cursor cursor (data);
4444
45- CHECK (cursor.current ().event_type () == staj_event_type::begin_object );
46- CHECK (cursor.current ().size () == 2 );
45+ CHECK (staj_event_type::begin_object == cursor.current ().event_type ());
46+ CHECK (2 == cursor.current ().size ());
4747 cursor.next ();
48- CHECK (cursor.current ().event_type () == staj_event_type::key );
48+ CHECK (staj_event_type::key == cursor.current ().event_type ());
4949 cursor.next ();
50- CHECK (cursor.current ().event_type () == staj_event_type::string_value );
50+ CHECK (staj_event_type::string_value == cursor.current ().event_type ());
5151 cursor.next ();
52- CHECK (cursor.current ().event_type () == staj_event_type::key );
52+ CHECK (staj_event_type::key == cursor.current ().event_type ());
5353 cursor.next ();
54- CHECK (cursor.current ().event_type () == staj_event_type::begin_array );
55- CHECK (cursor.current ().size () == 1 );
54+ CHECK (staj_event_type::begin_array == cursor.current ().event_type ());
55+ CHECK (1 == cursor.current ().size ());
5656 cursor.next ();
57- CHECK (cursor.current ().event_type () == staj_event_type::begin_object );
57+ CHECK (staj_event_type::begin_object == cursor.current ().event_type ());
5858 cursor.next ();
59- CHECK (cursor.current ().event_type () == staj_event_type::key );
59+ CHECK (staj_event_type::key == cursor.current ().event_type ());
6060 cursor.next ();
61- CHECK (cursor.current ().event_type () == staj_event_type::string_value );
61+ CHECK (staj_event_type::string_value == cursor.current ().event_type ());
6262 cursor.next ();
63- CHECK (cursor.current ().event_type () == staj_event_type::key );
63+ CHECK (staj_event_type::key == cursor.current ().event_type ());
6464 cursor.next ();
65- CHECK (cursor.current ().event_type () == staj_event_type::string_value );
65+ CHECK (staj_event_type::string_value == cursor.current ().event_type ());
6666 cursor.next ();
67- CHECK (cursor.current ().event_type () == staj_event_type::key );
67+ CHECK (staj_event_type::key == cursor.current ().event_type ());
6868 cursor.next ();
69- CHECK (cursor.current ().event_type () == staj_event_type::string_value );
69+ CHECK (staj_event_type::string_value == cursor.current ().event_type ());
7070 cursor.next ();
71- CHECK (cursor.current ().event_type () == staj_event_type::key );
71+ CHECK (staj_event_type::key == cursor.current ().event_type ());
7272 cursor.next ();
73- CHECK (cursor.current ().event_type () == staj_event_type::double_value );
73+ CHECK (staj_event_type::double_value == cursor.current ().event_type ());
7474 cursor.next ();
75- CHECK (cursor.current ().event_type () == staj_event_type::end_object );
75+ CHECK (staj_event_type::end_object == cursor.current ().event_type ());
7676 cursor.next ();
77- CHECK (cursor.current ().event_type () == staj_event_type::end_array );
77+ CHECK (staj_event_type::end_array == cursor.current ().event_type ());
7878 cursor.next ();
79- CHECK (cursor.current ().event_type () == staj_event_type::end_object );
79+ CHECK (staj_event_type::end_object == cursor.current ().event_type ());
8080 cursor.next ();
8181 CHECK (cursor.done ());
8282 }
@@ -89,41 +89,41 @@ TEST_CASE("cbor_cursor indefinite array of array test")
8989 SECTION (" test 1" )
9090 {
9191 cbor::cbor_bytes_cursor cursor (data);
92- CHECK (cursor.current ().event_type () == staj_event_type::begin_array );
93- CHECK (cursor.current ().tag () == semantic_tag::none );
92+ CHECK (staj_event_type::begin_array == cursor.current ().event_type ());
93+ CHECK (semantic_tag::none == cursor.current ().tag ());
9494 cursor.next ();
95- CHECK (cursor.current ().event_type () == staj_event_type::begin_array );
96- CHECK (cursor.current ().tag () == semantic_tag::none );
95+ CHECK (staj_event_type::begin_array == cursor.current ().event_type ());
96+ CHECK (semantic_tag::none == cursor.current ().tag ());
9797 cursor.next ();
98- CHECK (cursor.current ().event_type () == staj_event_type::string_value );
99- CHECK (cursor.current ().tag () == semantic_tag::none );
98+ CHECK (staj_event_type::string_value == cursor.current ().event_type ());
99+ CHECK (semantic_tag::none == cursor.current ().tag ());
100100 cursor.next ();
101- CHECK (cursor.current ().event_type () == staj_event_type::byte_string_value );
102- CHECK (cursor.current ().tag () == semantic_tag::none );
101+ CHECK (staj_event_type::byte_string_value == cursor.current ().event_type ());
102+ CHECK (semantic_tag::none == cursor.current ().tag ());
103103 cursor.next ();
104- CHECK (cursor.current ().event_type () == staj_event_type::string_value );
105- CHECK (cursor.current ().tag () == semantic_tag::bigint );
104+ CHECK (staj_event_type::string_value == cursor.current ().event_type ());
105+ CHECK (semantic_tag::bigint == cursor.current ().tag ());
106106 cursor.next ();
107- CHECK (cursor.current ().event_type () == staj_event_type::end_array );
108- CHECK (cursor.current ().tag () == semantic_tag::none );
107+ CHECK (staj_event_type::end_array == cursor.current ().event_type ());
108+ CHECK (semantic_tag::none == cursor.current ().tag ());
109109 cursor.next ();
110- CHECK (cursor.current ().event_type () == staj_event_type::begin_array );
111- CHECK (cursor.current ().tag () == semantic_tag::none );
110+ CHECK (staj_event_type::begin_array == cursor.current ().event_type ());
111+ CHECK (semantic_tag::none == cursor.current ().tag ());
112112 cursor.next ();
113- CHECK (cursor.current ().event_type () == staj_event_type::string_value );
114- CHECK (cursor.current ().tag () == semantic_tag::none );
113+ CHECK (staj_event_type::string_value == cursor.current ().event_type ());
114+ CHECK (semantic_tag::none == cursor.current ().tag ());
115115 cursor.next ();
116- CHECK (cursor.current ().event_type () == staj_event_type::byte_string_value );
117- CHECK (cursor.current ().tag () == semantic_tag::base64 );
116+ CHECK (staj_event_type::byte_string_value == cursor.current ().event_type ());
117+ CHECK (semantic_tag::base64 == cursor.current ().tag ());
118118 cursor.next ();
119- CHECK (cursor.current ().event_type () == staj_event_type::string_value );
120- CHECK (cursor.current ().tag () == semantic_tag::bigdec );
119+ CHECK (staj_event_type::string_value == cursor.current ().event_type ());
120+ CHECK (semantic_tag::bigdec == cursor.current ().tag ());
121121 cursor.next ();
122- CHECK (cursor.current ().event_type () == staj_event_type::end_array );
123- CHECK (cursor.current ().tag () == semantic_tag::none );
122+ CHECK (staj_event_type::end_array == cursor.current ().event_type ());
123+ CHECK (semantic_tag::none == cursor.current ().tag ());
124124 cursor.next ();
125- CHECK (cursor.current ().event_type () == staj_event_type::end_array );
126- CHECK (cursor.current ().tag () == semantic_tag::none );
125+ CHECK (staj_event_type::end_array == cursor.current ().event_type ());
126+ CHECK (semantic_tag::none == cursor.current ().tag ());
127127 cursor.next ();
128128 CHECK (cursor.done ());
129129 }
@@ -311,27 +311,27 @@ TEMPLATE_TEST_CASE("cbor_cursor reset test", "",
311311 cursor_type cursor (std::move (source));
312312
313313 REQUIRE_FALSE (cursor.done ());
314- CHECK (cursor.current ().event_type () == staj_event_type::string_value );
315- CHECK (cursor.current ().tag () == semantic_tag::none );
316- CHECK (cursor.current ().template get <std::string>() == std::string ( " Tom " ));
314+ CHECK (staj_event_type::string_value == cursor.current ().event_type ());
315+ CHECK (semantic_tag::none == cursor.current ().tag ());
316+ CHECK (std::string ( " Tom " ) == cursor.current ().template get <std::string>());
317317 CHECK (cursor.current ().template get <jsoncons::string_view>() ==
318318 jsoncons::string_view (" Tom" ));
319319 cursor.next ();
320320 CHECK (cursor.done ());
321321
322322 cursor.reset ();
323323 REQUIRE_FALSE (cursor.done ());
324- CHECK (cursor.current ().event_type () == staj_event_type::int64_value );
325- CHECK (cursor.current ().tag () == semantic_tag::none );
326- CHECK (cursor.current ().template get <int >() == - 100 );
324+ CHECK (staj_event_type::int64_value == cursor.current ().event_type ());
325+ CHECK (semantic_tag::none == cursor.current ().tag ());
326+ CHECK (- 100 == cursor.current ().template get <int >());
327327 cursor.next ();
328328 CHECK (cursor.done ());
329329
330330 cursor.reset (ec);
331331 REQUIRE_FALSE (ec);
332332 REQUIRE_FALSE (cursor.done ());
333- CHECK (cursor.current ().event_type () == staj_event_type::null_value );
334- CHECK (cursor.current ().tag () == semantic_tag::none );
333+ CHECK (staj_event_type::null_value == cursor.current ().event_type ());
334+ CHECK (semantic_tag::none == cursor.current ().tag ());
335335 cursor.next (ec);
336336 REQUIRE_FALSE (ec);
337337 CHECK (cursor.done ());
@@ -357,9 +357,9 @@ TEMPLATE_TEST_CASE("cbor_cursor reset test", "",
357357
358358 // Reset to valid input1
359359 cursor.reset (input1);
360- CHECK (cursor.current ().event_type () == staj_event_type::string_value );
361- CHECK (cursor.current ().tag () == semantic_tag::none );
362- CHECK (cursor.current ().template get <std::string>() == std::string ( " Tom " ));
360+ CHECK (staj_event_type::string_value == cursor.current ().event_type ());
361+ CHECK (semantic_tag::none == cursor.current ().tag ());
362+ CHECK (std::string ( " Tom " ) == cursor.current ().template get <std::string>());
363363 CHECK (cursor.current ().template get <jsoncons::string_view>() ==
364364 jsoncons::string_view (" Tom" ));
365365 ec = cbor::cbor_errc::success;
@@ -378,9 +378,9 @@ TEMPLATE_TEST_CASE("cbor_cursor reset test", "",
378378 ec = cbor::cbor_errc::success;
379379 cursor.reset (input3, ec);
380380 REQUIRE_FALSE (ec);
381- CHECK (cursor.current ().event_type () == staj_event_type::int64_value );
382- CHECK (cursor.current ().tag () == semantic_tag::none );
383- CHECK (cursor.current ().template get <int >() == - 100 );
381+ CHECK (staj_event_type::int64_value == cursor.current ().event_type ());
382+ CHECK (semantic_tag::none == cursor.current ().tag ());
383+ CHECK (- 100 == cursor.current ().template get <int >());
384384 REQUIRE_FALSE (cursor.done ());
385385 cursor.next (ec);
386386 CHECK_FALSE (ec);
0 commit comments