Added updated docstrings

This commit is contained in:
Alejandro Saucedo 2020-08-28 18:39:58 +01:00
parent 85f43c5c8e
commit 6fb99c089b
10 changed files with 334 additions and 72 deletions

26
test/TestSequence.cpp Normal file
View file

@ -0,0 +1,26 @@
#include "catch2/catch.hpp"
#include "kompute/Kompute.hpp"
TEST_CASE("Sequence begin end recording should work as expected") {
kp::Manager mgr;
std::weak_ptr<kp::Sequence> sqWeakPtr =
mgr.getOrCreateManagedSequence("newSequence");
if (std::shared_ptr<kp::Sequence> sq = sqWeakPtr.lock()) {
REQUIRE(sq->eval());
REQUIRE(!sq->isRecording());
REQUIRE(sq->begin());
REQUIRE(sq->isRecording());
REQUIRE(!sq->begin());
REQUIRE(sq->isRecording());
REQUIRE(sq->end());
REQUIRE(!sq->isRecording());
REQUIRE(!sq->end());
REQUIRE(!sq->isRecording());
REQUIRE(sq->eval());
}
}