Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenlib/tests')
-rw-r--r--source/blender/blenlib/tests/BLI_delaunay_2d_test.cc28
-rw-r--r--source/blender/blenlib/tests/BLI_string_test.cc16
-rw-r--r--source/blender/blenlib/tests/BLI_string_utf8_test.cc4
3 files changed, 24 insertions, 24 deletions
diff --git a/source/blender/blenlib/tests/BLI_delaunay_2d_test.cc b/source/blender/blenlib/tests/BLI_delaunay_2d_test.cc
index aa3e183a382..d00e8bf55fd 100644
--- a/source/blender/blenlib/tests/BLI_delaunay_2d_test.cc
+++ b/source/blender/blenlib/tests/BLI_delaunay_2d_test.cc
@@ -333,37 +333,37 @@ void graph_draw(const std::string &label,
}
f << "<div>" << label << "</div>\n<div>\n"
- << R"(<svg version="1.1" )"
- R"(xmlns="http://www.w3.org/2000/svg" )"
- R"(xmlns:xlink="http://www.w3.org/1999/xlink" )"
- R"(xml:space="preserve"\n)"
- << R"(width=")" << view_width << R"(" height=")" << view_height << R"(">n)";
+ << "<svg version=\"1.1\" "
+ "xmlns=\"http://www.w3.org/2000/svg\" "
+ "xmlns:xlink=\"http://www.w3.org/1999/xlink\" "
+ "xml:space=\"preserve\"\n"
+ << "width=\"" << view_width << "\" height=\"" << view_height << "\">n";
for (const std::pair<int, int> &e : edges) {
const vec2<T> &uco = verts[e.first];
const vec2<T> &vco = verts[e.second];
int strokew = thin_line;
- f << R"(<line fill="none" stroke="black" stroke-width=")" << strokew << R"(" x1=")"
- << SX(uco[0]) << R"(" y1=")" << SY(uco[1]) << R"(" x2=")" << SX(vco[0]) << R"(" y2=")"
- << SY(vco[1]) << R"(">\n)";
+ f << "<line fill=\"none\" stroke=\"black\" stroke-width=\"" << strokew << "\" x1=\""
+ << SX(uco[0]) << "\" y1=\"" << SY(uco[1]) << "\" x2=\"" << SX(vco[0]) << "\" y2=\""
+ << SY(vco[1]) << "\">\n";
f << " <title>[" << e.first << "][" << e.second << "]</title>\n";
f << "</line>\n";
if (draw_edge_labels) {
- f << R"(<text x=")" << SX(0.5 * (uco[0] + vco[0])) << R"(" y=")"
- << SY(0.5 * (uco[1] + vco[1])) << R"(" font-size="small">)";
+ f << "<text x=\"" << SX(0.5 * (uco[0] + vco[0])) << "\" y=\"" << SY(0.5 * (uco[1] + vco[1]))
+ << "\" font-size=\"small\">";
f << "[" << e.first << "][" << e.second << "]</text>\n";
}
}
int i = 0;
for (const vec2<T> &vco : verts) {
- f << R"(<circle fill="black" cx=")" << SX(vco[0]) << R"(" cy=")" << SY(vco[1]) << R"(" r=")"
- << vert_radius << R"(">\n)";
+ f << "<circle fill=\"black\" cx=\"" << SX(vco[0]) << "\" cy=\"" << SY(vco[1]) << "\" r=\""
+ << vert_radius << "\">\n";
f << " <title>[" << i << "]" << vco << "</title>\n";
f << "</circle>\n";
if (draw_vert_labels) {
- f << R"(<text x=")" << SX(vco[0]) + vert_radius << R"(" y=")" << SY(vco[1]) - vert_radius
- << R"(" font-size="small">[)" << i << "]</text>\n";
+ f << "<text x=\"" << SX(vco[0]) + vert_radius << "\" y=\"" << SY(vco[1]) - vert_radius
+ << "\" font-size=\"small\">[" << i << "]</text>\n";
}
++i;
}
diff --git a/source/blender/blenlib/tests/BLI_string_test.cc b/source/blender/blenlib/tests/BLI_string_test.cc
index 3f7db261ac0..88cecaa5fee 100644
--- a/source/blender/blenlib/tests/BLI_string_test.cc
+++ b/source/blender/blenlib/tests/BLI_string_test.cc
@@ -845,12 +845,12 @@ TEST_F(StringEscape, Simple)
{"\\A", "\\\\A"},
{"A\\B", "A\\\\B"},
{"?", "?"},
- {R"("\)", R"(\"\\)"},
- {R"(\")", R"(\\\")"},
- {R"("\")", R"(\"\\\")"},
+ {"\"\\", "\\\"\\\\"},
+ {"\\\"", "\\\\\\\""},
+ {"\"\\\"", "\\\"\\\\\\\""},
- {R"(""")", R"(\"\"\")"},
- {R"(\\\)", R"(\\\\\\)"},
+ {"\"\"\"", "\\\"\\\"\\\""},
+ {"\\\\\\", "\\\\\\\\\\\\"},
};
testEscapeWords(equal);
@@ -868,9 +868,9 @@ TEST_F(StringEscape, Control)
{"\f", "\\f"},
{"A\n", "A\\n"},
{"\nA", "\\nA"},
- {"\n\r\t\a\b\f", R"(\n\r\t\a\b\f)"},
- {"\n_\r_\t_\a_\b_\f", R"(\n_\r_\t_\a_\b_\f)"},
- {"\n\\\r\\\t\\\a\\\b\\\f", R"(\n\\\r\\\t\\\a\\\b\\\f)"},
+ {"\n\r\t\a\b\f", "\\n\\r\\t\\a\\b\\f"},
+ {"\n_\r_\t_\a_\b_\f", "\\n_\\r_\\t_\\a_\\b_\\f"},
+ {"\n\\\r\\\t\\\a\\\b\\\f", "\\n\\\\\\r\\\\\\t\\\\\\a\\\\\\b\\\\\\f"},
};
testEscapeWords(escaped);
diff --git a/source/blender/blenlib/tests/BLI_string_utf8_test.cc b/source/blender/blenlib/tests/BLI_string_utf8_test.cc
index e93835ba1b6..1833945b3fd 100644
--- a/source/blender/blenlib/tests/BLI_string_utf8_test.cc
+++ b/source/blender/blenlib/tests/BLI_string_utf8_test.cc
@@ -92,12 +92,12 @@ const char *utf8_invalid_tests[][3] = {
"\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f"
"\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf"
"\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\" |",
- "3.1.9 \"\" |", R"(@)"},
+ "3.1.9 \"\" |", "\x40"},
/* 3.2 Lonely start characters
* 3.2.1 All 32 first bytes of 2-byte sequences (0xc0-0xdf), each followed by a space character: */
{"3.2.1 \"\xc0 \xc1 \xc2 \xc3 \xc4 \xc5 \xc6 \xc7 \xc8 \xc9 \xca \xcb \xcc \xcd \xce \xcf "
"\xd0 \xd1 \xd2 \xd3 \xd4 \xd5 \xd6 \xd7 \xd8 \xd9 \xda \xdb \xdc \xdd \xde \xdf \" |",
- "3.2.1 \" \" |", R"( )"},
+ "3.2.1 \" \" |", "\x20"},
/* 3.2.2 All 16 first bytes of 3-byte sequences (0xe0-0xef), each followed by a space character: */
{"3.2.2 \"\xe0 \xe1 \xe2 \xe3 \xe4 \xe5 \xe6 \xe7 \xe8 \xe9 \xea \xeb \xec \xed \xee \xef \" |",
"3.2.2 \" \" |", "\x10"},