test_Vector.cpp 298 字节
Newer Older
Y
Yu Yang 已提交
1 2 3 4 5 6 7 8 9 10 11
#include "PaddleCAPI.h"
#include "gtest/gtest.h"

TEST(CAPIVector, create) {
  PD_Vector tmp;
  ASSERT_EQ(PD_NO_ERROR, PDVecCreate(&tmp, 128, false));
  bool isSparse;
  ASSERT_EQ(PD_NO_ERROR, PDVecIsSparse(tmp, &isSparse));
  ASSERT_FALSE(isSparse);
  ASSERT_EQ(PD_NO_ERROR, PDVecDestroy(tmp));
}