#include "output.h" #include #include #include #include #include Y_UNIT_TEST_SUITE(TestOutput) { namespace { template void CheckComplexOutHelperImpl(const std::complex& value) { // Check Out << works as std::ostream << works std::stringstream os; os << value; std::string stdStr = os.str(); TString arcadiaStr = TStringBuilder() << value; UNIT_ASSERT_VALUES_EQUAL(stdStr, arcadiaStr); } void CheckComplexOutHelper(float real, float imag) { CheckComplexOutHelperImpl(std::complex(real, imag)); CheckComplexOutHelperImpl(std::complex(real, imag)); } } // namespace Y_UNIT_TEST(TestComplex) { TVector values({-1., -0.5, 0., 0.5, 1.}); for (float real : values) { for (float imag : values) { CheckComplexOutHelper(real, imag); } } } } // Y_UNIT_TEST_SUITE(TestOutput)