text
stringlengths
0
2.2M
{ L_, 0x36 },
{ L_, 0x37 },
{ L_, 0x38 },
{ L_, 0x39 },
{ L_, 0x3a },
{ L_, 0x3b },
{ L_, 0x3c },
{ L_, 0x3d },
{ L_, 0x3e },
{ L_, 0x3f },
{ L_, 0x40 },
{ L_, 0x41 },
{ L_, 'A' },
// treat all uppercase (0x41 until 0x5a) as a region, and only
// test the boundaries.
{ L_, 'Z' },
{ L_, 0x5a },
{ L_, 0x5b },
{ L_, 0x5c },
{ L_, 0x5d },
{ L_, 0x5e },
{ L_, 0x5f },
{ L_, 0x60 },
{ L_, 0x61 },
{ L_, 'a' },
// treat all lowercase (0x61 until 0x7a) as a region, and only
// test the boundaries.
{ L_, 'z' },
{ L_, 0x7a },
{ L_, 0x7b },
{ L_, 0x7c },
{ L_, 0x7d },
{ L_, 0x7e },
};
printTextRoundTripScalarTester(DATA);
}
// Note that we have already tested the valid single byte characters
// individually, so the only concerns here are multibyte character
// strings and boundary conditions (empty string). We follow the
// boundary and area selection methods, by picking the boundary values
// and a value in between at random, for each range, and taking the
// cross product of all these values for making sure that all boundary
// faces (in a hypercube) are covered.
{
static const struct TestData {
int d_line;
const char *d_input;
} DATA[] = {
//line input
//---- -----
{ L_, "" },
{ L_, "\x09" },
{ L_, "\x0a" },
{ L_, "\x0d" },
{ L_, "\x22" },
{ L_, "\x26" },
{ L_, "\x27" },
{ L_, "\x3c" },
{ L_, "\x3e" },
{ L_, "Hello" },
{ L_, "Hello World!!" },
{ L_, "Hello \t World" },
{ L_, "Hello \n World" },
{ L_, "Hello \x0d World" },
{ L_, "Pi is < 3.15" },
{ L_, "Pi is > 3.14" },
{ L_, "Tom & Jerry" },
{ L_, "'Hello' World!" },
{ L_, "Hello \"World\"" },
{ L_, "<![CDATA&]]>" },
{ L_, "![CDATA[&]]>" },
{ L_, "<![CDATA[Hello]]>World" },
// Two-byte character sequences.
{ L_, "\xc2\x80" },
{ L_, "\xc2\xa3" },
{ L_, "\xc2\xbf" },
{ L_, "\xd0\x80" },
{ L_, "\xd0\x9d" },
{ L_, "\xd0\xbf" },
{ L_, "\xdf\x80" },
{ L_, "\xdf\xa6" },
{ L_, "\xdf\xbf" },
// Three-byte character sequences.
// Note that first byte 0xe0 is special (second byte ranges in
// 0xa0..0xbf instead of the usual 0x80..0xbf). Note also that
// first byte 0xed is special (second byte ranges in 0x80..0x9f
// instead of the usual 0x80..0xbf).
{ L_, "\xe0\xa0\x80" },
{ L_, "\xe0\xa0\xa3" },
{ L_, "\xe0\xa0\xbf" },