mirror of
https://github.com/nomic-ai/kompute.git
synced 2026-05-11 08:59:59 +00:00
27 lines
702 B
C++
27 lines
702 B
C++
|
|
#include "gtest/gtest.h"
|
|
|
|
#include "kompute/Kompute.hpp"
|
|
|
|
TEST(TestSequence, CmdBufSequenceBeginEnd) {
|
|
kp::Manager mgr;
|
|
|
|
std::weak_ptr<kp::Sequence> sqWeakPtr =
|
|
mgr.getOrCreateManagedSequence("newSequence");
|
|
|
|
if (std::shared_ptr<kp::Sequence> sq = sqWeakPtr.lock()) {
|
|
EXPECT_TRUE(sq->eval());
|
|
EXPECT_TRUE(!sq->isRecording());
|
|
EXPECT_TRUE(sq->begin());
|
|
EXPECT_TRUE(sq->isRecording());
|
|
EXPECT_TRUE(!sq->begin());
|
|
EXPECT_TRUE(sq->isRecording());
|
|
EXPECT_TRUE(sq->end());
|
|
EXPECT_TRUE(!sq->isRecording());
|
|
EXPECT_TRUE(!sq->end());
|
|
EXPECT_TRUE(!sq->isRecording());
|
|
EXPECT_TRUE(sq->eval());
|
|
}
|
|
}
|
|
|