File: test_async.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-- 307 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/async.h"

using rkcommon::tasking::async;

TEST_CASE("async", "[async]")
{
  auto future  = async([=]() { return 1; });
  int retvalue = future.get();
  REQUIRE(retvalue == 1);
}