v0.14.0
Loading...
Searching...
No Matches
test_T2as.cpp
Go to the documentation of this file.
2#include "test_for_zero.hpp"
3#include "test_ostream.hpp"
4
5using namespace FTensor;
6using namespace std;
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}
Tensors class implemented by Walter Landry.
Tensors class implemented by Walter Landry.
Definition FTensor.hpp:51
void test_T2as()
Definition test_T2as.cpp:7
void test_for_zero(const T &t, const std::string &s)
void test_ostream(const T &t, const std::string &expected, const std::string &test_name)