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

Function deathTest

test/array_death_tests.cpp:31–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29class ArrayDeathTest : public ::testing::Test {};
30
31void deathTest() {
32 info();
33 setDevice(0);
34
35 array A = randu(5, 3, f32);
36
37 array B = sin(A) + 1.5;
38
39 B(seq(0, 2), 1) = B(seq(0, 2), 1) * -1;
40
41 array C = fft(B);
42
43 array c = C.row(end);
44
45 dim4 dims(16, 4, 1, 1);
46 array r = constant(2, dims);
47
48 array S = scan(r, 0, AF_BINARY_MUL);
49
50 float d[] = {1, 2, 3, 4, 5, 6};
51 array D(2, 3, d, afHost);
52
53 D.col(0) = D.col(end);
54
55 array vals, inds;
56 sort(vals, inds, A);
57
58 _exit(0);
59}
60
61TEST(ArrayDeathTest, ProxyMoveAssignmentOperator) {
62 EXPECT_EXIT(deathTest(), ::testing::ExitedWithCode(0), "");

Callers 1

TESTFunction · 0.85

Calls 11

infoFunction · 0.85
randuFunction · 0.85
sinFunction · 0.85
seqClass · 0.85
constantFunction · 0.85
rowMethod · 0.80
colMethod · 0.80
fftFunction · 0.70
setDeviceFunction · 0.50
scanFunction · 0.50
sortFunction · 0.50

Tested by

no test coverage detected