mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-20 05:13:58 +00:00
Format all C++ and Java code via clang-format
Signed-off-by: Konstantin Pastbin <konstantin.pastbin@gmail.com>
This commit is contained in:
@@ -6,26 +6,26 @@ static bool b = false;
|
||||
|
||||
void SetB()
|
||||
{
|
||||
b = true;
|
||||
b = true;
|
||||
}
|
||||
|
||||
UNIT_TEST(ScopeGuard)
|
||||
{
|
||||
{
|
||||
b = false;
|
||||
SCOPE_GUARD(guard, &SetB);
|
||||
TEST_EQUAL(b, false, ("Start test condition"));
|
||||
}
|
||||
TEST_EQUAL(b, true, ("scope_guard works in destructor"));
|
||||
{
|
||||
b = false;
|
||||
SCOPE_GUARD(guard, &SetB);
|
||||
TEST_EQUAL(b, false, ("Start test condition"));
|
||||
}
|
||||
TEST_EQUAL(b, true, ("scope_guard works in destructor"));
|
||||
}
|
||||
|
||||
UNIT_TEST(ScopeGuardRelease)
|
||||
{
|
||||
{
|
||||
b = false;
|
||||
SCOPE_GUARD(guard, &SetB);
|
||||
TEST_EQUAL(b, false, ("Start test condition"));
|
||||
guard.release();
|
||||
}
|
||||
TEST_EQUAL(b, false, ("If relese() was called then scope_guard shouldn't work"));
|
||||
{
|
||||
b = false;
|
||||
SCOPE_GUARD(guard, &SetB);
|
||||
TEST_EQUAL(b, false, ("Start test condition"));
|
||||
guard.release();
|
||||
}
|
||||
TEST_EQUAL(b, false, ("If relese() was called then scope_guard shouldn't work"));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user