mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Improve the coverage for HTTP error response.
This commit is contained in:
parent
474266eae7
commit
8c10c26f00
6 changed files with 141 additions and 8 deletions
|
@ -35,8 +35,10 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
|
||||
#include "gtest/gtest.h"
|
||||
#include <string>
|
||||
using namespace std;
|
||||
|
||||
#include <srs_app_log.hpp>
|
||||
#include <srs_kernel_stream.hpp>
|
||||
|
||||
// we add an empty macro for upp to show the smart tips.
|
||||
#define VOID
|
||||
|
@ -61,6 +63,10 @@ extern srs_utime_t _srs_tmp_timeout;
|
|||
#define HELPER_ARRAY_INIT(buf, sz, val) \
|
||||
for (int i = 0; i < (int)sz; i++) (buf)[i]=val
|
||||
|
||||
// Dump simple stream to string.
|
||||
#define HELPER_BUFFER2STR(io) \
|
||||
string((const char*)(io)->bytes(), (size_t)(io)->length())
|
||||
|
||||
// the asserts of gtest:
|
||||
// * {ASSERT|EXPECT}_EQ(expected, actual): Tests that expected == actual
|
||||
// * {ASSERT|EXPECT}_NE(v1, v2): Tests that v1 != v2
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue