summaryrefslogtreecommitdiff
path: root/tools/slang-unit-test/unit-test-lock-file.cpp
diff options
context:
space:
mode:
authorEllie Hermaszewska <ellieh@nvidia.com>2024-10-29 14:49:26 +0800
committerGitHub <noreply@github.com>2024-10-29 14:49:26 +0800
commitf65d756bff8d4c5cbc15bd0322a2ae8e6b896a21 (patch)
treeea1d61342cd29368e19135000ec2948813096205 /tools/slang-unit-test/unit-test-lock-file.cpp
parenta729c15e9dce9f5116a38afc66329ab2ca4cea54 (diff)
format
* format * Minor test fixes * enable checking cpp format in ci
Diffstat (limited to 'tools/slang-unit-test/unit-test-lock-file.cpp')
-rw-r--r--tools/slang-unit-test/unit-test-lock-file.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/tools/slang-unit-test/unit-test-lock-file.cpp b/tools/slang-unit-test/unit-test-lock-file.cpp
index 4915770fe..5ef9fa036 100644
--- a/tools/slang-unit-test/unit-test-lock-file.cpp
+++ b/tools/slang-unit-test/unit-test-lock-file.cpp
@@ -1,8 +1,7 @@
// unit-test-lock-file.cpp
-#include "tools/unit-test/slang-unit-test.h"
-
#include "../../source/core/slang-io.h"
#include "../../source/core/slang-process.h"
+#include "tools/unit-test/slang-unit-test.h"
#include <atomic>
#include <future>
@@ -11,7 +10,9 @@
using namespace Slang;
-static const String fileName = Path::simplify(Path::getParentDirectory(Path::getExecutablePath()) + "/test_lock_file" + String(Process::getId()));
+static const String fileName = Path::simplify(
+ Path::getParentDirectory(Path::getExecutablePath()) + "/test_lock_file" +
+ String(Process::getId()));
SLANG_UNIT_TEST(lockFileOpenClose)
{
@@ -86,8 +87,8 @@ SLANG_UNIT_TEST(lockFileSync)
SLANG_CHECK(lockFile2.tryLock(LockFile::LockType::Exclusive) == SLANG_E_TIME_OUT);
// Start a number of threads and wait for them to start up.
- // Each thread immediately tries to acquire the lock in non-blocking mode (expected to fail).
- // Next each thread acquires the lock in blocking mode.
+ // Each thread immediately tries to acquire the lock in non-blocking mode (expected to
+ // fail). Next each thread acquires the lock in blocking mode.
std::vector<LockTask> tasks(32);
for (auto& task : tasks)
{