mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Refactor macro SRS_AUTO_XXX to SRS_XXX.
This commit is contained in:
parent
2fe1874a87
commit
ed338f4c0a
31 changed files with 193 additions and 198 deletions
|
@ -41,25 +41,25 @@ VOID TEST(CoreAutoFreeTest, Free)
|
|||
|
||||
VOID TEST(CoreMacroseTest, Check)
|
||||
{
|
||||
#ifndef SRS_AUTO_BUILD_TS
|
||||
#ifndef SRS_BUILD_TS
|
||||
EXPECT_TRUE(false);
|
||||
#endif
|
||||
#ifndef SRS_AUTO_BUILD_DATE
|
||||
#ifndef SRS_BUILD_DATE
|
||||
EXPECT_TRUE(false);
|
||||
#endif
|
||||
#ifndef SRS_AUTO_UNAME
|
||||
#ifndef SRS_UNAME
|
||||
EXPECT_TRUE(false);
|
||||
#endif
|
||||
#ifndef SRS_AUTO_USER_CONFIGURE
|
||||
#ifndef SRS_USER_CONFIGURE
|
||||
EXPECT_TRUE(false);
|
||||
#endif
|
||||
#ifndef SRS_AUTO_CONFIGURE
|
||||
#ifndef SRS_CONFIGURE
|
||||
EXPECT_TRUE(false);
|
||||
#endif
|
||||
#ifndef SRS_AUTO_PREFIX
|
||||
#ifndef SRS_PREFIX
|
||||
EXPECT_TRUE(false);
|
||||
#endif
|
||||
#ifndef SRS_AUTO_CONSTRIBUTORS
|
||||
#ifndef SRS_CONSTRIBUTORS
|
||||
EXPECT_TRUE(false);
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -3843,7 +3843,7 @@ VOID TEST(KernelFileWriterTest, WriteSpecialCase)
|
|||
|
||||
off_t seeked = 0;
|
||||
HELPER_EXPECT_SUCCESS(f.lseek(0, SEEK_CUR, &seeked));
|
||||
#ifdef SRS_AUTO_OSX
|
||||
#ifdef SRS_OSX
|
||||
EXPECT_EQ(10, seeked);
|
||||
#else
|
||||
EXPECT_EQ(0, seeked);
|
||||
|
@ -4212,7 +4212,7 @@ VOID TEST(KernelUtilityTest, CoverBitsBufferAll)
|
|||
}
|
||||
}
|
||||
|
||||
#ifndef SRS_AUTO_OSX
|
||||
#ifndef SRS_OSX
|
||||
extern _srs_gettimeofday_t _srs_gettimeofday;
|
||||
int mock_gettimeofday(struct timeval* /*tp*/, struct timezone* /*tzp*/) {
|
||||
return -1;
|
||||
|
|
|
@ -124,7 +124,7 @@ VOID TEST(TCPServerTest, PingPong)
|
|||
|
||||
SrsStSocket skt;
|
||||
srs_usleep(100 * SRS_UTIME_MILLISECONDS);
|
||||
#ifdef SRS_AUTO_OSX
|
||||
#ifdef SRS_OSX
|
||||
ASSERT_TRUE(h.fd != NULL);
|
||||
#endif
|
||||
HELPER_EXPECT_SUCCESS(skt.initialize(h.fd));
|
||||
|
@ -146,7 +146,7 @@ VOID TEST(TCPServerTest, PingPong)
|
|||
|
||||
SrsStSocket skt;
|
||||
srs_usleep(100 * SRS_UTIME_MILLISECONDS);
|
||||
#ifdef SRS_AUTO_OSX
|
||||
#ifdef SRS_OSX
|
||||
ASSERT_TRUE(h.fd != NULL);
|
||||
#endif
|
||||
HELPER_EXPECT_SUCCESS(skt.initialize(h.fd));
|
||||
|
@ -170,7 +170,7 @@ VOID TEST(TCPServerTest, PingPong)
|
|||
|
||||
SrsStSocket skt;
|
||||
srs_usleep(100 * SRS_UTIME_MILLISECONDS);
|
||||
#ifdef SRS_AUTO_OSX
|
||||
#ifdef SRS_OSX
|
||||
ASSERT_TRUE(h.fd != NULL);
|
||||
#endif
|
||||
HELPER_EXPECT_SUCCESS(skt.initialize(h.fd));
|
||||
|
@ -205,7 +205,7 @@ VOID TEST(TCPServerTest, PingPongWithTimeout)
|
|||
|
||||
SrsStSocket skt;
|
||||
srs_usleep(100 * SRS_UTIME_MILLISECONDS);
|
||||
#ifdef SRS_AUTO_OSX
|
||||
#ifdef SRS_OSX
|
||||
ASSERT_TRUE(h.fd != NULL);
|
||||
#endif
|
||||
HELPER_EXPECT_SUCCESS(skt.initialize(h.fd));
|
||||
|
@ -227,7 +227,7 @@ VOID TEST(TCPServerTest, PingPongWithTimeout)
|
|||
|
||||
SrsStSocket skt;
|
||||
srs_usleep(100 * SRS_UTIME_MILLISECONDS);
|
||||
#ifdef SRS_AUTO_OSX
|
||||
#ifdef SRS_OSX
|
||||
ASSERT_TRUE(h.fd != NULL);
|
||||
#endif
|
||||
HELPER_EXPECT_SUCCESS(skt.initialize(h.fd));
|
||||
|
@ -249,7 +249,7 @@ VOID TEST(TCPServerTest, PingPongWithTimeout)
|
|||
|
||||
SrsStSocket skt;
|
||||
srs_usleep(100 * SRS_UTIME_MILLISECONDS);
|
||||
#ifdef SRS_AUTO_OSX
|
||||
#ifdef SRS_OSX
|
||||
ASSERT_TRUE(h.fd != NULL);
|
||||
#endif
|
||||
HELPER_EXPECT_SUCCESS(skt.initialize(h.fd));
|
||||
|
@ -382,7 +382,7 @@ VOID TEST(TCPServerTest, StringIsHex)
|
|||
char* str = (char*)"!1234567890";
|
||||
char* parsed = str; errno = 0;
|
||||
EXPECT_EQ(0x0, ::strtol(str, &parsed, 16));
|
||||
#ifndef SRS_AUTO_OSX
|
||||
#ifndef SRS_OSX
|
||||
EXPECT_EQ(0, errno);
|
||||
#endif
|
||||
EXPECT_EQ(str, parsed);
|
||||
|
@ -400,7 +400,7 @@ VOID TEST(TCPServerTest, StringIsHex)
|
|||
char* str = (char*)"";
|
||||
char* parsed = str; errno = 0;
|
||||
EXPECT_EQ(0x0, ::strtol(str, &parsed, 16));
|
||||
#ifndef SRS_AUTO_OSX
|
||||
#ifndef SRS_OSX
|
||||
EXPECT_EQ(0, errno);
|
||||
#endif
|
||||
EXPECT_EQ(str, parsed);
|
||||
|
@ -429,7 +429,7 @@ VOID TEST(TCPServerTest, WritevIOVC)
|
|||
|
||||
SrsStSocket skt;
|
||||
srs_usleep(100 * SRS_UTIME_MILLISECONDS);
|
||||
#ifdef SRS_AUTO_OSX
|
||||
#ifdef SRS_OSX
|
||||
ASSERT_TRUE(h.fd != NULL);
|
||||
#endif
|
||||
HELPER_EXPECT_SUCCESS(skt.initialize(h.fd));
|
||||
|
@ -459,7 +459,7 @@ VOID TEST(TCPServerTest, WritevIOVC)
|
|||
|
||||
SrsStSocket skt;
|
||||
srs_usleep(100 * SRS_UTIME_MILLISECONDS);
|
||||
#ifdef SRS_AUTO_OSX
|
||||
#ifdef SRS_OSX
|
||||
ASSERT_TRUE(h.fd != NULL);
|
||||
#endif
|
||||
HELPER_EXPECT_SUCCESS(skt.initialize(h.fd));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue