MCPcopy Create free account
hub / github.com/KomputeProject/kompute / TEST

Function TEST

test/TestOpTensorCreate.cpp:8–24  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6#include "kompute/logger/Logger.hpp"
7
8TEST(TestOpTensorCreate, CreateSingleTensorSingleOp)
9{
10 std::vector<float> testVecA{ 9, 8, 7 };
11 std::shared_ptr<kp::TensorT<float>> tensorA = nullptr;
12
13 {
14 kp::Manager mgr;
15
16 tensorA = mgr.tensor(testVecA);
17
18 EXPECT_TRUE(tensorA->isInit());
19
20 EXPECT_EQ(tensorA->vector(), testVecA);
21 }
22
23 EXPECT_FALSE(tensorA->isInit());
24}
25
26TEST(TestOpTensorCreate, NoErrorIfTensorFreedBefore)
27{

Callers

nothing calls this directly

Calls 4

tensorMethod · 0.80
isInitMethod · 0.45
vectorMethod · 0.45
destroyMethod · 0.45

Tested by

no test coverage detected