v0.14.0
Functions
test_T2as.hpp File Reference

Go to the source code of this file.

Functions

void test_T2as ()
 

Function Documentation

◆ test_T2as()

void test_T2as ( )

Definition at line 7 of file test_T2as.cpp.

8 {
9  test_ostream(Tensor2_antisymmetric<double, 3>(3., 7., 11.), "[[3,7],[11]]",
10  "operator<<(T2as<3>)");
12  "operator<<(T2as<1>)");
13 
15  std::stringstream ss("[[3,7],[13]]");
16  ss >> t2as_1;
17  test_for_zero(t2as_1(0, 1) - 3, "operator>>(T2as)(0,1)");
18  test_for_zero(t2as_1(0, 2) - 7, "operator>>(T2as)(0,2)");
19  test_for_zero(t2as_1(1, 2) - 13, "operator>>(T2as)(1,2)");
20 }
test_ostream
void test_ostream(const T &t, const std::string &expected, const std::string &test_name)
Definition: test_ostream.hpp:7
test_for_zero
void test_for_zero(const T &t, const std::string &s)
Definition: test_for_zero.hpp:7
FTensor::Tensor2_antisymmetric
Definition: Tensor2_antisymmetric_value.hpp:9