7#ifndef TEST_ARCCORE_COLLECTIONS_TESTARRAYCOMMON_H
8#define TEST_ARCCORE_COLLECTIONS_TESTARRAYCOMMON_H
14#include <gtest/gtest.h>
27using namespace Arccore;
35 IntSubClass() =
default;
37 friend bool operator==(
const IntSubClass& v,
Integer iv) {
return v.m_v == iv; }
38 friend bool operator==(
const IntSubClass& v1,
const IntSubClass& v2) {
return v1.m_v == v2.m_v; }
39 friend bool operator!=(
const IntSubClass& v1,
const IntSubClass& v2) {
return v1.m_v != v2.m_v; }
40 friend std::ostream& operator<<(std::ostream& o,
const IntSubClass& c)
45 Integer value()
const {
return m_v; }
53 IntSubClassNoPod() =
default;
54 explicit IntSubClassNoPod(
Integer v)
59 friend bool operator==(
const IntSubClassNoPod& v,
Integer iv) {
return v.m_v == iv; }
61 friend bool operator!=(
const IntSubClassNoPod& v1,
const IntSubClassNoPod& v2) {
return v1.m_v != v2.m_v; }
62 friend std::ostream& operator<<(std::ostream& o, IntSubClassNoPod c)
77#define ARCCORE_UT_CHECK(expr, message) \
79 throw Arccore::FatalErrorException((message))
104 IntPtrSubClass(
const IntPtrSubClass& v)
109 void operator=(
const IntPtrSubClass& v)
115 bool operator==(
Integer iv)
const
125template <
typename T>
inline void _checkSameInfoArray2(
const Array2<T>& a,
const Array2<T>& b)
127 ASSERT_EQ(a.allocator(), b.allocator());
129 ASSERT_EQ(a.dim1Size(), b.dim1Size());
130 ASSERT_EQ(a.dim2Size(), b.dim2Size());
Definitions and globals of Arccore.
Class representing a classic 2D array.
Integer totalNbElement() const
Total number of elements (dim1Size()*dim2Size()).
Int32 Integer
Type representing an integer.