Skip to content

Commit

Permalink
fix compil c
Browse files Browse the repository at this point in the history
  • Loading branch information
bha-evs committed Nov 23, 2023
1 parent 6e2798e commit a235bf0
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 5 deletions.
9 changes: 5 additions & 4 deletions tests/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#else
#include <malloc.h>
#endif

#if 0
//#include "asio.hpp"
#include <bofstd/bofsocketio.h>
Expand Down Expand Up @@ -141,6 +141,7 @@ int main(int argc, char *argv[])

// Use these one
//::testing::GTEST_FLAG(filter) = "SockIo_Test.*";
//::testing::GTEST_FLAG(filter) = "JsonParser_Test.*";
//::testing::GTEST_FLAG(filter) = "JsonParser_Test.*:XmlWriter_Test.*";
//::testing::GTEST_FLAG(filter) = "CmdLineParser_Test.*:U7ri_Test.*";
//::testing::GTEST_FLAG(filter) = "Threading_Test.MultiThreadWithoutMutex";
Expand Down Expand Up @@ -176,11 +177,11 @@ int main(int argc, char *argv[])
YOU HAVE 3 DISABLED TESTS
LINUX:
[==========] 189 tests from 48 test suites ran. (60706 ms total)
[ PASSED ] 189 tests.
[==========] 170 tests from 43 test suites ran. (45271 ms total)
[ PASSED ] 170 tests.
YOU HAVE 3 DISABLED TESTS
YOU HAVE 6 DISABLED TESTS
need to launch test with
su
Expand Down
2 changes: 1 addition & 1 deletion tests/src/ut_async.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ TEST(Async_Test, OverloadCommandQueue)
Command_X.Name_S = "Cmd";
Command_X.Cmd = a;
Start_U32 = Bof_GetMsTickCount();
for (i_U32 = 0; i_U32 < 10; i_U32++)
for (i_U32 = 0; i_U32 < 100; i_U32++)
{
CmdQ.PostCommand(false, Command_X);
}
Expand Down
18 changes: 18 additions & 0 deletions tests/src/ut_fs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ TEST(Fs_Test, DirectoryManagement)

#if defined(_WIN32)
#else
std::string Cwd_S;
BOF::Bof_GetCurrentDirectory(Cwd_S);
EXPECT_EQ(Bof_SetCurrentDirectory("/tmp/"), BOF_ERR_NO_ERROR);
#endif
Sts_E = Bof_GetCurrentDirectory(CrtDir);
Expand Down Expand Up @@ -186,6 +188,10 @@ TEST(Fs_Test, DirectoryManagement)

Sts_E = Bof_CleanupDirectory(true, NewPath, true);
EXPECT_EQ(Sts_E, BOF_ERR_NO_ERROR);
#if defined(_WIN32)
#else
EXPECT_EQ(BOF::Bof_SetCurrentDirectory(Cwd_S), BOF_ERR_NO_ERROR);
#endif
}

TEST(Fs_Test, FileManagement)
Expand All @@ -201,6 +207,8 @@ TEST(Fs_Test, FileManagement)

#if defined(_WIN32)
#else
std::string Cwd_S;
BOF::Bof_GetCurrentDirectory(Cwd_S);
EXPECT_EQ(Bof_SetCurrentDirectory("/tmp/"), BOF_ERR_NO_ERROR);
#endif
Sts_E = Bof_GetCurrentDirectory(CrtDir);
Expand Down Expand Up @@ -338,6 +346,10 @@ TEST(Fs_Test, FileManagement)

Sts_E = Bof_CleanupDirectory(true, NewPath, true);
EXPECT_EQ(Sts_E, BOF_ERR_NO_ERROR);
#if defined(_WIN32)
#else
EXPECT_EQ(BOF::Bof_SetCurrentDirectory(Cwd_S), BOF_ERR_NO_ERROR);
#endif
}

TEST(Fs_Test, EntireFile)
Expand All @@ -352,6 +364,8 @@ TEST(Fs_Test, EntireFile)

#if defined(_WIN32)
#else
std::string Cwd_S;
BOF::Bof_GetCurrentDirectory(Cwd_S);
EXPECT_EQ(Bof_SetCurrentDirectory("/tmp/"), BOF_ERR_NO_ERROR);
#endif
Sts_E = Bof_GetCurrentDirectory(CrtDir);
Expand All @@ -367,6 +381,10 @@ TEST(Fs_Test, EntireFile)
EXPECT_EQ(Bof_ReadLine(Path, LineRead_S), BOF_ERR_NO_ERROR);
Line_S = Line_S + Line_S;
EXPECT_STREQ(LineRead_S.c_str(), Line_S.c_str());
#if defined(_WIN32)
#else
EXPECT_EQ(BOF::Bof_SetCurrentDirectory(Cwd_S), BOF_ERR_NO_ERROR);
#endif
}
TEST(Fs_Test, FileLayout)
{
Expand Down

0 comments on commit a235bf0

Please sign in to comment.