From b6f383907bde7e84da67d8ab6779dbd023b8b7e4 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Fri, 27 Dec 2013 07:26:55 -0800 Subject: [PATCH] Add a test case from https://github.com/vitaut/format/issues/14 --- format_test.cc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/format_test.cc b/format_test.cc index ffcb06f8..b9367951 100644 --- a/format_test.cc +++ b/format_test.cc @@ -300,6 +300,15 @@ TEST(WriterTest, WriteDouble) { CHECK_WRITE(4.2l); } +TEST(WriterTest, WriteDoubleAtBufferBoundary) { + fmt::Writer writer; + int i = 0; + while (i++ < 130) { + std::cout << i << std::endl; + writer << 1.01; + } +} + TEST(WriterTest, WriteChar) { CHECK_WRITE('a'); }