File: test_AsyncTask.cpp

package info (click to toggle)
rkcommon 1.14.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,304 kB
  • sloc: cpp: 33,504; sh: 31; makefile: 13
file content (15 lines) | stat: -rw-r--r-- 322 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Copyright 2009 Intel Corporation
// SPDX-License-Identifier: Apache-2.0

#include "../catch.hpp"

#include "rkcommon/tasking/AsyncTask.h"

using rkcommon::tasking::AsyncTask;

TEST_CASE("AsyncTask", "[AsyncTask]")
{
  AsyncTask<float> t([=]() { return 1.f; });
  float retValue = t.get();
  REQUIRE(retValue == 1.f);
}