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

Class Approx2NullArgs

test/approx2.cpp:950–977  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

948}
949
950class Approx2NullArgs : public ::testing::Test {
951 protected:
952 af_array out;
953 af_array in;
954 af_array pos1;
955 af_array pos2;
956
957 Approx2NullArgs() : out(0), in(0), pos1(0), pos2(0) {}
958
959 void SetUp() {
960 SimpleTestData data;
961 ASSERT_SUCCESS(af_create_array(&in, &data.h_in.front(),
962 data.in_dims.ndims(), data.in_dims.get(),
963 f32));
964 ASSERT_SUCCESS(af_create_array(&pos1, &data.h_pos1.front(),
965 data.pos1_dims.ndims(),
966 data.pos1_dims.get(), f32));
967 ASSERT_SUCCESS(af_create_array(&pos2, &data.h_pos2.front(),
968 data.pos2_dims.ndims(),
969 data.pos2_dims.get(), f32));
970 }
971
972 void TearDown() {
973 if (pos2 != 0) { ASSERT_SUCCESS(af_release_array(pos2)); }
974 if (pos1 != 0) { ASSERT_SUCCESS(af_release_array(pos1)); }
975 if (in != 0) { ASSERT_SUCCESS(af_release_array(in)); }
976 }
977};
978
979TEST_F(Approx2NullArgs, NullOutputPtr) {
980 af_array* out_ptr = 0;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected