v0.14.0
Loading...
Searching...
No Matches
test_ostream.hpp
Go to the documentation of this file.
1#include <iostream>
2#include <sstream>
3
4#pragma once
5
6template <class T>
7void test_ostream(const T &t, const std::string &expected,
8 const std::string &test_name)
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}
constexpr double t
plate stiffness
Definition plate.cpp:58
void test_ostream(const T &t, const std::string &expected, const std::string &test_name)