MCPcopy Create free account
hub / github.com/boostorg/json / testConversion

Method testConversion

test/string.cpp:989–1016  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

987 }
988
989 void
990 testConversion()
991 {
992 test_vectors const t;
993
994 string s(t.s1);
995 auto const& cs(s);
996
997 char const* chars = cs.c_str();
998 BOOST_TEST(chars == t.s1);
999 json::string_view sv = cs;
1000 BOOST_TEST(sv == t.s1);
1001#if ! defined(BOOST_NO_CXX17_HDR_STRING_VIEW)
1002 std::string_view std_sv = cs;
1003 BOOST_TEST(std_sv == t.s1);
1004#endif
1005
1006 s = t.s2;
1007
1008 chars = cs.c_str();
1009 BOOST_TEST(chars == t.s2);
1010 sv = cs;
1011 BOOST_TEST(sv == t.s2);
1012#if ! defined(BOOST_NO_CXX17_HDR_STRING_VIEW)
1013 std_sv = cs;
1014 BOOST_TEST(std_sv == t.s2);
1015#endif
1016 }
1017
1018 void
1019 testElementAccess()

Callers

nothing calls this directly

Calls 1

c_strMethod · 0.80

Tested by

no test coverage detected