| 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( \ |
nothing calls this directly
no test coverage detected