@@ -187,15 +187,15 @@ TEST_F(test_linting_lsp_server, initialize_with_different_request_ids) {
187
187
188
188
// TODO(strager): Support numbers with fractional parts, such as 12.34.
189
189
for (const test_case& test : {
190
- test_case{u8" null" , ::boost::json::value ()},
191
- test_case{u8" 1" , ::boost::json::value (1 )},
192
- test_case{u8" 9007199254740991" ,
190
+ test_case{u8" null" _sv , ::boost::json::value ()},
191
+ test_case{u8" 1" _sv , ::boost::json::value (1 )},
192
+ test_case{u8" 9007199254740991" _sv ,
193
193
::boost::json::value (std::int64_t {9007199254740991LL })},
194
- test_case{u8" -12345" , ::boost::json::value (-12345 )},
195
- test_case{u8R"( "A")" , ::boost::json::value (" A" )},
196
- test_case{u8R"( "id value goes \"here\"")" ,
194
+ test_case{u8" -12345" _sv , ::boost::json::value (-12345 )},
195
+ test_case{u8R"( "A")" _sv , ::boost::json::value (" A" )},
196
+ test_case{u8R"( "id value goes \"here\"")" _sv ,
197
197
::boost::json::value (" id value goes \" here\" " )},
198
- test_case{u8R"( "id value goes \"here\"")" ,
198
+ test_case{u8R"( "id value goes \"here\"")" _sv ,
199
199
::boost::json::value (" id value goes \" here\" " )},
200
200
}) {
201
201
SCOPED_TRACE (out_string8 (test.id_json ));
@@ -518,8 +518,8 @@ TEST_F(test_linting_lsp_server, opening_document_lints) {
518
518
padded_string_view code, string8_view uri_json,
519
519
string8_view version,
520
520
byte_buffer& notification_json) {
521
- EXPECT_EQ (code, u8" let x = x;" );
522
- EXPECT_EQ (uri_json, u8" \" file:///test.js\" " );
521
+ EXPECT_EQ (code, u8" let x = x;" _sv );
522
+ EXPECT_EQ (uri_json, u8" \" file:///test.js\" " _sv );
523
523
EXPECT_EQ (version, u8" 10" sv);
524
524
525
525
notification_json.append_copy (
@@ -824,7 +824,7 @@ TEST_F(test_linting_lsp_server,
824
824
825
825
TEST_F (test_linting_lsp_server, linting_uses_config_from_file) {
826
826
this ->fs .create_file (this ->fs .rooted (" quick-lint-js.config" ),
827
- u8R"( {"globals": {"testGlobalVariable": true}})" );
827
+ u8R"( {"globals": {"testGlobalVariable": true}})" _sv );
828
828
829
829
this ->lint_callback = [&](configuration& config, linter_options,
830
830
padded_string_view, string8_view, string8_view,
@@ -944,7 +944,7 @@ TEST_F(
944
944
TEST_F (test_linting_lsp_server,
945
945
linting_uses_config_from_file_with_special_chars_in_document_uri) {
946
946
this ->fs .create_file (this ->fs .rooted (" a%b~/quick-lint-js.config" ),
947
- u8R"( {"globals": {"testGlobalVariable": true}})" );
947
+ u8R"( {"globals": {"testGlobalVariable": true}})" _sv );
948
948
949
949
this ->lint_callback = [&](configuration& config, linter_options,
950
950
padded_string_view, string8_view, string8_view,
@@ -979,7 +979,7 @@ TEST_F(test_linting_lsp_server, linting_uses_already_opened_config_file) {
979
979
};
980
980
981
981
this ->fs .create_file (this ->fs .rooted (" quick-lint-js.config" ),
982
- u8R"( {"globals": {"modified": false}})" );
982
+ u8R"( {"globals": {"modified": false}})" _sv );
983
983
this ->server ->append (
984
984
make_message (concat (u8R"( {
985
985
"jsonrpc": "2.0",
@@ -1024,7 +1024,7 @@ TEST_F(test_linting_lsp_server,
1024
1024
};
1025
1025
1026
1026
this ->fs .create_file (this ->fs .rooted (" quick-lint-js.config" ),
1027
- u8R"( {"globals": {"haveOuterConfig": false}})" );
1027
+ u8R"( {"globals": {"haveOuterConfig": false}})" _sv );
1028
1028
this ->server ->append (
1029
1029
make_message (concat (u8R"( {
1030
1030
"jsonrpc": "2.0",
@@ -1075,7 +1075,7 @@ TEST_F(test_linting_lsp_server, editing_config_relints_open_js_file) {
1075
1075
};
1076
1076
1077
1077
this ->fs .create_file (this ->fs .rooted (" quick-lint-js.config" ),
1078
- u8R"( {"globals": {"before": true}})" );
1078
+ u8R"( {"globals": {"before": true}})" _sv );
1079
1079
this ->server ->append (
1080
1080
make_message (concat (u8R"( {
1081
1081
"jsonrpc": "2.0",
@@ -1136,7 +1136,7 @@ TEST_F(test_linting_lsp_server, editing_config_relints_open_js_file) {
1136
1136
TEST_F (test_linting_lsp_server,
1137
1137
editing_config_lints_latest_version_of_js_file) {
1138
1138
this ->fs .create_file (this ->fs .rooted (" quick-lint-js.config" ),
1139
- u8R"( {"globals": {"before": true}})" );
1139
+ u8R"( {"globals": {"before": true}})" _sv );
1140
1140
this ->server ->append (
1141
1141
make_message (concat (u8R"( {
1142
1142
"jsonrpc": "2.0",
@@ -1245,7 +1245,7 @@ TEST_F(test_linting_lsp_server, editing_config_relints_many_open_js_files) {
1245
1245
};
1246
1246
1247
1247
this ->fs .create_file (this ->fs .rooted (" quick-lint-js.config" ),
1248
- u8R"( {"globals": {"before": true}})" );
1248
+ u8R"( {"globals": {"before": true}})" _sv );
1249
1249
this ->server ->append (
1250
1250
make_message (concat (u8R"( {
1251
1251
"jsonrpc": "2.0",
@@ -1262,7 +1262,7 @@ TEST_F(test_linting_lsp_server, editing_config_relints_many_open_js_files) {
1262
1262
}
1263
1263
})" _sv)));
1264
1264
1265
- for (const char8* js_file : {u8" a.js" , u8" b.js" , u8" c.js" }) {
1265
+ for (string8_view js_file : {u8" a.js" _sv , u8" b.js" _sv , u8" c.js" _sv }) {
1266
1266
this ->server ->append (
1267
1267
make_message (concat (u8R"( {
1268
1268
"jsonrpc": "2.0",
@@ -1387,7 +1387,7 @@ TEST_F(test_linting_lsp_server, editing_config_relints_only_affected_js_files) {
1387
1387
}
1388
1388
})" _sv)));
1389
1389
1390
- for (const char8* js_file : {u8" dir-a/test.js" , u8" dir-b/test.js" }) {
1390
+ for (string8_view js_file : {u8" dir-a/test.js" _sv , u8" dir-b/test.js" _sv }) {
1391
1391
this ->server ->append (
1392
1392
make_message (concat (u8R"( {
1393
1393
"jsonrpc": "2.0",
@@ -1558,7 +1558,7 @@ TEST_F(test_linting_lsp_server, opening_config_relints_open_js_files) {
1558
1558
};
1559
1559
1560
1560
this ->fs .create_file (this ->fs .rooted (" quick-lint-js.config" ),
1561
- u8R"( {"globals": {"before": true}})" );
1561
+ u8R"( {"globals": {"before": true}})" _sv );
1562
1562
this ->server ->append (
1563
1563
make_message (concat (u8R"( {
1564
1564
"jsonrpc": "2.0",
@@ -1596,7 +1596,7 @@ TEST_F(test_linting_lsp_server, opening_config_relints_open_js_files) {
1596
1596
TEST_F (test_linting_lsp_server,
1597
1597
changing_config_on_filesystem_relints_open_js_files) {
1598
1598
this ->fs .create_file (this ->fs .rooted (" quick-lint-js.config" ),
1599
- u8R"( {"globals": {"before": true}})" );
1599
+ u8R"( {"globals": {"before": true}})" _sv );
1600
1600
this ->server ->append (
1601
1601
make_message (concat (u8R"( {
1602
1602
"jsonrpc": "2.0",
@@ -1640,7 +1640,7 @@ TEST_F(test_linting_lsp_server,
1640
1640
this ->client ->messages .clear ();
1641
1641
1642
1642
this ->fs .create_file (this ->fs .rooted (" quick-lint-js.config" ),
1643
- u8R"( {"globals": {"after": true}})" );
1643
+ u8R"( {"globals": {"after": true}})" _sv );
1644
1644
this ->handler ->filesystem_changed ();
1645
1645
this ->handler ->flush_pending_notifications (*this ->client );
1646
1646
@@ -1664,7 +1664,7 @@ TEST_F(
1664
1664
};
1665
1665
1666
1666
this ->fs .create_file (this ->fs .rooted (" quick-lint-js.config" ),
1667
- u8R"( {"globals": {"v1": true}})" );
1667
+ u8R"( {"globals": {"v1": true}})" _sv );
1668
1668
this ->server ->append (
1669
1669
make_message (concat (u8R"( {
1670
1670
"jsonrpc": "2.0",
@@ -1714,7 +1714,7 @@ TEST_F(
1714
1714
TEST_F (test_linting_lsp_server,
1715
1715
closing_open_config_reloads_config_from_filesystem) {
1716
1716
this ->fs .create_file (this ->fs .rooted (" quick-lint-js.config" ),
1717
- u8R"( {"globals": {"configFromFilesystem": true}})" );
1717
+ u8R"( {"globals": {"configFromFilesystem": true}})" _sv );
1718
1718
this ->server ->append (
1719
1719
make_message (concat (u8R"( {
1720
1720
"jsonrpc": "2.0",
@@ -1914,7 +1914,7 @@ TEST_F(test_linting_lsp_server,
1914
1914
1915
1915
TEST_F (test_linting_lsp_server, making_config_file_unreadable_relints) {
1916
1916
this ->fs .create_file (this ->fs .rooted (" quick-lint-js.config" ),
1917
- u8R"( {"globals": {"configFromFilesystem": true}})" );
1917
+ u8R"( {"globals": {"configFromFilesystem": true}})" _sv );
1918
1918
1919
1919
this ->server ->append (
1920
1920
make_message (concat (u8R"( {
0 commit comments