TEST_REGISTER macro is main function. The end semicolon with the macro is unnecessary. Signed-off-by: Hirokazu Honda <hiroh@chromium.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
33 lines
532 B
C++
33 lines
532 B
C++
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
/*
|
|
* Copyright (C) 2019, Google Inc.
|
|
*
|
|
* media_device_acquire.cpp- Test acquire/release of a MediaDevice
|
|
*/
|
|
|
|
#include "media_device_test.h"
|
|
|
|
using namespace libcamera;
|
|
|
|
class MediaDeviceAcquire : public MediaDeviceTest
|
|
{
|
|
int run()
|
|
{
|
|
if (!media_->acquire())
|
|
return TestFail;
|
|
|
|
if (media_->acquire())
|
|
return TestFail;
|
|
|
|
media_->release();
|
|
|
|
if (!media_->acquire())
|
|
return TestFail;
|
|
|
|
media_->release();
|
|
|
|
return TestPass;
|
|
}
|
|
};
|
|
|
|
TEST_REGISTER(MediaDeviceAcquire)
|