MCPcopy Create free account
hub / github.com/arrayfire/arrayfire / TEST

Function TEST

test/array.cpp:31–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29TYPED_TEST_SUITE(Array, TestTypes);
30
31TEST(Array, ConstructorDefault) {
32 array a;
33 EXPECT_EQ(0u, a.numdims());
34 EXPECT_EQ(dim_t(0), a.dims(0));
35 EXPECT_EQ(dim_t(0), a.elements());
36 EXPECT_EQ(f32, a.type());
37 EXPECT_EQ(0u, a.bytes());
38 EXPECT_FALSE(a.isrow());
39 EXPECT_FALSE(a.iscomplex());
40 EXPECT_FALSE(a.isdouble());
41 EXPECT_FALSE(a.isbool());
42
43 EXPECT_FALSE(a.isvector());
44 EXPECT_FALSE(a.iscolumn());
45
46 EXPECT_TRUE(a.isreal());
47 EXPECT_TRUE(a.isempty());
48 EXPECT_TRUE(a.issingle());
49 EXPECT_TRUE(a.isfloating());
50 EXPECT_TRUE(a.isrealfloating());
51}
52
53TYPED_TEST(Array, ConstructorEmptyDim4) {
54 SUPPORTED_TYPE_CHECK(TypeParam);

Callers

nothing calls this directly

Calls 15

randuFunction · 0.85
getDeviceFunction · 0.85
deviceGCFunction · 0.85
constantFunction · 0.85
infoFunction · 0.85
numdimsMethod · 0.80
typeMethod · 0.80
bytesMethod · 0.80
rowsMethod · 0.80
colsMethod · 0.80
hostMethod · 0.80
af_create_handleFunction · 0.50

Tested by

no test coverage detected