\hypertarget{io_8cpp_source}{}\doxysection{io.\+cpp}
\label{io_8cpp_source}\index{tests/io.cpp@{tests/io.cpp}}
\mbox{\hyperlink{io_8cpp}{Go to the documentation of this file.}}
\begin{DoxyCode}{0}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00001}00001 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{io_8h}{kblib/io.h}}"{}}}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00002}00002 \textcolor{preprocessor}{\#include "{}catch.hpp"{}}}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00003}00003 }
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00004}00004 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{hash_8h}{kblib/hash.h}}"{}}}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00005}00005 }
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00006}00006 \textcolor{preprocessor}{\#include <deque>}}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00007}00007 \textcolor{preprocessor}{\#include <iostream>}}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00008}00008 \textcolor{preprocessor}{\#include <sstream>}}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00009}00009 \textcolor{preprocessor}{\#include <vector>}}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00010}00010 }
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00011}\mbox{\hyperlink{io_8cpp_a9d21f53f7bf81eb0a7cf4be20666096d}{00011}} \mbox{\hyperlink{io_8cpp_a9d21f53f7bf81eb0a7cf4be20666096d}{TEST\_CASE}}(\textcolor{stringliteral}{"{}get\_line"{}}) \{}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00012}00012    std::istringstream is\{\textcolor{stringliteral}{"{}line1\(\backslash\)nline2\(\backslash\)nline3\(\backslash\)n"{}}\};}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00013}00013    std::string line;}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00014}00014    std::vector<std::string> v;}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00015}00015    \textcolor{keywordflow}{while} (is >> \mbox{\hyperlink{namespacekblib_ab094fc53f62f0f36e6f68eb3a4e70d5b}{kblib::get\_line}}(line)) \{}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00016}00016       v.push\_back(line);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00017}00017    \}}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00018}00018    REQUIRE(v == std::vector<std::string>\{\textcolor{stringliteral}{"{}line1"{}}, \textcolor{stringliteral}{"{}line2"{}}, \textcolor{stringliteral}{"{}line3"{}}\});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00019}00019 \}}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00020}\mbox{\hyperlink{io_8cpp_ad5fbe6d6d32b2d082229810c7c5694c3}{00020}} \mbox{\hyperlink{io_8cpp_a9d21f53f7bf81eb0a7cf4be20666096d}{TEST\_CASE}}(\textcolor{stringliteral}{"{}wide get\_line"{}}) \{}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00021}00021    std::wistringstream is\{L\textcolor{stringliteral}{"{}line1\(\backslash\)nline2\(\backslash\)nline3\(\backslash\)n"{}}\};}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00022}00022    std::wstring line;}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00023}00023    std::vector<std::wstring> v;}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00024}00024    \textcolor{keywordflow}{while} (is >> \mbox{\hyperlink{namespacekblib_ab094fc53f62f0f36e6f68eb3a4e70d5b}{kblib::get\_line}}(line)) \{}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00025}00025       v.push\_back(line);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00026}00026    \}}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00027}00027    REQUIRE(v == std::vector<std::wstring>\{L\textcolor{stringliteral}{"{}line1"{}}, L\textcolor{stringliteral}{"{}line2"{}}, L\textcolor{stringliteral}{"{}line3"{}}\});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00028}00028 \}}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00029}00029 }
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00030}\mbox{\hyperlink{io_8cpp_a9f5375165f53d34526d7b57bd32dee15}{00030}} \mbox{\hyperlink{io_8cpp_a9d21f53f7bf81eb0a7cf4be20666096d}{TEST\_CASE}}(\textcolor{stringliteral}{"{}nl"{}}) \{}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00031}00031    std::istringstream is(\textcolor{stringliteral}{"{}abc  \(\backslash\)t \(\backslash\)n"{}}}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00032}00032                          \textcolor{stringliteral}{"{} xyz  \(\backslash\)n"{}}}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00033}00033                          \textcolor{stringliteral}{"{}shd sgdf "{}});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00034}00034    std::string v;}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00035}00035    is >> v;}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00036}00036    CHECK(v == \textcolor{stringliteral}{"{}abc"{}});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00037}00037    is >> \mbox{\hyperlink{namespacekblib_a1c69e2ede07e021b4a480b78496912e2}{kblib::nl}};}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00038}00038    CHECK(is.peek() == \textcolor{charliteral}{' '});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00039}00039    \mbox{\hyperlink{namespacekblib_a8ec120cbc5e4f7c1624f07e48660b7f9}{std::getline}}(is, v);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00040}00040    CHECK(v == \textcolor{stringliteral}{"{} xyz  "{}});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00041}00041    is >> v;}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00042}00042    CHECK(v == \textcolor{stringliteral}{"{}shd"{}});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00043}00043    is >> \mbox{\hyperlink{namespacekblib_a1c69e2ede07e021b4a480b78496912e2}{kblib::nl}};}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00044}00044    is >> v;}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00045}00045    CHECK(v == \textcolor{stringliteral}{"{}sgdf"{}});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00046}00046    is >> \mbox{\hyperlink{namespacekblib_a1c69e2ede07e021b4a480b78496912e2}{kblib::nl}};}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00047}00047    CHECK(is.eof());}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00048}00048 \}}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00049}00049 }
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00050}\mbox{\hyperlink{io_8cpp_a82c7e3b25c67847c19fa175975b8efd8}{00050}} \mbox{\hyperlink{io_8cpp_a9d21f53f7bf81eb0a7cf4be20666096d}{TEST\_CASE}}(\textcolor{stringliteral}{"{}nl(wchar\_t)"{}}) \{}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00051}00051    std::wistringstream is(L\textcolor{stringliteral}{"{}abc  \(\backslash\)t \(\backslash\)n"{}}}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00052}00052                           \textcolor{stringliteral}{"{} xyz  \(\backslash\)n"{}}}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00053}00053                           \textcolor{stringliteral}{"{}shd sgdf "{}});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00054}00054    std::wstring v;}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00055}00055    is >> v;}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00056}00056    REQUIRE(v == L\textcolor{stringliteral}{"{}abc"{}});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00057}00057    is >> \mbox{\hyperlink{namespacekblib_a1c69e2ede07e021b4a480b78496912e2}{kblib::nl}};}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00058}00058    REQUIRE(is.peek() == \textcolor{charliteral}{' '});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00059}00059    \mbox{\hyperlink{namespacekblib_a8ec120cbc5e4f7c1624f07e48660b7f9}{std::getline}}(is, v);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00060}00060    REQUIRE(v == L\textcolor{stringliteral}{"{} xyz  "{}});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00061}00061    is >> v;}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00062}00062    REQUIRE(v == L\textcolor{stringliteral}{"{}shd"{}});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00063}00063    is >> \mbox{\hyperlink{namespacekblib_a1c69e2ede07e021b4a480b78496912e2}{kblib::nl}};}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00064}00064    is >> v;}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00065}00065    REQUIRE(v == L\textcolor{stringliteral}{"{}sgdf"{}});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00066}00066    is >> \mbox{\hyperlink{namespacekblib_a1c69e2ede07e021b4a480b78496912e2}{kblib::nl}};}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00067}00067    REQUIRE(is.eof());}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00068}00068 \}}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00069}00069 }
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00070}\mbox{\hyperlink{io_8cpp_a61ba97f865d5025e8648dbb718c87e1f}{00070}} \mbox{\hyperlink{io_8cpp_a9d21f53f7bf81eb0a7cf4be20666096d}{TEST\_CASE}}(\textcolor{stringliteral}{"{}expect(good)"{}}) \{}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00071}00071    std::istringstream is(\textcolor{stringliteral}{"{}11/17/2020"{}});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00072}00072    \textcolor{keywordtype}{int} day\{\}, month\{\}, year\{\};}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00073}00073    is >> month >> \mbox{\hyperlink{namespacekblib_a92cc98441a6881da833d69dad234f8be}{kblib::expect}}(\textcolor{charliteral}{'/'});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00074}00074    REQUIRE(is);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00075}00075    is >> day >> \mbox{\hyperlink{namespacekblib_a92cc98441a6881da833d69dad234f8be}{kblib::expect}}(\textcolor{charliteral}{'/'}) >> year;}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00076}00076    REQUIRE(is);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00077}00077    REQUIRE(month == 11);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00078}00078    REQUIRE(day == 17);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00079}00079    REQUIRE(year == 2020);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00080}00080 \}}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00081}00081 }
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00082}\mbox{\hyperlink{io_8cpp_a42f0465ef10961b87e8838f6dd9c2c63}{00082}} \mbox{\hyperlink{io_8cpp_a9d21f53f7bf81eb0a7cf4be20666096d}{TEST\_CASE}}(\textcolor{stringliteral}{"{}expect(fail)"{}}) \{}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00083}00083    std::istringstream is(\textcolor{stringliteral}{"{}11-\/17-\/2020"{}});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00084}00084    \textcolor{keywordtype}{int} day\{\}, month\{\}, year\{\};}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00085}00085    is >> month >> \mbox{\hyperlink{namespacekblib_a92cc98441a6881da833d69dad234f8be}{kblib::expect}}(\textcolor{charliteral}{'/'});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00086}00086    REQUIRE(is.fail());}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00087}00087    is.clear();}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00088}00088    is >> \mbox{\hyperlink{namespacekblib_a92cc98441a6881da833d69dad234f8be}{kblib::expect}}(\textcolor{charliteral}{'-\/'});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00089}00089    REQUIRE(is);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00090}00090    is >> day >> \mbox{\hyperlink{namespacekblib_a92cc98441a6881da833d69dad234f8be}{kblib::expect}}(\textcolor{charliteral}{'/'});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00091}00091    REQUIRE(is.fail());}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00092}00092    is.clear();}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00093}00093    is >> \mbox{\hyperlink{namespacekblib_a92cc98441a6881da833d69dad234f8be}{kblib::expect}}(\textcolor{charliteral}{'-\/'});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00094}00094    REQUIRE(is);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00095}00095    is >> year;}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00096}00096    REQUIRE(is);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00097}00097    REQUIRE(month == 11);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00098}00098    REQUIRE(day == 17);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00099}00099    REQUIRE(year == 2020);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00100}00100 \}}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00101}00101 }
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00102}\mbox{\hyperlink{io_8cpp_a94fb6c6cfa5ce7231dc4badcc03a68fe}{00102}} \mbox{\hyperlink{io_8cpp_a9d21f53f7bf81eb0a7cf4be20666096d}{TEST\_CASE}}(\textcolor{stringliteral}{"{}expect(wchar\_t, good)"{}}) \{}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00103}00103    std::wistringstream is(L\textcolor{stringliteral}{"{}11/17/2020"{}});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00104}00104    \textcolor{keywordtype}{int} day\{\}, month\{\}, year\{\};}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00105}00105    is >> month >> \mbox{\hyperlink{namespacekblib_a92cc98441a6881da833d69dad234f8be}{kblib::expect}}(L\textcolor{charliteral}{'/'});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00106}00106    REQUIRE(is);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00107}00107    is >> day >> \mbox{\hyperlink{namespacekblib_a92cc98441a6881da833d69dad234f8be}{kblib::expect}}(L\textcolor{charliteral}{'/'}) >> year;}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00108}00108    REQUIRE(is);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00109}00109    REQUIRE(month == 11);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00110}00110    REQUIRE(day == 17);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00111}00111    REQUIRE(year == 2020);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00112}00112 \}}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00113}00113 }
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00114}\mbox{\hyperlink{io_8cpp_ad9c632d6789c7227fe361e4bff3ce073}{00114}} \mbox{\hyperlink{io_8cpp_a9d21f53f7bf81eb0a7cf4be20666096d}{TEST\_CASE}}(\textcolor{stringliteral}{"{}expect(wchar\_t, fail)"{}}) \{}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00115}00115    std::wistringstream is(L\textcolor{stringliteral}{"{}11-\/17-\/2020"{}});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00116}00116    \textcolor{keywordtype}{int} day\{\}, month\{\}, year\{\};}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00117}00117    is >> month >> \mbox{\hyperlink{namespacekblib_a92cc98441a6881da833d69dad234f8be}{kblib::expect}}(L\textcolor{charliteral}{'/'});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00118}00118    REQUIRE(is.fail());}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00119}00119    is.clear();}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00120}00120    is >> \mbox{\hyperlink{namespacekblib_a92cc98441a6881da833d69dad234f8be}{kblib::expect}}(L\textcolor{charliteral}{'-\/'});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00121}00121    REQUIRE(is);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00122}00122    is >> day >> \mbox{\hyperlink{namespacekblib_a92cc98441a6881da833d69dad234f8be}{kblib::expect}}(L\textcolor{charliteral}{'/'});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00123}00123    REQUIRE(is.fail());}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00124}00124    is.clear();}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00125}00125    is >> \mbox{\hyperlink{namespacekblib_a92cc98441a6881da833d69dad234f8be}{kblib::expect}}(L\textcolor{charliteral}{'-\/'});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00126}00126    REQUIRE(is);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00127}00127    is >> year;}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00128}00128    REQUIRE(is);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00129}00129    REQUIRE(month == 11);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00130}00130    REQUIRE(day == 17);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00131}00131    REQUIRE(year == 2020);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00132}00132 \}}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00133}00133 }
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00134}\mbox{\hyperlink{io_8cpp_aa294985917f0ce4270d768e2328a638b}{00134}} \mbox{\hyperlink{io_8cpp_a9d21f53f7bf81eb0a7cf4be20666096d}{TEST\_CASE}}(\textcolor{stringliteral}{"{}expect(widening, good)"{}}) \{}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00135}00135    std::wistringstream is(L\textcolor{stringliteral}{"{}11/17/2020"{}});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00136}00136    \textcolor{keywordtype}{int} day\{\}, month\{\}, year\{\};}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00137}00137    is >> month >> \mbox{\hyperlink{namespacekblib_a92cc98441a6881da833d69dad234f8be}{kblib::expect}}(\textcolor{charliteral}{'/'});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00138}00138    REQUIRE(is);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00139}00139    is >> day >> \mbox{\hyperlink{namespacekblib_a92cc98441a6881da833d69dad234f8be}{kblib::expect}}(\textcolor{charliteral}{'/'}) >> year;}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00140}00140    REQUIRE(is);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00141}00141    REQUIRE(month == 11);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00142}00142    REQUIRE(day == 17);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00143}00143    REQUIRE(year == 2020);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00144}00144 \}}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00145}00145 }
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00146}\mbox{\hyperlink{io_8cpp_a945c8031cae116baf86fdf55824b2479}{00146}} \mbox{\hyperlink{io_8cpp_a9d21f53f7bf81eb0a7cf4be20666096d}{TEST\_CASE}}(\textcolor{stringliteral}{"{}expect(widening, fail)"{}}) \{}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00147}00147    std::wistringstream is(L\textcolor{stringliteral}{"{}11-\/17-\/2020"{}});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00148}00148    \textcolor{keywordtype}{int} day\{\}, month\{\}, year\{\};}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00149}00149    is >> month >> \mbox{\hyperlink{namespacekblib_a92cc98441a6881da833d69dad234f8be}{kblib::expect}}(\textcolor{charliteral}{'/'});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00150}00150    REQUIRE(is.fail());}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00151}00151    is.clear();}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00152}00152    is >> \mbox{\hyperlink{namespacekblib_a92cc98441a6881da833d69dad234f8be}{kblib::expect}}(\textcolor{charliteral}{'-\/'});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00153}00153    REQUIRE(is);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00154}00154    is >> day >> \mbox{\hyperlink{namespacekblib_a92cc98441a6881da833d69dad234f8be}{kblib::expect}}(\textcolor{charliteral}{'/'});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00155}00155    REQUIRE(is.fail());}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00156}00156    is.clear();}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00157}00157    is >> \mbox{\hyperlink{namespacekblib_a92cc98441a6881da833d69dad234f8be}{kblib::expect}}(\textcolor{charliteral}{'-\/'});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00158}00158    REQUIRE(is);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00159}00159    is >> year;}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00160}00160    REQUIRE(is);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00161}00161    REQUIRE(month == 11);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00162}00162    REQUIRE(day == 17);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00163}00163    REQUIRE(year == 2020);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00164}00164 \}}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00165}00165 }
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00166}00166 \textcolor{comment}{// No locale support for unicode}}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00167}00167 \textcolor{preprocessor}{\#if 0}}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00168}00168 \mbox{\hyperlink{io_8cpp_a9d21f53f7bf81eb0a7cf4be20666096d}{TEST\_CASE}}(\textcolor{stringliteral}{"{}expect(widening, UFT-\/16, good)"{}}) \{}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00169}00169    std::basic\_istringstream<char16\_t> is(u\textcolor{stringliteral}{"{}11/17/2020"{}});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00170}00170    \textcolor{keywordtype}{int} day\{\}, month\{\}, year\{\};}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00171}00171    is >> month >> \mbox{\hyperlink{namespacekblib_a92cc98441a6881da833d69dad234f8be}{kblib::expect}}(\textcolor{charliteral}{'/'});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00172}00172    REQUIRE(is);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00173}00173    is >> day >> \mbox{\hyperlink{namespacekblib_a92cc98441a6881da833d69dad234f8be}{kblib::expect}}(\textcolor{charliteral}{'/'}) >> year;}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00174}00174    REQUIRE(is);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00175}00175    REQUIRE(month == 11);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00176}00176    REQUIRE(day == 17);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00177}00177    REQUIRE(year == 2020);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00178}00178 \}}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00179}00179 }
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00180}00180 \mbox{\hyperlink{io_8cpp_a9d21f53f7bf81eb0a7cf4be20666096d}{TEST\_CASE}}(\textcolor{stringliteral}{"{}expect(widening, UTF-\/16, fail)"{}}) \{}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00181}00181    std::basic\_istringstream<char16\_t> is(u\textcolor{stringliteral}{"{}11-\/17-\/2020"{}});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00182}00182    \textcolor{keywordtype}{int} day\{\}, month\{\}, year\{\};}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00183}00183    is >> month >> \mbox{\hyperlink{namespacekblib_a92cc98441a6881da833d69dad234f8be}{kblib::expect}}(\textcolor{charliteral}{'/'});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00184}00184    REQUIRE(is.fail());}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00185}00185    is.clear();}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00186}00186    is >> \mbox{\hyperlink{namespacekblib_a92cc98441a6881da833d69dad234f8be}{kblib::expect}}(\textcolor{charliteral}{'-\/'});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00187}00187    REQUIRE(is);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00188}00188    is >> day >> \mbox{\hyperlink{namespacekblib_a92cc98441a6881da833d69dad234f8be}{kblib::expect}}(\textcolor{charliteral}{'/'});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00189}00189    REQUIRE(is.fail());}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00190}00190    is.clear();}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00191}00191    is >> \mbox{\hyperlink{namespacekblib_a92cc98441a6881da833d69dad234f8be}{kblib::expect}}(\textcolor{charliteral}{'-\/'});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00192}00192    REQUIRE(is);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00193}00193    is >> year;}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00194}00194    REQUIRE(is);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00195}00195    REQUIRE(month == 11);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00196}00196    REQUIRE(day == 17);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00197}00197    REQUIRE(year == 2020);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00198}00198 \}}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00199}00199 }
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00200}00200 \mbox{\hyperlink{io_8cpp_a9d21f53f7bf81eb0a7cf4be20666096d}{TEST\_CASE}}(\textcolor{stringliteral}{"{}expect(widening, UFT-\/32, good)"{}}) \{}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00201}00201    std::basic\_istringstream<char32\_t> is(U\textcolor{stringliteral}{"{}11/17/2020"{}});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00202}00202    \textcolor{keywordtype}{int} day\{\}, month\{\}, year\{\};}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00203}00203    is >> month >> \mbox{\hyperlink{namespacekblib_a92cc98441a6881da833d69dad234f8be}{kblib::expect}}(\textcolor{charliteral}{'/'});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00204}00204    REQUIRE(is);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00205}00205    is >> day >> \mbox{\hyperlink{namespacekblib_a92cc98441a6881da833d69dad234f8be}{kblib::expect}}(\textcolor{charliteral}{'/'}) >> year;}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00206}00206    REQUIRE(is);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00207}00207    REQUIRE(month == 11);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00208}00208    REQUIRE(day == 17);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00209}00209    REQUIRE(year == 2020);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00210}00210 \}}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00211}00211 }
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00212}00212 \mbox{\hyperlink{io_8cpp_a9d21f53f7bf81eb0a7cf4be20666096d}{TEST\_CASE}}(\textcolor{stringliteral}{"{}expect(widening, UTF-\/32, fail)"{}}) \{}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00213}00213    std::basic\_istringstream<char32\_t> is(U\textcolor{stringliteral}{"{}11-\/17-\/2020"{}});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00214}00214    \textcolor{keywordtype}{int} day\{\}, month\{\}, year\{\};}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00215}00215    is >> month >> \mbox{\hyperlink{namespacekblib_a92cc98441a6881da833d69dad234f8be}{kblib::expect}}(\textcolor{charliteral}{'/'});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00216}00216    REQUIRE(is.fail());}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00217}00217    is.clear();}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00218}00218    is >> \mbox{\hyperlink{namespacekblib_a92cc98441a6881da833d69dad234f8be}{kblib::expect}}(\textcolor{charliteral}{'-\/'});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00219}00219    REQUIRE(is);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00220}00220    is >> day >> \mbox{\hyperlink{namespacekblib_a92cc98441a6881da833d69dad234f8be}{kblib::expect}}(\textcolor{charliteral}{'/'});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00221}00221    REQUIRE(is.fail());}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00222}00222    is.clear();}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00223}00223    is >> \mbox{\hyperlink{namespacekblib_a92cc98441a6881da833d69dad234f8be}{kblib::expect}}(\textcolor{charliteral}{'-\/'});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00224}00224    REQUIRE(is);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00225}00225    is >> year;}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00226}00226    REQUIRE(is);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00227}00227    REQUIRE(month == 11);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00228}00228    REQUIRE(day == 17);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00229}00229    REQUIRE(year == 2020);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00230}00230 \}}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00231}00231 }
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00232}00232 \mbox{\hyperlink{io_8cpp_a9d21f53f7bf81eb0a7cf4be20666096d}{TEST\_CASE}}(\textcolor{stringliteral}{"{}expect(widening, UTF-\/16 to UFT-\/32, good)"{}}) \{}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00233}00233    std::basic\_istringstream<char32\_t> is(U\textcolor{stringliteral}{"{}11/17/2020"{}});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00234}00234    \textcolor{keywordtype}{int} day\{\}, month\{\}, year\{\};}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00235}00235    is >> month >> \mbox{\hyperlink{namespacekblib_a92cc98441a6881da833d69dad234f8be}{kblib::expect}}(u\textcolor{charliteral}{'/'});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00236}00236    REQUIRE(is);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00237}00237    is >> day >> \mbox{\hyperlink{namespacekblib_a92cc98441a6881da833d69dad234f8be}{kblib::expect}}(u\textcolor{charliteral}{'/'}) >> year;}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00238}00238    REQUIRE(is);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00239}00239    REQUIRE(month == 11);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00240}00240    REQUIRE(day == 17);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00241}00241    REQUIRE(year == 2020);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00242}00242 \}}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00243}00243 }
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00244}00244 \mbox{\hyperlink{io_8cpp_a9d21f53f7bf81eb0a7cf4be20666096d}{TEST\_CASE}}(\textcolor{stringliteral}{"{}expect(widening, UTF-\/16 to UTF-\/32, fail)"{}}) \{}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00245}00245    std::basic\_istringstream<char32\_t> is(U\textcolor{stringliteral}{"{}11-\/17-\/2020"{}});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00246}00246    \textcolor{keywordtype}{int} day\{\}, month\{\}, year\{\};}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00247}00247    is >> month >> \mbox{\hyperlink{namespacekblib_a92cc98441a6881da833d69dad234f8be}{kblib::expect}}(u\textcolor{charliteral}{'/'});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00248}00248    REQUIRE(is.fail());}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00249}00249    is.clear();}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00250}00250    is >> \mbox{\hyperlink{namespacekblib_a92cc98441a6881da833d69dad234f8be}{kblib::expect}}(u\textcolor{charliteral}{'-\/'});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00251}00251    REQUIRE(is);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00252}00252    is >> day >> \mbox{\hyperlink{namespacekblib_a92cc98441a6881da833d69dad234f8be}{kblib::expect}}(u\textcolor{charliteral}{'/'});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00253}00253    REQUIRE(is.fail());}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00254}00254    is.clear();}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00255}00255    is >> \mbox{\hyperlink{namespacekblib_a92cc98441a6881da833d69dad234f8be}{kblib::expect}}(u\textcolor{charliteral}{'-\/'});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00256}00256    REQUIRE(is);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00257}00257    is >> year;}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00258}00258    REQUIRE(is);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00259}00259    REQUIRE(month == 11);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00260}00260    REQUIRE(day == 17);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00261}00261    REQUIRE(year == 2020);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00262}00262 \}}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00263}00263 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00264}00264 }
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00265}00265 \textcolor{preprocessor}{\#if 0 }\textcolor{comment}{// Compile error}}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00266}00266 \mbox{\hyperlink{io_8cpp_a9d21f53f7bf81eb0a7cf4be20666096d}{TEST\_CASE}}(\textcolor{stringliteral}{"{}expect(narrowing, good)"{}}) \{}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00267}00267    std::istringstream is(\textcolor{stringliteral}{"{}11/17/2020"{}});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00268}00268    \textcolor{keywordtype}{int} day\{\}, month\{\}, year\{\};}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00269}00269    is >> month >> \mbox{\hyperlink{namespacekblib_a92cc98441a6881da833d69dad234f8be}{kblib::expect}}(L\textcolor{charliteral}{'/'});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00270}00270    REQUIRE(is);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00271}00271    is >> day >> \mbox{\hyperlink{namespacekblib_a92cc98441a6881da833d69dad234f8be}{kblib::expect}}(L\textcolor{charliteral}{'/'}) >> year;}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00272}00272    REQUIRE(is);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00273}00273    REQUIRE(month == 11);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00274}00274    REQUIRE(day == 17);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00275}00275    REQUIRE(year == 2020);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00276}00276 \}}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00277}00277 }
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00278}00278 \mbox{\hyperlink{io_8cpp_a9d21f53f7bf81eb0a7cf4be20666096d}{TEST\_CASE}}(\textcolor{stringliteral}{"{}expect(narrowing, fail)"{}}) \{}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00279}00279    std::istringstream is(\textcolor{stringliteral}{"{}11-\/17-\/2020"{}});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00280}00280    \textcolor{keywordtype}{int} day\{\}, month\{\}, year\{\};}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00281}00281    is >> month >> \mbox{\hyperlink{namespacekblib_a92cc98441a6881da833d69dad234f8be}{kblib::expect}}(L\textcolor{charliteral}{'/'});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00282}00282    REQUIRE(is.fail());}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00283}00283    is.clear();}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00284}00284    is >> \mbox{\hyperlink{namespacekblib_a92cc98441a6881da833d69dad234f8be}{kblib::expect}}(L\textcolor{charliteral}{'-\/'});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00285}00285    REQUIRE(is);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00286}00286    is >> day >> \mbox{\hyperlink{namespacekblib_a92cc98441a6881da833d69dad234f8be}{kblib::expect}}(L\textcolor{charliteral}{'/'});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00287}00287    REQUIRE(is.fail());}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00288}00288    is.clear();}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00289}00289    is >> \mbox{\hyperlink{namespacekblib_a92cc98441a6881da833d69dad234f8be}{kblib::expect}}(L\textcolor{charliteral}{'-\/'});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00290}00290    REQUIRE(is);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00291}00291    is >> year;}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00292}00292    REQUIRE(is);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00293}00293    REQUIRE(month == 11);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00294}00294    REQUIRE(day == 17);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00295}00295    REQUIRE(year == 2020);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00296}00296 \}}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00297}00297 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00298}00298 }
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00299}00299 \textcolor{preprocessor}{\#if KBLIB\_USE\_CXX17}}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00300}\mbox{\hyperlink{io_8cpp_ab6f27d61e6bd5060307844bc47e2b2b3}{00300}} \mbox{\hyperlink{io_8cpp_a9d21f53f7bf81eb0a7cf4be20666096d}{TEST\_CASE}}(\textcolor{stringliteral}{"{}get\_file\_contents"{}}) \{}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00301}00301    \textcolor{keyword}{auto} filename = \textcolor{stringliteral}{"{}kblib"{}};}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00302}00302    \textcolor{keyword}{auto} filestr = \mbox{\hyperlink{namespacekblib_a842d755850ee1a876ee0587931a7bd16}{kblib::get\_file\_contents}}(filename);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00303}00303    \textcolor{keywordflow}{if} (filestr) \{}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00304}00304       std::cout << \textcolor{stringliteral}{"{}FNV32a("{}} << filename << \textcolor{stringliteral}{"{}): "{}} << \mbox{\hyperlink{namespacekblib_a8d67d64eac176d35844a629ff0aeacdf}{kblib::FNV32a}}(*filestr)}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00305}00305                 << \textcolor{charliteral}{'\(\backslash\)n'};}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00306}00306    \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00307}00307       std::cout << \textcolor{stringliteral}{"{}failed to open "{}} << filename << \textcolor{stringliteral}{"{}\(\backslash\)n"{}};}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00308}00308    \}}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00309}00309    \textcolor{keyword}{auto} filevec = kblib::get\_file\_contents<std::vector<uint8\_t>>(filename);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00310}00310    \textcolor{keywordflow}{if} (filevec) \{}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00311}00311       std::cout << \textcolor{stringliteral}{"{}FNV32a("{}} << filename}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00312}00312                 << \textcolor{stringliteral}{"{}): "{}} << kblib::FNVa<std::uint32\_t>(*filevec) << \textcolor{charliteral}{'\(\backslash\)n'};}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00313}00313    \} \textcolor{keywordflow}{else} \{}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00314}00314       std::cout << \textcolor{stringliteral}{"{}failed to open "{}} << filename << \textcolor{stringliteral}{"{}\(\backslash\)n"{}};}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00315}00315    \}}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00316}00316    \textcolor{comment}{// D must be a sequence of char-\/sized objects, char32\_t doesn't work.}}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00317}00317    \textcolor{comment}{// auto filewstr = kblib::get\_file\_contents<std::u32string>(filename);}}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00318}00318 }
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00319}00319    \textcolor{comment}{// deque is not a contiguous container, and does not provide a .data() member}}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00320}00320    \textcolor{comment}{// so the second overload of get\_file\_contents will be used.}}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00321}00321    \textcolor{keyword}{auto} fileerror = kblib::get\_file\_contents<std::deque<char>>(filename);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00322}00322 \}}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00323}00323 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00324}00324 }
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00325}\mbox{\hyperlink{io_8cpp_a57c77f5dc2627d92075158d08c885b73}{00325}} \mbox{\hyperlink{io_8cpp_a9d21f53f7bf81eb0a7cf4be20666096d}{TEST\_CASE}}(\textcolor{stringliteral}{"{}tee\_stream"{}}) \{}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00326}00326    std::ostringstream \mbox{\hyperlink{namespacekblib_a22831dce77d5f35c13930b5e30a59f07}{a}}, b;}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00327}00327 \textcolor{preprocessor}{\#if KBLIB\_USE\_CXX17}}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00328}00328    \textcolor{keyword}{auto} os = \mbox{\hyperlink{namespacekblib_a5731c616c6080a1e7b8f2155e76373df}{kblib::tee}}(\mbox{\hyperlink{namespacekblib_a22831dce77d5f35c13930b5e30a59f07}{a}}, b);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00329}00329 \textcolor{preprocessor}{\#else}}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00330}00330    \textcolor{comment}{// kblib::basic\_teestream<std::ostringstream, std::ostringstream> os(a, b);}}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00331}00331    \textcolor{keyword}{auto}\&\& os = \mbox{\hyperlink{namespacekblib_a5731c616c6080a1e7b8f2155e76373df}{kblib::tee}}(\mbox{\hyperlink{namespacekblib_a22831dce77d5f35c13930b5e30a59f07}{a}}, b);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00332}00332 \textcolor{preprocessor}{\#endif}}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00333}00333 }
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00334}00334    os << \textcolor{stringliteral}{"{}test"{}} << std::flush;}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00335}00335    REQUIRE(os);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00336}00336    CHECK(\mbox{\hyperlink{namespacekblib_a22831dce77d5f35c13930b5e30a59f07}{a}}.str() == \textcolor{stringliteral}{"{}test"{}});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00337}00337    CHECK(b.str() == \textcolor{stringliteral}{"{}test"{}});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00338}00338    CHECK(\mbox{\hyperlink{namespacekblib_a22831dce77d5f35c13930b5e30a59f07}{a}}.str() == b.str());}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00339}00339 }
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00340}00340    os << \textcolor{charliteral}{'s'} << std::flush;}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00341}00341    REQUIRE(os);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00342}00342    CHECK(\mbox{\hyperlink{namespacekblib_a22831dce77d5f35c13930b5e30a59f07}{a}}.str() == \textcolor{stringliteral}{"{}tests"{}});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00343}00343    CHECK(b.str() == \textcolor{stringliteral}{"{}tests"{}});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00344}00344    CHECK(\mbox{\hyperlink{namespacekblib_a22831dce77d5f35c13930b5e30a59f07}{a}}.str() == b.str());}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00345}00345 }
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00346}00346    os << std::setw(8) << 42 << std::flush;}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00347}00347    REQUIRE(os);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00348}00348    CHECK(\mbox{\hyperlink{namespacekblib_a22831dce77d5f35c13930b5e30a59f07}{a}}.str() == \textcolor{stringliteral}{"{}tests      42"{}});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00349}00349    CHECK(b.str() == \textcolor{stringliteral}{"{}tests      42"{}});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00350}00350    CHECK(\mbox{\hyperlink{namespacekblib_a22831dce77d5f35c13930b5e30a59f07}{a}}.str() == b.str());}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00351}00351 }
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00352}00352    \{}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00353}00353       \textcolor{keyword}{auto} len = \mbox{\hyperlink{namespacekblib_a22831dce77d5f35c13930b5e30a59f07}{a}}.str().length();}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00354}00354       \textcolor{keywordflow}{for} (\mbox{\hyperlink{tdecl_8h_a607cffc585fe3bfcb06b63be2948de4a}{KBLIB\_UNUSED}} \textcolor{keyword}{auto} \_ : \mbox{\hyperlink{namespacekblib_a72690688922a2d4ae9a3e46ff0c1a9a9}{kblib::range}}(2048)) \{}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00355}00355          os << \textcolor{charliteral}{'.'} << std::flush;}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00356}00356          CHECK(\mbox{\hyperlink{namespacekblib_a22831dce77d5f35c13930b5e30a59f07}{a}}.str() == b.str());}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00357}00357          CHECK(\mbox{\hyperlink{namespacekblib_a22831dce77d5f35c13930b5e30a59f07}{a}}.str().length() == ++len);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00358}00358          CHECK(\mbox{\hyperlink{namespacekblib_a22831dce77d5f35c13930b5e30a59f07}{a}}.str().back() == \textcolor{charliteral}{'.'});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00359}00359       \}}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00360}00360    \}}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00361}00361    \mbox{\hyperlink{namespacekblib_a22831dce77d5f35c13930b5e30a59f07}{a}}.str(\textcolor{stringliteral}{"{}"{}});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00362}00362    b.str(\textcolor{stringliteral}{"{}"{}});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00363}00363 }
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00364}00364    \{}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00365}00365       \textcolor{keyword}{auto} big\_str = std::string(2048, \textcolor{charliteral}{'?'});}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00366}00366       os << big\_str << std::flush;}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00367}00367       REQUIRE(os);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00368}00368       CHECK(\mbox{\hyperlink{namespacekblib_a22831dce77d5f35c13930b5e30a59f07}{a}}.str() == big\_str);}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00369}00369       CHECK(\mbox{\hyperlink{namespacekblib_a22831dce77d5f35c13930b5e30a59f07}{a}}.str() == b.str());}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00370}00370    \}}
\DoxyCodeLine{\Hypertarget{io_8cpp_source_l00371}00371 \}}

\end{DoxyCode}
