Browse Source

use string_view in unittest_nfc. That avoids copying and makes compiler happy, too!

master
roker 3 months ago
parent
commit
6e1f680ec5
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      test/unittest_nfc.cc

+ 4
- 4
test/unittest_nfc.cc View File

@ -9,10 +9,10 @@ namespace {
struct TestEntry
{
std::string input;
string_view input;
bool is_nfc;
IsNFC quick;
std::string nfc;
string_view nfc;
};
typedef TestEntry TE;
@ -46,8 +46,8 @@ const std::vector<TestEntry> testValues =
{ "a\xcc\x85\xcc\xbc", false, IsNFC::No , "a\xcc\xbc\xcc\x85"}, // a + <U+0305> + <U+033C> (overline + seagull_below)
{ "a\xcc\xbc\xcc\x85", true, IsNFC::Yes , "a\xcc\xbc\xcc\x85"}, // a + <U+033C> + <U+0305> (seagull_below + overline)
{ std::string(nullo, nullo+1), true, IsNFC::Yes, std::string(nullo, nullo+1) }, // Yeah, 1 NUL byte
{ std::string(nullo, nullo+4), true, IsNFC::Yes, std::string(nullo, nullo+4) }, // Yeah, 4 NUL bytes
{ string_view(nullo, 1), true, IsNFC::Yes, string_view(nullo, 1) }, // Yeah, 1 NUL byte
{ string_view(nullo, 4), true, IsNFC::Yes, string_view(nullo, 4) }, // Yeah, 4 NUL bytes
{ "EOF", true, IsNFC::Yes, "EOF" }
};


Loading…
Cancel
Save