Add more tests for C++11 raw string literals
Test added to check fixes for: - Issue #948 and issue #1019 and issue #1273 - raw string delimiters not being stripped off - Issue #538 - Ruby support for "docstring" feature
This commit is contained in:
parent
96d33287b4
commit
0c4491eaae
4 changed files with 140 additions and 0 deletions
|
|
@ -59,3 +59,43 @@ const char16_t *hh = uR"XXX(I'm a "raw UTF-16" \ string.)XXX";
|
|||
const char32_t *ii = UR"XXX(I'm a "raw UTF-32" \ string.)XXX";
|
||||
%}
|
||||
|
||||
// Constants
|
||||
#if defined(SWIGJAVA)
|
||||
%javaconst(1);
|
||||
#elif SWIGCSHARP
|
||||
%csconst(1);
|
||||
#elif SWIGD
|
||||
%dmanifestconst;
|
||||
#endif
|
||||
|
||||
%inline %{
|
||||
#define jj ")I'm an \"ascii\" \\ string constant."
|
||||
#define kk R"XXX()I'm an "ascii" \ string constant.)XXX";
|
||||
%}
|
||||
|
||||
%constant mm = R"XXX()I'm an "ascii" \ string constant with multiple
|
||||
|
||||
lines.)XXX";
|
||||
|
||||
// docstring feature
|
||||
%feature("docstring") RawStringDoc::WW "Single line documentation comment"
|
||||
%feature("docstring") RawStringDoc::XX %{
|
||||
Multi-line
|
||||
documentation
|
||||
comment
|
||||
%}
|
||||
%feature("docstring") RawStringDoc::YY R"RRR(Single line "raw string" documentation comment)RRR"
|
||||
%feature("docstring") RawStringDoc::ZZ R"FOO(Documentation comment
|
||||
|
||||
as a "raw string"
|
||||
on multiple lines including a \ backslash)FOO"
|
||||
|
||||
%inline %{
|
||||
struct RawStringDoc {
|
||||
void WW() {}
|
||||
void XX() {}
|
||||
void YY() {}
|
||||
void ZZ() {}
|
||||
};
|
||||
%}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue