Skip to content

Commit

Permalink
Development/namespaces (#1695)
Browse files Browse the repository at this point in the history
* [Tests/init/core] : Separate 'tests' from 'core' namespaces.

Initial changes by mostly search and replace.

* [Tests/unit/core] : partially revert '8a3fe02b8a9f3ff7c3672942d2ee906115420956' to include 'test_messageException'

* [Tests/unit / Tests/unit/core] : Do not depend on 'IPTestAdministrator' if it not used

* [Tests/unit/core] : Make explicit global namespace lookup

* [DOC] Singletons section (#1540)

* singleton section added

* singletons documentation section added

* singletons.md added to mkdocs.yml

* warning fixed

* formating fix

* singletons description addded

* [doc] description of singletons added

* Update singletons.md

---------

Co-authored-by: MFransen69 <[email protected]>

* [Actions] Adding process containers with runC backend to be built in the Linux workflow (#1655)

* Fixing warnings in RunC process containers

* Adding containers to Actions

* Removing PROCESSCONTAINERS_CLIB option as it was the same as RunC

* Temporarily using a template from development to test the changes

* Using sizeof to get the size of a buffer instead of a fixed value which did not match the buffer size on top of that

* Changing back to use template from master

* [Tests/unit/core] : more use of full nested namespaces

* [Tests/unit/core] : remove 'using' in 'test_hash'

* Revert "[Tests/unit / Tests/unit/core] : Do not depend on 'IPTestAdministrator' if it not used"

This reverts commit 7ac0335.

* [Tests/unit/tests] : align namespace usage for 'test_iptestadministrator'

---------

Co-authored-by: Piotr Czekaj <[email protected]>
Co-authored-by: MFransen69 <[email protected]>
Co-authored-by: Mateusz Daniluk <[email protected]>
  • Loading branch information
4 people authored Jul 16, 2024
1 parent 06ec486 commit 483d074
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 23 deletions.
2 changes: 1 addition & 1 deletion Tests/unit/core/test_hex2strserialization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,4 +92,4 @@ namespace Core {

} // Core
} // Tests
} // Thunder
} // Thunder
2 changes: 1 addition & 1 deletion Tests/unit/core/test_library.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

namespace Thunder {
namespace Tests {
namespace Core {
namespace Core {

TEST(Core_Library, simpleSet)
{
Expand Down
3 changes: 1 addition & 2 deletions Tests/unit/core/test_message_dispatcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,6 @@ namespace Core {
{
uint8_t testData[2] = { 13, 37 };
ASSERT_EQ(_dispatcher->PushData(sizeof(testData), testData), ::Thunder::Core::ERROR_NONE);
// The 'ring' is implicit
// _dispatcher->Ring();
}
}

Expand Down Expand Up @@ -313,6 +311,7 @@ namespace Core {
EXPECT_EQ(readData[0], testData2[0]);
EXPECT_EQ(readData[3], testData2[3]);
}

} // Core
} // Tests
} // Thunder
2 changes: 1 addition & 1 deletion Tests/unit/core/test_message_unit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -581,4 +581,4 @@ namespace Core {

} // Core
} // Tests
} // Thunder
} // Thunder
2 changes: 1 addition & 1 deletion Tests/unit/core/test_synchronous.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,4 +195,4 @@ namespace Core {

} // Core
} // Tests
} // Thunder
} // Thunder
3 changes: 0 additions & 3 deletions Tests/unit/core/test_threadpool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,6 @@ namespace Thunder {
namespace Tests {
namespace Core {




static constexpr uint32_t MaxJobWaitTime = 1000; // In milliseconds
static constexpr uint8_t MaxAdditionalWorker = 5;

Expand Down
2 changes: 1 addition & 1 deletion Tests/unit/core/test_tracing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -356,4 +356,4 @@ namespace Core {

} // Core
} // Tests
} // Thunder
} // Thunder
39 changes: 26 additions & 13 deletions Tests/unit/tests/test_iptestmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,37 @@
* limitations under the License.
*/

#include <gtest/gtest.h>

#ifndef MODULE_NAME
#include "../Module.h"
#endif

#include <core/core.h>

#include "../IPTestAdministrator.h"

#include <gtest/gtest.h>
namespace Thunder {
namespace Tests {
namespace Core {

TEST(Test_IPTestAdministrator, sync)
{
IPTestAdministrator::OtherSideMain otherSide = [](IPTestAdministrator & testAdmin) {
testAdmin.Sync("str01");
TEST(Test_IPTestAdministrator, sync)
{
IPTestAdministrator::OtherSideMain otherSide = [](IPTestAdministrator & testAdmin) {
testAdmin.Sync("str01");

testAdmin.Sync("str02_a");
};
testAdmin.Sync("str02_a");
};

IPTestAdministrator testAdmin(otherSide);
IPTestAdministrator testAdmin(otherSide);

bool result = testAdmin.Sync("str01");
ASSERT_TRUE(result);
bool result = testAdmin.Sync("str01");
ASSERT_TRUE(result);

result = testAdmin.Sync("str02_b");
ASSERT_FALSE(result);
}
result = testAdmin.Sync("str02_b");
ASSERT_FALSE(result);
}

} // Core
} // Tests
} // Thunder

0 comments on commit 483d074

Please sign in to comment.