MCPcopy Create free account
hub / github.com/FastLED/FastLED / FL_TEST_FILE

Function FL_TEST_FILE

tests/fl/stl/mutex.cpp:6–23  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4#include "platforms/stub/mutex_stub_stl.h"
5
6FL_TEST_FILE(FL_FILEPATH) {
7
8
9FL_TEST_CASE("Mutex reentrant") {
10 // Tests that the lock can be acquired multiple times by the same thread.
11 {
12 fl::recursive_mutex m;
13 fl::unique_lock<fl::recursive_mutex> lock(m);
14 {
15 // This should succeed with recursive_mutex
16 bool acquired_recursively = m.try_lock();
17 FL_CHECK_EQ(acquired_recursively, true);
18 m.unlock();
19 }
20 }
21}
22
23} // FL_TEST_FILE

Callers

nothing calls this directly

Calls 2

try_lockMethod · 0.45
unlockMethod · 0.45

Tested by

no test coverage detected