8#include <gtest/gtest.h>
10#include "arcane/utils/Vector3.h"
17TEST(TestVector3, Misc)
39 std::cout <<
"V0=" << v0 <<
"\n";
40 std::cout <<
"V1=" << v1 <<
"\n";
41 std::cout <<
"V2=" << v2 <<
"\n";
60 Int64x3 v3({ 1, 2, 3 });
64 Int64x3 v4({ 1, 2, 3, 4 });
72 Int64x3 sum_v1_v2(4, 3, 2);
73 Int64x3 mul_v1_4(4, -8, 16);
74 ASSERT_EQ((v1 + 7), Int64x3(8, 5, 11));
75 ASSERT_EQ((7 + v1), Int64x3(8, 5, 11));
76 ASSERT_EQ((v1 - 9), Int64x3(-8, -11, -5));
77 ASSERT_EQ((v1 + v2), sum_v1_v2);
80 ASSERT_EQ(v3, sum_v1_v2);
84 ASSERT_EQ(v3, (v1 + 5));
85 Int64x3 v4 = (v1 * 4);
86 ASSERT_EQ(v4, mul_v1_4);
87 ASSERT_EQ((4 * v1), mul_v1_4);
88 ASSERT_EQ((v4 / 4), v1);
93 ASSERT_EQ(v6, Int64x3(-1, 2, -4));
#define ASSERT_FALSE(condition)
Vérifie que condition est faux.
#define ASSERT_TRUE(condition)
Vérifie que condition est vrai.
Classe gérant un vecteur de dimension 3 de type T.
-*- tab-width: 2; indent-tabs-mode: nil; coding: utf-8-with-signature -*-