本文整理汇总了C++中testing::EndsWith方法的典型用法代码示例。如果您正苦于以下问题:C++ testing::EndsWith方法的具体用法?C++ testing::EndsWith怎么用?C++ testing::EndsWith使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类testing
的用法示例。
在下文中一共展示了testing::EndsWith方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: validateDeleteHttpRequest
http::Response validateDeleteHttpRequest(const http::Request& request)
{
EXPECT_EQ("DELETE", request.method);
EXPECT_THAT(request.url.path, EndsWith("request"));
EXPECT_TRUE(request.body.empty());
EXPECT_TRUE(request.url.query.empty());
return http::OK();
}
示例2: validatePost
http::Response validatePost(const http::Request& request)
{
EXPECT_EQ("POST", request.method);
EXPECT_THAT(request.url.path, EndsWith("post"));
EXPECT_EQ("This is the payload.", request.body);
EXPECT_NONE(request.url.fragment);
EXPECT_TRUE(request.url.query.empty());
return http::OK();
}
示例3: validateGetWithoutQuery
http::Response validateGetWithoutQuery(const http::Request& request)
{
EXPECT_EQ("GET", request.method);
EXPECT_THAT(request.path, EndsWith("get"));
EXPECT_EQ("", request.body);
EXPECT_EQ("", request.fragment);
EXPECT_TRUE(request.query.empty());
return http::OK();
}
示例4: validateGetWithoutQuery
http::Response validateGetWithoutQuery(const http::Request& request)
{
EXPECT_NE(process::address(), request.client);
EXPECT_EQ("GET", request.method);
EXPECT_THAT(request.url.path, EndsWith("get"));
EXPECT_EQ("", request.body);
EXPECT_NONE(request.url.fragment);
EXPECT_TRUE(request.url.query.empty());
return http::OK();
}
示例5: validateGetWithQuery
http::Response validateGetWithQuery(const http::Request& request)
{
EXPECT_EQ("GET", request.method);
EXPECT_THAT(request.path, EndsWith("get"));
EXPECT_EQ("", request.body);
EXPECT_EQ("", request.fragment);
EXPECT_EQ("bar", request.query.at("foo"));
EXPECT_EQ(1, request.query.size());
return http::OK();
}
示例6: HasSubstr
TEST_F(SndFileAudioFileReaderTest, shouldReportErrorIfNotAWavFile)
{
const char* filename = "../test/data/test_file_stereo.mp3";
bool result = reader_.open(filename);
ASSERT_FALSE(result);
std::string str = error.str();
ASSERT_THAT(str, HasSubstr(filename));
ASSERT_THAT(str, EndsWith("\n"));
}
示例7: StartsWith
TEST_F(GdImageRendererTest, shouldReportErrorIfScaleIsTooHigh)
{
buffer_.setSampleRate(50000);
buffer_.setSamplesPerPixel(2000001);
const WaveformColors& colors = audacityWaveformColors;
bool result = renderer_.create(buffer_, 5.0, 800, 250, colors, true);
ASSERT_FALSE(result);
ASSERT_TRUE(output.str().empty());
std::string str = error.str();
ASSERT_THAT(str, StartsWith("Invalid zoom"));
ASSERT_THAT(str, EndsWith("\n"));
}