openMSX
unittest
XMLEscape_test.cc
Go to the documentation of this file.
1
#include "catch.hpp"
2
#include "
XMLEscape.hh
"
3
4
TEST_CASE
(
"XMLEscape"
)
5
{
6
SECTION(
"1 special char"
) {
7
CHECK
(
XMLEscape
(
"<"
) ==
"<"
);
8
}
9
SECTION(
"data + char"
) {
10
CHECK
(
XMLEscape
(
"foobar>"
) ==
"foobar>"
);
11
}
12
SECTION(
"char + data"
) {
13
CHECK
(
XMLEscape
(
"&foobar"
) ==
"&foobar"
);
14
}
15
SECTION(
"char + data + char"
) {
16
CHECK
(
XMLEscape
(
"'foobar\""
) ==
"'foobar""
);
17
}
18
SECTION(
"data + char + data"
) {
19
CHECK
(
XMLEscape
(
"foo\007bar"
) ==
"foobar"
);
20
}
21
}
XMLEscape.hh
XMLEscape
void XMLEscape(std::string_view s, Output output)
Definition
XMLEscape.hh:22
TEST_CASE
TEST_CASE("XMLEscape")
Definition
XMLEscape_test.cc:4
CHECK
CHECK(m3==m3)
Generated on Sat Dec 21 2024 14:13:52 for openMSX by
1.9.8