v0.14.0
Functions
test_ostream.hpp File Reference
#include <iostream>
#include <sstream>

Go to the source code of this file.

Functions

template<class T >
void test_ostream (const T &t, const std::string &expected, const std::string &test_name)
 

Function Documentation

◆ test_ostream()

template<class T >
void test_ostream ( const T &  t,
const std::string &  expected,
const std::string &  test_name 
)

Definition at line 7 of file test_ostream.hpp.

9 {
10  std::stringstream ss;
11  ss << t;
12  if(ss.str() == expected)
13  {
14  std::cout << "PASS: " << test_name << "\n";
15  }
16  else
17  {
18  std::cout << "FAIL: " << test_name << ": " << ss.str()
19  << "!=" << expected << "\n";
20  }
21 }
t
constexpr double t
plate stiffness
Definition: plate.cpp:58