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

Function assertRefEq

test/arrayfire_test.cpp:2004–2019  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2002}
2003
2004::testing::AssertionResult assertRefEq(std::string hA_name,
2005 std::string expected_name,
2006 const af::array &a, int expected) {
2007 int count = 0;
2008 af_get_data_ref_count(&count, a.get());
2009 if (count != expected) {
2010 std::stringstream ss;
2011 ss << "Incorrect reference count:\nExpected: " << expected << "\n"
2012 << std::setw(8) << hA_name << ": " << count;
2013
2014 return ::testing::AssertionFailure() << ss.str();
2015
2016 } else {
2017 return ::testing::AssertionSuccess();
2018 }
2019}
2020
2021#define INSTANTIATE(To) \
2022 template std::string printContext( \

Callers

nothing calls this directly

Calls 2

af_get_data_ref_countFunction · 0.50
getMethod · 0.45

Tested by

no test coverage detected