You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
343 B

#include <cxxtest/TestSuite.h>
#include "ScopedLock.hpp"
#include "test_Common.hpp"
class TestScopedLock : public CxxTest::TestSuite
{
public:
void testBasic( void )
{
TEST_HEADER;
Mutex m;
{
ScopedLock sl(m);
TS_ASSERT_EQUALS ( m.tryLock(0), EBUSY );
}
TS_ASSERT_EQUALS ( m.tryLock(0), 0 );
}
};