本文整理汇总了C++中EXPECT_ERROREQ函数的典型用法代码示例。如果您正苦于以下问题:C++ EXPECT_ERROREQ函数的具体用法?C++ EXPECT_ERROREQ怎么用?C++ EXPECT_ERROREQ使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了EXPECT_ERROREQ函数的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: TEST
TEST(WideToUtf8, InvalidData)
{
int32_t errors = UTF8_ERR_NONE;
EXPECT_EQ(0, widetoutf8(nullptr, sizeof(wchar_t), nullptr, 1, &errors));
EXPECT_ERROREQ(UTF8_ERR_INVALID_DATA, errors);
}
示例2: TEST
TEST(CaseMappingInitialize, Initialize)
{
CaseMappingState state;
const char* i = "Greetings";
size_t is = strlen(i);
char o[256] = { 0 };
size_t os = 255;
int32_t errors = UTF8_ERR_NONE;
EXPECT_TRUE(casemapping_initialize(&state, i, is, o, os, TitlecaseIndex1Ptr, TitlecaseIndex2Ptr, TitlecaseDataPtr, QuickCheckCaseMapped_Titlecase, UTF8_LOCALE_DEFAULT, &errors));
EXPECT_ERROREQ(UTF8_ERR_NONE, errors);
EXPECT_EQ(i, state.src);
EXPECT_EQ(is, state.src_size);
EXPECT_EQ(o, state.dst);
EXPECT_EQ(os, state.dst_size);
EXPECT_EQ(TitlecaseIndex1Ptr, state.property_index1);
EXPECT_EQ(TitlecaseIndex2Ptr, state.property_index2);
EXPECT_EQ(TitlecaseDataPtr, state.property_data);
EXPECT_LOCALE_EQ(UTF8_LOCALE_DEFAULT, state.locale);
EXPECT_EQ(QuickCheckCaseMapped_Titlecase, state.quickcheck_flags);
EXPECT_EQ(0, state.total_bytes_needed);
EXPECT_EQ(0, state.last_code_point);
EXPECT_EQ(0, state.last_code_point_size);
EXPECT_EQ(0, state.last_general_category);
EXPECT_EQ(0, state.last_canonical_combining_class);
}
示例3: TEST_F
TEST_F(Utf8ToLowerTurkish, SingleCapitalLetterIAmountOfBytes)
{
const char* c = "I";
int32_t errors = UTF8_ERR_NONE;
EXPECT_EQ(2, utf8tolower(c, strlen(c), nullptr, 0, &errors));
EXPECT_ERROREQ(UTF8_ERR_NONE, errors);
}
示例4: TEST_F
TEST_F(Utf8ToLowerGreek, SentenceSmallLetterSigmaAmountOfBytes)
{
const char* c = "\xCE\xB5\xCE\xBD\xCE\xB8\xCF\x83 \xCF\x85\xCF\x84";
int32_t errors = UTF8_ERR_NONE;
EXPECT_EQ(13, utf8tolower(c, strlen(c), nullptr, 0, &errors));
EXPECT_ERROREQ(UTF8_ERR_NONE, errors);
}
开发者ID:Institute-Web-Science-and-Technologies,项目名称:GazeTheWeb,代码行数:8,代码来源:suite-utf8-tolower-greek.cpp
示例5: TEST_F
TEST_F(Utf8ToTitleTurkish, SingleCapitalLetterIAndDotAboveAmountOfBytes)
{
const char* c = "I\xCC\x87";
int32_t errors = UTF8_ERR_NONE;
EXPECT_EQ(3, utf8totitle(c, strlen(c), nullptr, 0, &errors));
EXPECT_ERROREQ(UTF8_ERR_NONE, errors);
}
示例6: TEST
TEST(Utf8Normalize, InvalidFlagAndInvalidData)
{
char o[256] = { 0 };
size_t os = 255;
int32_t errors = UTF8_ERR_NONE;
EXPECT_EQ(0, utf8normalize(nullptr, 166, o, os, 0x00001B28, &errors));
EXPECT_UTF8EQ("", o);
EXPECT_ERROREQ(UTF8_ERR_INVALID_FLAG, errors);
}