@@ -102,7 +102,7 @@ TEST_SUBMODULE(builtin_casters, m) {
102
102
} // 𝐀, utf16
103
103
else {
104
104
wstr.push_back ((wchar_t ) mathbfA32);
105
- } // 𝐀, utf32
105
+ } // 𝐀, utf32
106
106
wstr.push_back (0x7a ); // z
107
107
108
108
m.def (" good_utf8_string" , []() {
@@ -111,10 +111,9 @@ TEST_SUBMODULE(builtin_casters, m) {
111
111
m.def (" good_utf16_string" , [=]() {
112
112
return std::u16string ({b16, ib16, cake16_1, cake16_2, mathbfA16_1, mathbfA16_2, z16});
113
113
}); // b‽🎂𝐀z
114
- m.def (" good_utf32_string" , [=]() {
115
- return std::u32string ({a32, mathbfA32, cake32, ib32, z32});
116
- }); // a𝐀🎂‽z
117
- m.def (" good_wchar_string" , [=]() { return wstr; }); // a‽𝐀z
114
+ m.def (" good_utf32_string" ,
115
+ [=]() { return std::u32string ({a32, mathbfA32, cake32, ib32, z32}); }); // a𝐀🎂‽z
116
+ m.def (" good_wchar_string" , [=]() { return wstr; }); // a‽𝐀z
118
117
m.def (" bad_utf8_string" , []() {
119
118
return std::string (" abc\xd0 "
120
119
" def" );
@@ -124,9 +123,8 @@ TEST_SUBMODULE(builtin_casters, m) {
124
123
// UnicodeDecodeError
125
124
m.def (" bad_utf32_string" , [=]() { return std::u32string ({a32, char32_t (0xd800 ), z32}); });
126
125
if (sizeof (wchar_t ) == 2 ) {
127
- m.def (" bad_wchar_string" , [=]() {
128
- return std::wstring ({wchar_t (0x61 ), wchar_t (0xd800 )});
129
- });
126
+ m.def (" bad_wchar_string" ,
127
+ [=]() { return std::wstring ({wchar_t (0x61 ), wchar_t (0xd800 )}); });
130
128
}
131
129
m.def (" u8_Z" , []() -> char { return ' Z' ; });
132
130
m.def (" u8_eacute" , []() -> char { return ' \xe9 ' ; });
@@ -243,8 +241,7 @@ TEST_SUBMODULE(builtin_casters, m) {
243
241
244
242
// test_int_convert
245
243
m.def (" int_passthrough" , [](int arg) { return arg; });
246
- m.def (
247
- " int_passthrough_noconvert" , [](int arg) { return arg; }, py::arg{}.noconvert ());
244
+ m.def (" int_passthrough_noconvert" , [](int arg) { return arg; }, py::arg{}.noconvert ());
248
245
249
246
// test_tuple
250
247
m.def (
@@ -309,17 +306,15 @@ TEST_SUBMODULE(builtin_casters, m) {
309
306
310
307
// test_bool_caster
311
308
m.def (" bool_passthrough" , [](bool arg) { return arg; });
312
- m.def (
313
- " bool_passthrough_noconvert" , [](bool arg) { return arg; }, py::arg{}.noconvert ());
309
+ m.def (" bool_passthrough_noconvert" , [](bool arg) { return arg; }, py::arg{}.noconvert ());
314
310
315
311
// TODO: This should be disabled and fixed in future Intel compilers
316
312
#if !defined(__INTEL_COMPILER)
317
313
// Test "bool_passthrough_noconvert" again, but using () instead of {} to construct py::arg
318
314
// When compiled with the Intel compiler, this results in segmentation faults when importing
319
315
// the module. Tested with icc (ICC) 2021.1 Beta 20200827, this should be tested again when
320
316
// a newer version of icc is available.
321
- m.def (
322
- " bool_passthrough_noconvert2" , [](bool arg) { return arg; }, py::arg ().noconvert ());
317
+ m.def (" bool_passthrough_noconvert2" , [](bool arg) { return arg; }, py::arg ().noconvert ());
323
318
#endif
324
319
325
320
// test_reference_wrapper
0 commit comments